Create pull request
This is the final part of the Claude Code Notifier series.
My cursor hovered over the button.
Green button. "Create pull request."
Discovery
I read Boris's post—he made Claude Code. "customize it, and hack it however you like," he said.
So I dug through the Claude Code repo. Found a plugins directory. 13 official plugins. code-review, commit-commands, pr-review-toolkit.
But no notification plugin. Why not? Figured there'd obviously be one that tells you when tasks finish.
So I decided to make one.
Preparation
Spent a week studying existing plugins.
Found a structure. .claude-plugin/plugin.json was required. Hooks go in the hooks directory. Paths need the ${CLAUDE_PLUGIN_ROOT} environment variable.
Refactored my code to match. Changed paths, cleaned up variable names, rewrote the README in English.
plugins/notifier/
├── .claude-plugin/
│ └── plugin.json
├── commands/
│ └── notifier.md
├── hooks/
│ └── hooks.json
├── hooks-handlers/
│ ├── common.sh
│ ├── notify.sh
│ └── notifiers/
│ ├── macos.sh
│ ├── linux.sh
│ └── windows.ps1
└── README.md
13 files, 748 lines.
Testing
Tested on macOS, Linux (Docker), Windows, and WSL.
Plugin Spec
Studying existing plugins revealed a clear spec. Right, there are rules.
Required structure:
plugins/plugin-name/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── hooks/
│ └── hooks.json # Hook definitions
└── README.md
plugin.json example:
{
"name": "notifier",
"version": "1.0.0",
"description": "Cross-platform notifications"
}
hooks.json example:
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks-handlers/notify.sh"
}]
}]
}
}
${CLAUDE_PLUGIN_ROOT} gets replaced with the plugin root path. Use this to avoid path issues.
PR
Organized everything to spec and submitted a PR. #18151.
So
As I write this, the PR is still open.
If merged, it becomes the 14th official plugin. If not, it stays as my personal project. Either way is fine.
Will update when merged.
Series:
- Part 1: Notify Me When Claude Code Finishes
- Part 2: It's All About Hooks
- Part 3: macOS Only?
- Part 4: Create pull request (current)
PR: anthropics/claude-code#18151
