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 skills/fmind/dot/lefthooknpx skills add fmind/dot --skill lefthookgit clone --depth 1 https://github.com/fmind/dotWrote 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/skills/fmind/dot/lefthook)<a href="https://agentmods.dev/skills/fmind/dot/lefthook"><img src="https://agentmods.dev/badge/skills/fmind/dot/lefthook.svg" alt="Measured on agentmods" 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 | $0.00044 | $0.00916 |
| Opus 5 | $0.00022 | $0.00458 |
| Sonnet 5 | $0.00009 | $0.00183 |
| Haiku 4.5 | $0.00004 | $0.00092 |
Grade A, and why
lefthook 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lefthook
Thin git hooks that delegate every command to a mise run task so hooks and CI run identical checks; lefthook decides when, mise owns what.
Workflow
- Install: pin
lefthookvia mise or the stack's dev dependencies (go-stack, python-stack, typescript-stack). - Configure: create
lefthook.ymlat the repository root from the template below; reference files live in go-stack and python-stack. - Activate:
lefthook install, wired intomise run install.
Template
output: [summary, failure, execution_out] # quiet commits: no version banner, no successful-step noise
pre-commit:
parallel: false
commands:
format:dprint:
glob: "*.{json,md,toml,yaml,yml}"
priority: 10
run: mise run format:dprint {staged_files}
stage_fixed: true
format:<lang>: # one per language: format:go / format:python / format:templ ...
glob: "*.<ext>"
priority: 10
run: mise run format:<lang> {staged_files}
stage_fixed: true
check:leaks: # staged secret scan: history-mode gitleaks in `check` cannot see the incoming commit
priority: 20
run: mise run check:leaks --staged
check:
priority: 30
run: mise run check
pre-push:
commands:
test:
run: mise run test
Principles
- pre-commit (fast): format staged files, then the static checks and the staged secret scan.
- pre-push (slower): the test suite.
- post-commit (optional): rebuild and redeploy a binary built from the repo's own sources, guarded to commits that touch a build input; git ignores its exit status, so it never blocks a commit.
- Delegate, don't duplicate: every command is
mise run <task>and its name mirrors the task; never inline tool commands. - Staged formatters, whole-tree checks: formatters take
{staged_files}and restage fixes withstage_fixed: true;checkandtesttake no files.
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 · 69 lines · 44 tokens per session scan A e50cf13d7154
lefthook is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 916 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
mise
Configure pinned mise tools and canonical install, format, check, test, build, and watch tasks shared by hooks and CI.
dependabot
Automated dependency updates using GitHub Dependabot — configuration, ecosystem mapping, and validation.
git-add-commit-push
Stage, commit (Conventional Commits), and push in one flow, auto-healing lefthook pre-commit and pre-push failures. Use when committing and pushing work end-to-end.
lefthook
Canonical lefthook git-hooks setup — pre-commit (format, check, secret scan) and pre-push (test), each delegating to mise run tasks. Use when configuring or debugging git hooks.
conventional-commit
Write a Conventional Commits subject for the staged changes and commit them. Use when committing staged work with a typed, scoped message.
github-actions
Configure GitHub Actions CI/CD so workflows run the same mise format, check, test, and build gate as local hooks; lint with actionlint and Zizmor; use keyless deploy templates.