askit-build-hook

askit-build-hook is a skill for Claude Code from product-on-purpose/agent-skills-toolkit. It costs 60 tokens per session (762 once invoked), scanned A, original, Apache-2.0.

A builder for event-driven hooks, which run when specified tool or session events occur and can block actions or add context.

In plain words
What is it for?
Use it to create or improve guards and context injectors for events such as tool use, session start, or session stop.
Why use it?
It helps enforce project rules or provide context automatically at the relevant event, with documented scope and failure behavior.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Codex.

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 agent-skills-toolkit plugin — 27 skills, 2 commands, 7 agents, 1 hook, 1 plugin shipped together

Good fit Use it to create or improve guards and context injectors for events such as tool use, session start, or session stop.

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 product-on-purpose/agent-skills-toolkit
Claude Code
/plugin install agent-skills-toolkit

Made for: Claude Code.

Or install agent-skills-toolkit, the plugin that ships this one along with the rest of its 27 skills, 2 commands, 7 agents, 1 hook, 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 askit-build-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook/github.svg)](https://agentmods.dev/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook)
Your own site
<a href="https://agentmods.dev/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook"><img src="https://agentmods.dev/badge/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook/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 askit-build-hook

Your own site · 80×15
<a href="https://agentmods.dev/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook"><img src="https://agentmods.dev/badge/skills/product-on-purpose/agent-skills-toolkit/askit-build-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00060 $0.00762
Opus 5 $0.00030 $0.00381
Sonnet 5 $0.00012 $0.00152
Haiku 4.5 $0.00006 $0.00076

Measured 10d ago against content hash ac9223d1a264, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

askit-build-hook 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 10d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/anti-wrong-exit-code.mjs, examples/golden-1-generated-file-guard.mjs, examples/golden-2-trailing-whitespace-formatter.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/askit-build-hook/SKILL.md · 33 lines

How it starts

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

askit-build-hook

Purpose

Author a plugin's hooks: event-driven enforcement or context injection (Standard sec 3.5). Hooks are an Advanced-tier capability. Two modes: create scaffolds a hook and its registration; improve raises an existing hook toward the bar (documentation, idempotency, actionable block messages). The hook SKILL is portable; what it authors is primarily a Claude capability (31 events) with a smaller Codex event set. Authoring depth is in references/authoring-hooks.md. Follows the shared builder contract (../../docs/reference/builder-pattern.md).

When to use

When the user asks to add, scaffold, author, or improve a hook (a PreToolUse / PostToolUse / Stop / SessionStart guard, a context injector, or any event-driven automation) for a plugin.

create mode

  1. Brief interview: the event (for example PreToolUse), the trigger or matcher, the hook type (command / http / mcp_tool / prompt / agent), the scope (what it guards or injects), and the failure behavior (fail-safe block vs warn). Skip the interview if these are in context.
  2. Author the hook and its registration. A plugin registers hooks in hooks/hooks.json using ${CLAUDE_PLUGIN_ROOT}; copy templates/hooks.json if none exists. Document the event, trigger, scope, and failure behavior (Standard sec 3.5 MUST).
  3. For a blocking hook (for example a PreToolUse deny), write an ACTIONABLE message that states what was blocked and how to proceed. Make the hook idempotent where the event can repeat.
  4. Register the hook in library.json components.hooks as { name, version, tier, status }.
  5. Targets: Claude supports 31 events. Codex supports a smaller set (PreToolUse, PostToolUse, Pre/PostCompact, SessionStart, SubagentStart/Stop, UserPromptSubmit, Stop, PermissionRequest). Verify current Codex plugin-hook ingestion at build time (a known caveat) and scope agent-targets accordingly.
  6. Assess with node scripts/evaluate.mjs . --json. Hook documentation and idempotency are graded at the Advanced tier; the deterministic hook check lands with Gold self-hosting (Phase 5).

Read the full file on GitHub · 33 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. 10d ago First seen · 33 lines · 60 tokens per session scan A ac9223d1a264

Subscribe to this mod's changes

askit-build-hook is a skill published in the GitHub repository product-on-purpose/agent-skills-toolkit (2 stars, last pushed today), licensed Apache-2.0. It adds 60 tokens to every session and 762 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.

Related

Other skills, from other repositories

modelchk

Size a task's run before spending it: the cheapest sufficient capability tier (fast, standard, frontier) and the reasoning effort within it, on a neutral scale that binds to whatever levels the model exposes. Use when work seems over- or under-powered, costly, ambiguous, or high-risk, or asks which model class and how…

LilMGenius/paperthin · 74 tokens

autobahn

Carve guardrail-adjacent items out of scope with safe alternatives before risk-adjacent work starts, then run the safe remainder at full strength in a fresh subagent that only ever sees the carved prompt, never the risky input. Use when a task includes stealth, scraping, privacy, IP, policy, licensing, security, or…

LilMGenius/paperthin · 129 tokens

re0-release

Walk a pending change through this repo's shipping and releasing checklist end to end, then tag and publish once confirmed. User-invoked: run it when you've decided to ship.

LilMGenius/paperthin · 40 tokens

ssotize

Audit and consolidate a fact that's scattered across places into one canonical source, after approval, and replace the rest with references. Use when asked to find duplication, check consistency, locate the source of truth, deduplicate, consolidate, unify, or establish SSOT across artifacts or platforms. Starts…

LilMGenius/paperthin · 78 tokens

feynman

Press a decision you just made until you can explain it to a skeptic in your own words, or surface the gap where you can't. The Feynman test aimed at a choice: understanding is cheapest to fake the moment after you decide, so a fresh critic presses for what you can't actually explain. Use right after picking an…

LilMGenius/paperthin · 81 tokens

macrothink

User-invoked read-only pass for checking whether the current direction is tunnel-visioned: strip the session's bait, fan out 2 to 5 same-model fresh reads, and report divergence first without treating convergence as proof.

LilMGenius/paperthin · 50 tokens