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.
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
Before using this plugin, you need to install the following tools:
Provides structured prompts for conducting thorough kernel patch reviews.
git clone https://github.com/masoncl/review-prompts.git ~/Work/kernel/review-promptsThe 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.
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.
Tool for working with patches from mailing lists.
pip install b4-
Add the marketplace (one-time setup):
/plugin marketplace add jlelli/claude-kernel-reviews -
Install the plugin:
/plugin install kernel-review-workflow -
Set up CLAUDE.md in your kernel repository:
cd /path/to/your/linux/kernel ln -s ~/.claude/plugins/marketplaces/kernel-review-workflow/CLAUDE.md .
-
Add to .gitignore: Add
/CLAUDE.mdto your kernel repository's.git/info/exclude
-
Clone this repository:
git clone https://github.com/jlelli/claude-kernel-reviews.git
-
Add as local marketplace:
/plugin marketplace add /path/to/claude-kernel-reviews -
Install the plugin:
/plugin install kernel-review-workflow -
Set up CLAUDE.md in your kernel repository:
cd /path/to/your/linux/kernel ln -s /path/to/claude-kernel-reviews/CLAUDE.md .
After installing the plugin:
-
Create the tracked-series directory in your kernel repo:
cd /path/to/your/linux/kernel mkdir -p .claude/tracked-series -
Set up CLAUDE.md (optional but recommended):
The
CLAUDE.mdfile 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/excludeto keep it out of commits:echo "/CLAUDE.md" >> .git/info/exclude
The plugin will manage the tracked-series directory structure automatically.
Once installed, you can use Claude Code in your kernel repository with the custom slash 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
-
Start Claude Code in your kernel repository:
cd /path/to/your/linux/kernel claude -
Review a patch series:
/review 20250820010415.699353-1-user@domain.com -
Track it for ongoing work:
/track 20250820010415.699353-1-user@domain.com -
Check status of tracked series:
/status
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.mdafter installation
The .mcp.json file configures the semcode MCP server. This is automatically loaded when the plugin is installed.
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.jsonThis 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.
- This workflow is designed for kernel maintainers and contributors who review patches regularly
- The commands use
b4tool for fetching patch series from mailing lists - Code indexing with
semcodeis performed automatically during reviews for better context - All workflow state is maintained in the
tracked-series/directory
To contribute improvements to this workflow:
- Fork this repository
- Make your changes
- Test with a kernel repository
- Submit a pull request
This workflow configuration follows the same license as your kernel development process.