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 agentmods add commands/refo/claude-dev-helpers/setup-pre-commitgit clone --depth 1 https://github.com/refo/claude-dev-helpersWhat 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 | $0.00042 | $0.01294 |
| Opus 5 | $0.00021 | $0.00647 |
| Sonnet 5 | $0.00008 | $0.00259 |
| Haiku 4.5 | $0.00004 | $0.00129 |
Grade B, and why
setup-pre-commit scanned grade B with 1 finding 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 yesterday.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Project helpers config (if present): !`cat .claude/helpers.json 2>/dev/null || echo "no helpers.json — detect stack from project files"` How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup Pre-Commit
Context
- Project helpers config (if present): !
cat .claude/helpers.json 2>/dev/null || echo "no helpers.json — detect stack from project files" - Lockfiles and manifests: !
ls -1 package.json bun.lock bun.lockb pnpm-lock.yaml yarn.lock package-lock.json pyproject.toml uv.lock poetry.lock requirements.txt go.mod Cargo.toml Gemfile mix.exs composer.json 2>/dev/null || true - Existing config files: !
ls -1 biome.json .eslintrc* .prettierrc* ruff.toml .pre-commit-config.yaml lefthook.yml lefthook.yaml .husky 2>/dev/null || true
Goal
Install a pre-commit hook that runs (in this order):
- Format + lint on staged files
- Typecheck (if the language has one)
- Tests (fast subset if possible, otherwise full suite)
The goal is to catch bad commits before they happen, without slowing down git commit so much that the user starts using --no-verify.
Process
1. Detect the stack and pick the right tools
Read helpers.json first. If present, use the values from tooling.preCommitFramework, tooling.linter, commands.test, commands.typecheck, commands.lint, commands.format. Skip detection.
Otherwise, detect from the project files shown in Context above and pick the conventional stack:
| Detected | Pre-commit framework | Linter / Formatter | Typecheck | Test |
|---|---|---|---|---|
bun.lock(b) |
husky | biome | tsc --noEmit (via bun run typecheck) |
bun test |
pnpm-lock.yaml |
husky + lint-staged | biome or eslint+prettier | tsc --noEmit |
pnpm test |
yarn.lock / package-lock.json |
husky + lint-staged | eslint + prettier (or biome) | tsc --noEmit |
npm test / yarn test |
pyproject.toml + uv.lock |
pre-commit framework |
ruff (lint + format) | mypy or pyright (if configured) | pytest |
pyproject.toml + poetry.lock |
pre-commit framework |
ruff or black + flake8 | mypy or pyright | pytest |
go.mod |
lefthook (or native git hooks) | gofmt, go vet, golangci-lint |
go build ./... |
go test ./... |
Cargo.toml |
lefthook (or native git hooks) | cargo fmt, cargo clippy |
cargo check |
cargo test |
Gemfile |
overcommit or pre-commit |
rubocop | (none — Ruby) | bundle exec rspec |
mix.exs |
native git hooks | mix format, credo |
mix dialyzer (if installed) |
mix test |
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.
- yesterday First seen · 87 lines · 42 tokens per session scan B deebbb848ec0
setup-pre-commit is a command published in the GitHub repository refo/claude-dev-helpers (2 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 1,294 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.