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 joris887/exosuit --skill custom-hooksgit clone --depth 1 https://github.com/joris887/exosuitWrote 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/joris887/exosuit/custom-hooks)<a href="https://agentmods.dev/skills/joris887/exosuit/custom-hooks"><img src="https://agentmods.dev/badge/skills/joris887/exosuit/custom-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/joris887/exosuit/custom-hooks"><img src="https://agentmods.dev/badge/skills/joris887/exosuit/custom-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.00023 | $0.01215 |
| Opus 5.5 | $0.00009 | $0.00486 |
| Sonnet 5.5 | $0.00005 | $0.00243 |
| Haiku 4.5 | $0.00002 | $0.00121 |
Grade A, and why
custom-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 3mo 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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
custom-hooks
Creating a custom hook: $ARGUMENTS
Supported Hook Events
Present available Claude Code hook events:
| Event | When It Fires | Can Block? | Input Fields |
|---|---|---|---|
SessionStart |
Once at session start | No | session data |
PreToolUse |
Before any tool call | Yes (exit 2) | tool_name, tool_input |
PostToolUse |
After any tool call | No | tool_name, tool_input, tool_output |
Stop |
When model wants to stop | Yes (exit 2) | last_assistant_message |
UserPromptSubmit |
When user submits prompt | No | user_prompt |
SubagentStop |
When a subagent completes | No | last_assistant_message |
WorktreeCreate |
When a worktree is created | No | — |
WorktreeRemove |
When a worktree is removed | No | — |
Matchers (for PreToolUse and PostToolUse): Filter by tool name — Bash, Edit, Write, Read, Glob, Grep, or combinations with | (e.g., Edit|Write).
1. Understand Requirements
Parse $ARGUMENTS to determine:
- Event type: Which hook event to listen to
- Purpose: What the hook should do
- Blocking vs Advisory: Should it block (exit 2) or just warn (exit 0)?
If unclear, ask:
- "Should this hook block the action or just warn?"
- "Should it fire on specific tools only, or all tools?"
- "Should it run on subagents too?"
2. Generate Hook Script
Create a POSIX shell script following the framework's hook conventions:
#!/bin/sh
# [Event] handler: [description].
# [Blocking|Advisory] — [behavior summary].
# POSIX-compliant — no bash required.
#
# Input: JSON on stdin ([relevant fields])
# Output: exit 0 = allow, exit 2 = block (message on stderr)
HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)"
# --- JSON field extraction ---
extract_json_string() {
_field="$1"
if command -v jq >/dev/null 2>&1; then
jq -r ".$_field // empty"
else
sed -n 's/.*"'"$_field"'"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1
fi
}
# Read stdin once
INPUT=$(cat)
# --- Hook logic ---
# [Custom logic here]
exit 0
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.
- 3mo ago First seen · 143 lines · 23 tokens per session scan A 8929ca9c4e48
custom-hooks is a skill published in the GitHub repository joris887/exosuit (12 stars, last pushed 28d ago), licensed MIT. It adds 23 tokens to every session and 1,215 once invoked, about $0.0001 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.
custom-hooks compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| custom-hooksjoris887/exosuit | Skill | 12 | 28d ago | MIT | A | 23 | Claude Code |
| build-teaql-appteaql/teaql-agent-kit | Skill | 2.8k | 21d ago | MIT | A | 112 | Codex |
| context-exclusionteaql/teaql-agent-kit | Skill | 2.8k | 21d ago | MIT | A | 41 | Claude Code |
| eval-agentsFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.6k | yesterday | CC-BY-SA-4.0 | A | 80 | Claude Code |
| land-and-deployFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.6k | yesterday | CC-BY-SA-4.0 | A | 41 | Claude Code |
| source-command-methodology-advisorFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.6k | yesterday | CC-BY-SA-4.0 | A | 27 | Claude Code, Codex |
| methodology-advisorFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.6k | yesterday | CC-BY-SA-4.0 | A | 61 | Claude Code |