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.
git clone --depth 1 https://github.com/refo/claude-dev-helpersWrote 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.
[](https://agentmods.dev/commands/refo/claude-dev-helpers/setup-pre-commit)<a href="https://agentmods.dev/commands/refo/claude-dev-helpers/setup-pre-commit"><img src="https://agentmods.dev/badge/commands/refo/claude-dev-helpers/setup-pre-commit/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.
<a href="https://agentmods.dev/commands/refo/claude-dev-helpers/setup-pre-commit"><img src="https://agentmods.dev/badge/commands/refo/claude-dev-helpers/setup-pre-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.01294 |
| Opus 5.5 | $0.00017 | $0.00518 |
| Sonnet 5.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 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.
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.
- 1mo ago 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 3mo ago), licensed MIT. It adds 42 tokens to every session and 1,294 once invoked, about $0.0002 per session on Opus 5.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
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…