Skip to content

jlelli/claude-kernel-reviews

Repository files navigation

Claude Code Linux Kernel Review Workflow

This repository contains a Claude Code plugin for Linux kernel patch reviews. It provides commands, prompts, and settings to streamline the kernel development and review process.

Overview

The plugin includes:

  • Custom slash commands for common kernel review tasks (review, track, status, summarize, update)
  • Project instructions (CLAUDE.md) with kernel-specific guidance for Claude
  • MCP server configuration for semcode integration
  • Patch series tracking to manage ongoing reviews

Prerequisites

Before using this plugin, you need to install the following tools:

1. review-prompts

Provides structured prompts for conducting thorough kernel patch reviews.

git clone https://github.com/masoncl/review-prompts.git ~/Work/kernel/review-prompts

The workflow expects review prompts at:

~/Work/kernel/review-prompts/review-core.md

If you install it elsewhere, you'll need to update the path in commands or create a symlink.

2. semcode

A semantic code indexing tool from Meta that enables better code navigation and understanding.

git clone https://github.com/facebookexperimental/semcode.git
cd semcode
# Follow installation instructions in the semcode repository
cargo build --release

# Add to PATH
sudo ln -s $(pwd)/target/release/semcode-index /usr/local/bin/
sudo ln -s $(pwd)/target/release/semcode-mcp /usr/local/bin/

Make sure both semcode-index and semcode-mcp are available in your PATH.

3. b4

Tool for working with patches from mailing lists.

pip install b4

Installation

Option 1: Install from GitHub (Recommended for Teams)

  1. Add the marketplace (one-time setup):

    /plugin marketplace add jlelli/claude-kernel-reviews
    
  2. Install the plugin:

    /plugin install kernel-review-workflow
    
  3. Set up CLAUDE.md in your kernel repository:

    cd /path/to/your/linux/kernel
    ln -s ~/.claude/plugins/marketplaces/kernel-review-workflow/CLAUDE.md .
  4. Add to .gitignore: Add /CLAUDE.md to your kernel repository's .git/info/exclude

Option 2: Install from Local Clone (Development)

  1. Clone this repository:

    git clone https://github.com/jlelli/claude-kernel-reviews.git
  2. Add as local marketplace:

    /plugin marketplace add /path/to/claude-kernel-reviews
    
  3. Install the plugin:

    /plugin install kernel-review-workflow
    
  4. Set up CLAUDE.md in your kernel repository:

    cd /path/to/your/linux/kernel
    ln -s /path/to/claude-kernel-reviews/CLAUDE.md .

Initial Setup

After installing the plugin:

  1. Create the tracked-series directory in your kernel repo:

    cd /path/to/your/linux/kernel
    mkdir -p .claude/tracked-series
  2. Set up CLAUDE.md (optional but recommended):

    The CLAUDE.md file provides kernel-specific instructions to Claude about:

    • Build system commands and targets
    • Kernel architecture and subsystems
    • Coding standards and commit format
    • Development tools and scripts

    Symlink it to your kernel repository root:

    ln -s ~/.claude/plugins/kernel-review-workflow/CLAUDE.md .

    Then add it to .git/info/exclude to keep it out of commits:

    echo "/CLAUDE.md" >> .git/info/exclude

The plugin will manage the tracked-series directory structure automatically.

Usage

Once installed, you can use Claude Code in your kernel repository with the custom slash commands:

Available Commands

  • /review <message-id> - Fetch and review a patch series from lore.kernel.org
  • /track <message-id> - Track a patch series for ongoing review
  • /status - Show status of tracked patch series
  • /summarize <message-id> - Generate a summary of a patch series
  • /update <series-name> - Update a tracked series with new version
  • /update-version - Update kernel version baseline for tracking

Example Workflow

  1. Start Claude Code in your kernel repository:

    cd /path/to/your/linux/kernel
    claude
  2. Review a patch series:

    /review 20250820010415.699353-1-user@domain.com
    
  3. Track it for ongoing work:

    /track 20250820010415.699353-1-user@domain.com
    
  4. Check status of tracked series:

    /status
    

Configuration

Review Prompts Location

The default location for review prompts is specified in the /review command:

~/Work/kernel/review-prompts/review-core.md

If you've installed review-prompts elsewhere, you can either:

  • Create a symlink: ln -s /your/path/review-prompts ~/Work/kernel/review-prompts
  • Update the path in commands/review.md after installation

MCP Configuration

The .mcp.json file configures the semcode MCP server. This is automatically loaded when the plugin is installed.

Settings (Optional)

You can copy settings.local.json.example to your kernel repository's .claude/settings.local.json to pre-approve common commands and reduce permission prompts:

cd /path/to/your/linux/kernel
cp ~/.claude/plugins/kernel-review-workflow/settings.local.json.example .claude/settings.local.json

This pre-approves common operations like:

  • Git commands (log, show, checkout, grep)
  • checkpatch.pl execution
  • b4 commands
  • semcode MCP tools
  • Reading review prompts and tracked series

Adjust the paths if your setup differs.

Notes

  • This workflow is designed for kernel maintainers and contributors who review patches regularly
  • The commands use b4 tool for fetching patch series from mailing lists
  • Code indexing with semcode is performed automatically during reviews for better context
  • All workflow state is maintained in the tracked-series/ directory

Contributing

To contribute improvements to this workflow:

  1. Fork this repository
  2. Make your changes
  3. Test with a kernel repository
  4. Submit a pull request

License

This workflow configuration follows the same license as your kernel development process.

About

Linux kernel workflow configuration for Claude Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages