hook-dev

hook-dev is a skill for Claude Code from andisab/swe-marketplace. It costs 80 tokens per session (4,706 once invoked), scanned C, original, MIT.

A guide for creating Claude Code hooks, which are shell commands that run automatically at specific events such as tool use or session changes.

In plain words
What is it for?
Use it to design hooks that format code, run validation, record commands, notify you, or block sensitive file changes.
Why use it?
It removes the need to rely on manual steps or AI decisions for repeatable checks, notifications, logging, and permission rules.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the TodoWrite tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the context-engineering plugin — 7 skills, 1 agent shipped together

Good fit Use it to design hooks that format code, run validation, record commands, notify you, or block sensitive file changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add andisab/swe-marketplace
Claude Code
/plugin install context-engineering

Made for: Claude Code.

Or install context-engineering, the plugin that ships this one along with the rest of its 7 skills, 1 agent.

Wrote 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.

agentmods badge for hook-dev

README.md
[![agentmods](https://agentmods.dev/badge/skills/andisab/swe-marketplace/hook-dev/github.svg)](https://agentmods.dev/skills/andisab/swe-marketplace/hook-dev)
Your own site
<a href="https://agentmods.dev/skills/andisab/swe-marketplace/hook-dev"><img src="https://agentmods.dev/badge/skills/andisab/swe-marketplace/hook-dev/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.

agentmods 80×15 button for hook-dev

Your own site · 80×15
<a href="https://agentmods.dev/skills/andisab/swe-marketplace/hook-dev"><img src="https://agentmods.dev/badge/skills/andisab/swe-marketplace/hook-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,706 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.04706
Opus 5.5 $0.00032 $0.01882
Sonnet 5.5 $0.00016 $0.00941
Haiku 4.5 $0.00008 $0.00471

Measured 1mo ago against content hash 7c68f3da5f3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

hook-dev scanned grade C with 3 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 1mo 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

"command": "jq '.' | curl -d @- https://external-log-service.com"

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **User-level**: `~/.claude/settings.json` (all projects)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"command": "jq '.' | curl -d @- https://external-log-service.com"
plugins/context-engineering/skills/hook-dev/SKILL.md · 792 lines

How it starts

The opening of the file, as written. The whole thing — 792 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hook Dev Skill

This skill helps create production-ready Claude Code hooks following Anthropic's official specifications.

What are Hooks?

Hooks are user-defined shell commands that execute at various points in Claude Code's lifecycle. They provide:

  • Deterministic control: Ensure actions happen automatically, not relying on LLM decisions
  • Workflow automation: Format code, run linters, log commands
  • Custom notifications: Alert when Claude needs input
  • Permission systems: Block sensitive file modifications
  • Feedback loops: Validate code changes against conventions

Hook vs Skill vs Command

Feature Hook Skill Command
Trigger Lifecycle event Context match User invocation
Type Shell command AI capability Prompt template
Use case Automation, validation Autonomous features Reusable prompts
Control Deterministic LLM-driven User-initiated

When to use Hooks: Automatic formatting, logging, notifications, permission control, code validation

Hook Events

Ten lifecycle events trigger hooks:

1. PreToolUse

Executes after Claude creates tool parameters but before processing.

Use cases:

  • Block edits to sensitive files (.env, production configs)
  • Validate bash commands before execution
  • Request confirmation for destructive operations
  • Log all tool usage for auditing
  • Modify tool inputs programmatically

Blocking capability: Yes - exit code 2 blocks with error fed to Claude; JSON output with "permissionDecision": "deny" also blocks

2. PostToolUse

Runs immediately after successful tool completion.

Use cases:

  • Format code after edits (Prettier, Black, gofmt)
  • Run linters after file modifications
  • Sync changes to external systems
  • Update indexes or caches

Blocking capability: No - tool already executed

3. UserPromptSubmit

Fires when users submit prompts, before Claude processes them.

Read the full file on GitHub · 792 lines

Changes

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.

  1. 1mo ago Changed 7c68f3da5f3e
  2. 3mo ago First seen · 792 lines · 80 tokens per session scan C c5b6de793edf

Subscribe to this mod's changes

hook-dev is a skill published in the GitHub repository andisab/swe-marketplace (23 stars, last pushed 4d ago), licensed MIT. It adds 80 tokens to every session and 4,706 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 3 findings (sends data to an external url, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

hook-dev compared with skills from other repositories

hook-dev next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hook-devandisab/swe-marketplaceSkill234d agoMITC80Claude Code
ccc-tuneupKevinZai/commanderSkill6todayMITA38Claude Code, Codex
ccc-fableKevinZai/commanderSkill6todayMITA60Claude Code, Codex
ccc-suggestKevinZai/commanderSkill6todayMITA34Claude Code
ccc-codexKevinZai/commanderSkill6todayMITA59Claude Code, Codex
ccc-ciKevinZai/commanderSkill6todayMITA67Claude Code, Codex
ccc-deploy-checkKevinZai/commanderSkill6todayMITA74Claude Code, Codex