Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ShipWithAI/shipwithai-plugins --skill setup-hooksgit clone --depth 1 https://github.com/ShipWithAI/shipwithai-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/shipwithai/shipwithai-plugins/setup-hooks)<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/setup-hooks"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/setup-hooks/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/setup-hooks"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/setup-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.00842 |
| Opus 5.5 | $0.00022 | $0.00337 |
| Sonnet 5.5 | $0.00011 | $0.00168 |
| Haiku 4.5 | $0.00006 | $0.00084 |
Grade A, and why
setup-hooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/setup-hooks
Configures .claude/settings.json → hooks section.
Mode Detection
Read .claude/starter-context.json if it exists
→ Exists: use fields stack.detected_tools, hooks_selected — skip detect + confirm
→ Does not exist (standalone): detect tools → suggest from catalog → confirm
Argument Handling
If flags are provided, skip auto-detection and only suggest hooks for the specified tools:
--formatter <name>: only suggest hook for that formatter (e.g.--formatter black)--test <name>: only suggest hook for that test runner (e.g.--test pytest)
Flags can be combined: /setup-hooks --formatter prettier --test jest
Tool Detection
Load hooks-catalog.json. For each entry, detect presence in order:
- files: check whether any listed filename/glob exists in the project root
- packageJson: read
package.json, check key underdevDependenciesordependencies - binary: run
which <binary>— pass if exit code is 0
Only suggest a hook if the tool passes at least one of the three checks.
If no tools are detected: inform the user, suggest using flags to specify tools manually.
Suggest & Confirm
Suggest hooks one at a time. Show a preview before confirming:
PostToolUse hook:
"This hook will run
prettier --write $FILEevery time Claude uses the Edit tool on.js|ts|jsx|tsx|css|mdfiles. Enable it?"
Stop hook:
"This hook will run
npm testevery time Claude finishes a session. Enable it?"
If the user declines: record as skipped, continue to the next hook.
After all hooks are processed, show a summary:
"Enabled: prettier-on-edit, eslint-fix-on-edit. Skipped: jest-on-stop."
Output Format
If .claude/settings.json does not exist: create it with { "hooks": {} }.
Merge into .claude/settings.json — do not overwrite the permissions section:
{
"permissions": { "...existing..." },
"hooks": {
"PostToolUse": [
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "case \"$CLAUDE_TOOL_INPUT_PATH\" in *.js|*.ts|*.jsx|*.tsx|*.css|*.md) npx prettier --write \"$CLAUDE_TOOL_INPUT_PATH\";; esac"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "npm test"
}
]
}
]
}
}
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 107 lines · 56 tokens per session scan A 2afe4eaec24e
setup-hooks is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (9 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 842 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
setup-hooks compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| setup-hooksShipWithAI/shipwithai-plugins | Skill | 9 | 2mo ago | MIT | A | 56 | Claude Code |
| connectgreenpolo/cc-multi-cli-plugin | Skill | 196 | 10d ago | Apache-2.0 | A | 11 | Claude Code |
| review-depthjszmajda/lid | Skill | 118 | today | MIT | A | 93 | Claude Code |
| hook-templateclaude-world/director-mode-lite | Skill | 80 | 20d ago | MIT | A | 39 | Claude Code |
| check-environmentclaude-world/director-mode-lite | Skill | 80 | 20d ago | MIT | A | 44 | Claude Code |
| agentsclaude-world/director-mode-lite | Skill | 80 | 20d ago | MIT | A | 29 | Claude Code |
| handoff-geminiclaude-world/director-mode-lite | Skill | 80 | 20d ago | MIT | A | 71 | Claude Code |