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 agentmods add skills/shipwithai/shipwithai-plugins/setup-hooksnpx 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.svg" alt="Measured on agentmods" 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 | $0.00056 | $0.00842 |
| Opus 5 | $0.00028 | $0.00421 |
| Sonnet 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 3d 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.
- 3d 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 (10 stars, last pushed 21d ago), licensed MIT. It adds 56 tokens to every session and 842 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
agent-workspace-linux
Use when a task needs an isolated hidden Linux desktop or workspace-owned browser: GUI app QA, web/browser/shopping automation, sandboxed app observation, or stale workspace cleanup. Routes agent-workspace-linux MCP tools on demand. Does NOT apply to host desktop/Chrome control, generic MCP setup, or pure code/file…
loongsuite-pilot-insight
基于 LoongSuite Pilot / AI Coding Agent 日志生成事件洞察、组织洞察、数据质量、研发效能和 AI Native 使用类 SLS 报表时使用;包含 AI Coding 事件表语义,以及团队报表可选的部门维表、deptuser 组织关系、指标口径和公共 CTE,通常与 sls-dashboard-builder 一起使用。.
map-fast
Minimal workflow for small, low-risk changes — no planning, no learning.
codedrobe-theme
Create, inspect, convert, apply, replace, verify, troubleshoot, update, publish, or restore reversible CodeDrobe themes for supported Chromium/Electron AI desktop apps, including OpenAI Codex, Tencent WorkBuddy, QoderWork (CN/global), and TRAE SOLO (global/CN). Use when a user asks to turn an attached or local…
levelup-clarify
Review, accept, reject, or defer Context Directive Records (CDRs) discovered by levelup-init or proposed by levelup-specify. Interactive one-CDR-at-a-time workflow.
clio-webhooks
Receive and verify Clio (Clio Manage) webhooks. Use when setting up Clio webhook handlers, debugging X-Hook-Signature verification, completing the X-Hook-Secret handshake, or handling legal practice events like matter.created, contact.updated, activity.created, or bill events.