live-verify
Verify a plugin's hooks and skills in a real Claude Code session (`claude -p --plugin-dir`) with a throwaway repo, the debug log and an inotify watch counter. Use when a behaviour depends on Claude Code itself (hook events, watchPaths, tool input rewriting, skills) and the unit tests cannot show it, or to measure on a slow file system.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- live-verify
- description
- Verify a plugin's hooks and skills in a real Claude Code session (`claude -p --plugin-dir`) with a throwaway repo, the debug log and an inotify watch counter. Use when a behaviour depends on Claude Code itself (hook events, watchPaths, tool input rewriting, skills) and the unit tests cannot show it, or to measure on a slow file system.
- argument-hint
- <plugin-name> <scenario>
03 SKILL.md 正文
live-verify
Recipe worked out for the dprint plugin; see .claude/rules/claude-code-hook-facts.md for the facts it established.
Setup (always a throwaway)
- Repo under the session scratchpad (never in this repository):
git init, a config, a few unformatted files, one commit. For slow-file-system checks use a writable/mnt/c/Users/Public/<name>in WSL and delete it afterwards. - Put the steps in a bash/node script in the scratchpad and run it with one plain command (worktree sessions refuse compound commands).
Run
cd "$R" # the throwaway repo: Claude's Write/Edit/Bash steps act in the current directory, never in this repository
claude -p --plugin-dir <worktree>/<plugin>/plugin \
--debug-file "$S/debug.log" --allowedTools "Write,Edit,Read,Bash" --max-budget-usd 1 \
"<exact tool steps; end with: Reply with the single word done.>"
- Narrow
--allowedTools; never--dangerously-skip-permissions. Budget cap 1 USD per run, a handful of runs. - Slash commands work as the prompt (
"/<plugin>:<skill> check"); asking the model to call the Skill tool only prints "Launching skill".AskUserQuestionis disabled in-p: flows stop at their first question (assert nothing was changed). - Keep the session alive while an outside harness changes files: ask for one Bash command that waits, written as
node -e "setTimeout(()=>{},45000)"(a foregroundsleepcan be blocked by a hook). - Count inotify watches of the claude process: sum
inotify wd:lines over/proc/<pid>/fdinfo/<fd>for fds whose link isanon_inode:inotify. - Read the log:
grep -E "calling|provided|FileChanged"(Hooks: mcp_tool calling plugin:<p>:<server>/<tool>,Hook <Event> (...) provided additionalContext,FileChanged: watching N paths,FileChanged: change <file>). A throwaway logging plugin (SessionStart command hook printingwatchPaths, FileChanged command hook appending events to a file) isolates Claude Code behaviour from the plugin under test.
Checks worth repeating
- Write, Edit (also with an empty
new_string), Bash that rewrites a watched file, Bash that exits non-zero: file content afterwards and the notice in the log. - Skills:
check(exit code, files untouched),fmt,init(up to its first question). - Same scenarios with the cwd on a slow mount; measure with a small JSON-RPC script against the built server (median of several runs), compare the old and the new path.
- Repeat a racy scenario at least 2-3 times (watch loss was racy: one run proved nothing).
Report
Numbers from one machine, the Claude Code version, what was not exercised. Put results in the plugin's docs/ evaluation, and stop when the next run would repeat an earlier one.
04 同仓库更多 Skills
universal-lint
User-invoked. Takes a free-text description of a set of files ("all files in src/", "files changed in PR 123", or an explicit list) and lints each of them exactly as this plugin's Write/Edit hook would — read-only, no autofix — printing one aggregated findings report. Self-contained: depends on no other plugin.
solve
Single entry point for any coding task (change, feature, refactor, bug). Triages the task through the jev-api tools and routes it to the right track, loading the phase references it needs. Flags --headless (the decider agent answers every question) and --size=<S|M|L|XL>. Use when the user hands over a task to implement or fix.
dprint
Runs dprint for the project. The first argument selects the action - init checks for the plugin's minimum dprint version, installs or updates dprint at user level after confirmation via AskUserQuestion, offers to create a dprint config when none exists and to add dprint plugins for file types the config does not cover; check [scope] runs dprint check; fmt [scope] runs dprint fmt and rewrites files; without an argument it runs fmt on the whole current directory. Use init when the user wants dprint set up, installed, updated, checked or its plugins completed; check when they want formatting verified with dprint; fmt only when they ask to format files with dprint. When invoking this skill yourself, always pass init, check or fmt as the first argument.
split-hooks-lib
Split the hooks module of a function-hooks plugin of this repository into a readable entry register.mts plus helper modules that the build bundles into one compressed plugin/hooks/lib.mjs, to keep the shipped size small. Use when the user asks to split a plugin's register.mts, to make a plugin smaller, to move a plugin to register.mjs plus lib.mjs, or when a hooks module has grown too large for one file.
__SKILL_NAME__
__SKILL_DESCRIPTION__ Use when the user asks to …
scaffold-plugin
Scaffold a new Claude Code plugin in this repository with the repo layout (<name>/package.json, plugin/, src/, tests/). Use when the user asks to create, add, scaffold or start a new plugin here.