agent-hooks

agent-hooks is an agent for coding agents from pdugan20/claudelint. It costs 10 tokens per session (475 once invoked), scanned A, original, MIT.

A format check for the `hooks` setting in an agent's YAML header. It requires an object whose keys are supported agent event names, with each key containing hook matchers.

In plain words
What is it for?
Use it when adding commands that respond to events such as tool use, session changes, or task completion. It checks the overall structure of the hook configuration.
Why use it?
It prevents hooks written as a list or plain text, which the agent framework cannot interpret correctly.

Agent

Part of the claudelint plugin — 15 skills, 2 commands, 15 agents, 1 hook, 2 MCP servers, 1 plugin shipped together

Install

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.

agentmods
npx agentmods add agents/pdugan20/claudelint/agent-hooks
Clone the repo
git clone --depth 1 https://github.com/pdugan20/claudelint

Or install claudelint, the plugin that ships this one along with the rest of its 15 skills, 2 commands, 15 agents, 1 hook, 2 MCP servers, 1 plugin.

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 agent-hooks

README.md
[![agentmods](https://agentmods.dev/badge/agents/pdugan20/claudelint/agent-hooks.svg)](https://agentmods.dev/agents/pdugan20/claudelint/agent-hooks)
Your own site
<a href="https://agentmods.dev/agents/pdugan20/claudelint/agent-hooks"><img src="https://agentmods.dev/badge/agents/pdugan20/claudelint/agent-hooks.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 475 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.00475
Opus 5 $0.00005 $0.00237
Sonnet 5 $0.00002 $0.00095
Haiku 4.5 $0.00001 $0.00047

Measured 4d ago against content hash 922f8aec1f17, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-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 4d 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.

website/rules/agents/agent-hooks.md · 73 lines

What it actually says

agent-hooks

Rule Details

This rule enforces that the hooks field in agent markdown frontmatter is a valid object keyed by event names. The supported event names are PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, PreCompact, SessionStart, SessionEnd, TeammateIdle, and TaskCompleted. Each key maps to an array of hook matchers. Validation is delegated to the AgentFrontmatterSchema.shape.hooks Zod schema. Correctly structured hooks allow the agent framework to register event handlers at runtime.

Incorrect

Hooks defined as an array instead of an object

---
name: build-agent
description: Runs build pipelines
hooks:
  - PreToolUse
  - PostToolUse
---

Hooks defined as a plain string

---
name: build-agent
description: Runs build pipelines
hooks: PreToolUse
---

Correct

Hooks as an object with event name keys

---
name: build-agent
description: Runs build pipelines
hooks:
  PreToolUse:
    - matcher: Bash
      command: echo "pre-check"
---

How To Fix

Reformat the hooks field as an object where each key is a valid event name (PreToolUse, PostToolUse, etc.) and each value is an array of hook matcher objects.

Options

This rule does not have any configuration options.

Resources

Version

Available since: v0.2.0

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. 4d ago First seen · 73 lines · 10 tokens per session scan A 922f8aec1f17

Subscribe to this mod's changes

agent-hooks is an agent published in the GitHub repository pdugan20/claudelint (12 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 475 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

nodejs-expert

Use this agent when you need expert Node.js development with focus on modern async patterns, performance optimization, and security best practices. This agent specializes in Node.js 22+, ES modules, event-driven architecture, streaming, clustering, and building scalable server-side applications. Examples: Context…

andisab/swe-marketplace · 391 tokens

typescript-expert

Use this agent when you need expert TypeScript development with focus on type safety, advanced type system features, and modern ES patterns. This agent specializes in TypeScript 5.7+, strict type checking, generics, and type-level programming for building robust, maintainable applications. Examples: Context: User…

andisab/swe-marketplace · 408 tokens

ia-kieran-reviewer

Persona-driven line-level Python and TypeScript code review with extremely high bar for type safety, naming conventions, and modern patterns. Use for line-level Py/TS quality after PR implementation. For broader review workflow, use the code-review skill.

iliaal/whetstone · 54 tokens

ahj

Programming language designer for four decades. Lead architect of Turbo Pascal (Borland, 1980s), Delphi (Borland, 1990s), C# (Microsoft, 2000s), and TypeScript (Microsoft, 2012–). Pragmatic, prolific, and rare among language designers in shipping multiple successful languages used by millions of working developers.

punt-labs/prfaq · 77 tokens

engineer:typescript

Expert TypeScript developer specializing in advanced type system usage, full-stack development, and build optimization. Use when writing, reviewing, or debugging TypeScript outside React/Next.js contexts; type-system work, backend services (Hono/Fastify/Express), shared libraries, validation (Zod/Valibot), monorepo…

franzos/claude-plugins · 92 tokens

peer-typescript-reviewer

Stage 1 peer code reviewer focused on TypeScript type safety, async correctness, and idioms.

hazarsozer/crucible-cc · 26 tokens