Skip to content

About

Six Claude Code hooks in five plugins, and a statusline. Install what you want.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

claude-code-kit

Claude Code hooks and skills in small plugins, and a statusline. Each one closes a gap that costs real time: an agent that narrates history in a comment, a subagent you cannot correct until it finishes, a bot challenge that reads like a missing file, a long turn that ends while you are in another window, a team of agents that merges a conflict nobody saw, a credential read that should never have run.

Install what you want. No hook depends on another. review-mr installs delegation with it. The skills work without any hook, and delegation reaches further with agent-steer and help-intercept installed. It says so where it matters.

Install

/plugin marketplace add moghaddas/claude-code-kit
/plugin install curl-ua-guard@moghaddas

From a shell instead of a session:

claude plugin marketplace add moghaddas/claude-code-kit
claude plugin install curl-ua-guard@moghaddas --scope user

Every plugin at once:

claude plugin install kit@moghaddas

The hooks

Plugin Event What it does
curl-ua-guard PreToolUse Gives curl and wget a browser User-Agent before they leave the machine. A Cloudflare-fronted origin serves a challenge to a default curl/8.x UA, and that response reads like a real finding.
notify Notification, Stop Writes a desktop banner when Claude needs you, and when a long turn ends.
doc-guards PostToolUse, PreToolUse Flags a comment that narrates history in code just written. Hands back the brevity bar before a CLAUDE.md, AGENTS.md or SKILL.md is written, and the test value bar before a write adds test cases to a file, by blocking the first write of each.
agent-steer PreToolUse Corrects a running subagent or teammate. A queued message reaches an agent only at a turn boundary, so this one delivers by pull instead.
help-intercept UserPromptSubmit Prints a skill's help text for zero model tokens. The hook returns the text through the block contract, so the model never runs.
guards PreToolUse Two guards, each with its own switch. Blocks a shell read of a credential file or an environment dump, even behind an absolute path. Keeps the gws Google Workspace CLI read-only unless a write is confirmed.
sql-read-only PreToolUse Lets only read queries through the SQL tools of an MCP database server, including the writes a first-keyword check misses, such as a CTE that deletes.
cross-repo-context PostToolUse Loads the CLAUDE.md files of a repo the session did not start in, the first time a tool touches it. Claude Code loads them only for the starting repo.
worktree-orphan-guard PostToolUse, PostToolUseFailure Catches a worktree folder that git worktree remove unregistered but failed to delete, and tells the session to finish the job.
memory-hygiene SessionStart Drops memory index lines that point at a deleted note, and logs notes no index reaches. Zero model tokens.

doc-guards, agent-steer, guards, sql-read-only and memory-hygiene install disabled. Each one changes how the agent behaves or blocks what it runs, so you opt in rather than discover it. Enable any of them in /plugin.

Each plugin's README carries its own configuration table and its failure mode.

The skills

delegation holds three skills and the two agents they spawn. All three are about work you hand to someone else. review-mr builds on them.

Skill Invoke What it does
orchestrate /delegation:orchestrate Leads a team of subagents. Decompose into tracks that cannot touch the same file, pick a model per track, brief completely in the spawn, steer, spot-check every claim before accepting it, merge.
second-opinion /delegation:second-opinion Gates a consult on a decision that is expensive to unwind, and briefs an agent that has none of your context. Ships with that agent, pinned to fable at xhigh effort and read-only.
review-mr /review-mr:review-mr Takes a GitLab merge request link and runs unattended until it is safe to merge: many agents review by lens and slice, a verifier checks every finding, design calls go to second-opinion, and each surviving finding becomes its own local commit. Needs glab or a GitLab MCP server.
solo /delegation:solo Solves a problem end to end while you are away. A Fable consult checks the design, a Fable reviewer checks the diff, and the work stays local for you to ship.

Two facts about the harness do most of the work in orchestrate, and each one explains an agent that looks broken and is not. A message lands only at a turn boundary, so a running agent reads nothing you send it, and a report reaches you only when your own turn ends. And Write refuses a subagent any file named REPORT.md, SUMMARY.md, FINDINGS.md or ANALYSIS.md, so a brief that asks for one gets nothing.

orchestrate reaches a live track by writing a control file, which is what agent-steer delivers. That matters most at the 15-minute cap, where the file tells a track to stop taking new work, checkpoint, commit and report. Without it the only brake is TaskStop, which kills the unit of work in flight. Mid-run corrections are the rarer case: with a complete brief, a correction usually means the brief was wrong, which is a respawn. The skill says so, and falls back to respawning when the hook is absent.

orchestrate and solo carry a ## Help section, so --help prints their options, for zero model tokens when help-intercept is installed.

The statusline

statusline/ holds a statusline that reports two things a stock one does not: the true cost of a session including subagents, and the branch the session works on, worktrees and ticket keys included.

It is not a plugin. A plugin's bundled settings.json supports only the agent and subagentStatusLine keys, so no plugin can install a statusline. Run the installer:

git clone https://github.com/moghaddas/claude-code-kit ~/src/claude-code-kit
~/src/claude-code-kit/statusline/install.sh

Requirements

The statusline needs jq, and uses ccusage for the cost segment when it is present. Every hook runs on bash and the Python 3 that ships with the system. review-mr needs glab or a GitLab MCP server; the other skills need nothing but Claude Code. Nothing here needs a package manager.

License

MIT.

About

Six Claude Code hooks in five plugins, and a statusline. Install what you want.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages