hook-stocktake

hook-stocktake is a skill for Claude Code from shimo4228/claude-harness. It costs 35 tokens per session (1,968 once invoked), scanned A, original, MIT.

A checklist for reviewing the automated hooks in a coding-agent setup. Hooks are scripts that run automatically for certain events and may block work or read repository-controlled data.

In plain words
What is it for?
Use it to inspect hook scripts and their settings, assess their evidence and test coverage, and review their contribution to the setup's security risk.
Why use it?
It helps find hooks that are miswired, unnecessary, untested, outdated, or risky. Each hook receives a decision such as keep, improve, merge, or retire.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Good fit Use it to inspect hook scripts and their settings, assess their evidence and test coverage, and review their contribution to the setup's security risk.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shimo4228/claude-harness/hook-stocktake
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.

Any agent
npx skills add shimo4228/claude-harness --skill hook-stocktake
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

Made for: Claude Code.

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-stocktake

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/hook-stocktake"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/hook-stocktake.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,968 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.00035 $0.01968
Opus 5.5 $0.00014 $0.00787
Sonnet 5.5 $0.00007 $0.00394
Haiku 4.5 $0.00003 $0.00197

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

Security

Grade A, and why

hook-stocktake 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 16d 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.

skills/hook-stocktake/SKILL.md · 132 lines

How it starts

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

hook-stocktake — Hook Quality Audit

Evaluate every hook of the harness and assign each a verdict: Keep / Improve / Update / Merge / Dissolve / Retire. A hook's cost is unlike a skill's or a rule's: it runs unattended on every matching event, it can block, and it reads repo-controlled data (paths, commit metadata, tool input). So the questions are wiring, evidence that it still earns its place, test coverage, and its share of the harness threat surface (rule security.md).

Roots. <harness> below is the harness this audit covers: ~/.claude by default, or a repository's .claude/ when skill harness-stocktake runs in project mode (its Roots section maps the paths, names the evidence that is n/a there, and says which convention checks apply). The ledger <ledger> belongs to that harness: ${CLAUDE_SKILL_DIR}/results.json when this skill's directory is inside <harness> (the harness carries its own copy of the skill), else <harness>/stocktake/hook-stocktake.json (an installed plugin, or project mode). Either way it is committed with the harness's other changes on the apply branch.

The paths and conventions below are the author's harness layout. In another setup, map each target to where that setup keeps its hooks, and record a check whose input the setup does not have (harness_lint.py, hooks/README.md, tests/*.bats, the usage-logging hooks, rule security.md) as —, not as a No.

Phase 1 — Inventory and wiring (deterministic)

Build the inventory with throwaway python3 / jq over the files, and state the counts up front:

  • Targets: <harness>/hooks/*.sh and <harness>/scripts/hooks/*.py (in a repository, every script the settings commands call). hooks/_*-common.sh are shared libraries: list which hooks source each one (grep -l 'source.*_<name>' hooks/*.sh)
  • Wiring: from <harness>/settings.json hooks, one row per (event, matcher, command). Mark every target no command references (orphan) and every command that carries logic beyond invoking a script (CLAUDE.md: hook logic lives in scripts). Commands whose script is missing (dangling) come from the harness's lint script when it has one (<harness>/scripts/hooks/harness_lint.py); otherwise — and in project mode, or without Bash — check that each called script exists with Glob. scripts/hooks/*.py are called from hooks or from other scripts; resolve their callers with grep
  • Documentation: hooks/README.md — the Active Hooks tables against the wiring rows, and its Shared list against hooks/_*-common.sh (missing and phantom rows)
  • Tests: the tests/*.bats files that exercise each hook (grep -l <script name> tests/*.bats)
  • Fire evidence: only the logging hooks leave a count — log-skill-usage.sh and log-agent-usage.sh append to <harness>/metrics/skill-usage.jsonl / agent-usage.jsonl, which count logged skill and agent events (log-skill-usage.sh is wired on two events), not every run of a hook. Every other hook gets —, which is not zero. A metrics/*.jsonl that no hook or script writes any more is an integrity finding

Read the full file on GitHub · 132 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. 16d ago Changed · +1 lines c204e0bdb0da
  2. 29d ago First seen · 131 lines · 35 tokens per session scan A cdb9f0246620

Subscribe to this mod's changes

hook-stocktake is a skill published in the GitHub repository shimo4228/claude-harness (4 stars, last pushed 7d ago), licensed MIT. It adds 35 tokens to every session and 1,968 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-11-01.

Related

hook-stocktake compared with skills from other repositories

hook-stocktake next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hook-stocktakeshimo4228/claude-harnessSkill47d agoMITA35Claude Code
agent-adoption-triageshimo4228/agent-adoption-triageSkill21mo agoMITA143Claude Code
git-commitadongwanai/learn-workbuddySkill5631mo agoMITA0Claude Code, Codex
pi-triagesky-valley/piSkill94yesterdayMITA57Claude Code
pi-parity-reviewsky-valley/piSkill94yesterdayMITA54Claude Code
zodanivar/zod-skillSkill24yesterdayMITA217Claude Code, Codex
trailhead-chartToRvaLDz/trailheadSkill37yesterdayMITA138Claude Code