hook — Claude Code skill: edit guard and installation
hook is a Claude Code skill that toggles a repository edit guard. When enabled, it rejects large edits and a third edit to one file in a turn, then redirects them to a delegate.
MIT ★ 341 updated 2026-11-16
/plugin marketplace add muaaz9329/cheap-ag
/plugin install cheapag@cheap-agentWhat hook does
hook turns the repository edit guard on with on and off with off. With the guard enabled, large edits and the third change to one file during a turn are denied and sent to a delegate.
It runs npx -y [email protected] hook with the supplied argument. npx needs network access.
What it helps with
- enable an edit guard for a repository
- turn off the guard before editing
- send a large edit to a delegate
Example prompts for the agent
- Turn on the repository edit guard with
/hook on. - Turn off the edit guard with
/hook off. - Run
hookwith theonargument.
How to install hook
1Plugin marketplace
/plugin marketplace add muaaz9329/cheap-ag/plugin install cheapag@cheap-agentThis installs the whole cheapag plugin with all its skills
2Skills CLI (Vercel)
npx skills add muaaz9329/cheap-ag --skill hook -a claude-code3Manually: put the files in place
~/.claude/skills/hook/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/hook/
1Skills CLI (Vercel)
npx skills add muaaz9329/cheap-ag --skill hook -a codex2Manually: put the files in place
.agents/skills/hook/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add muaaz9329/cheap-ag --skill hook -a cursor2Manually: put the files in place
.cursor/skills/hook/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install muaaz9329/cheap-ag plugin/skills/hook2Manually: put the files in place
.github/skills/hook/SKILL.md1Skills CLI (Vercel)
npx skills add muaaz9329/cheap-ag --skill hook -a gemini-cli2Platform CLI
gemini skills install https://github.com/muaaz9329/cheap-ag --path plugin/skills/hookManually: put the files in place
.devin/skills/hook/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about hook
How do I install hook in Claude Code?
Run /plugin marketplace add muaaz9329/cheap-ag, then /plugin install cheapag@cheap-agent. An alternative is npx skills add muaaz9329/cheap-ag --skill hook -a claude-code.
What does hook do?
It switches the repository edit guard on or off. With the guard on, large edits and a third edit to one file in a turn are rejected and redirected to a delegate.
What does hook need to run?
It runs npx -y [email protected] hook, and npx requires network access.
Source text
SKILL.md · MIT
--- name: hook description: Turn Cheap Agent's edit guard on or off for this repo - when on, Claude's large edits (or a 3rd edit to one file in a turn) are denied and redirected to delegate. argument-hint: "[on | off]" disable-model-invocation: true allowed-tools: Bash(npx -y [email protected] hook) Bash(npx -y [email protected] hook *) --- !`npx -y [email protected] hook $ARGUMENTS` The developer ran this command themselves; its output is above. Report it in one line. Only because the user invoked this skill: If no output appears above (Codex): run that command yourself once, exactly as written, with `$ARGUMENTS` replaced by whatever the user typed after the skill name (or nothing). It needs network for npx; ask for that if the sandbox blocks it. Do not turn the edit guard on or off again or in any other way.
© muaaz9329 · MIT · muaaz9329/cheap-ag