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/greyhaven-ai/sygaldry/pre-commit-fixgit clone --depth 1 https://github.com/greyhaven-ai/sygaldryWrote 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/greyhaven-ai/sygaldry/pre-commit-fix)<a href="https://agentmods.dev/commands/greyhaven-ai/sygaldry/pre-commit-fix"><img src="https://agentmods.dev/badge/commands/greyhaven-ai/sygaldry/pre-commit-fix.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.00000 | $0.00864 |
| Opus 5 | $0.00000 | $0.00432 |
| Sonnet 5 | $0.00000 | $0.00173 |
| Haiku 4.5 | $0.00000 | $0.00086 |
Grade A, and why
pre-commit-fix 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Run pre-commit workflow and systematically fix all errors found
-
Check the current git status to understand what files we're checking:
- Run
git statusto see modified files - Note which files will be checked by pre-commit
- Run
-
Run initial pre-commit check to see all issues:
- Execute
task pre-commitorpre-commit run --all-files - Capture and analyze the output
- Execute
-
Fix issues in this order for efficiency: a) Auto-fixable formatting issues (these are quick wins):
- Run
task formatto fix formatting with ruff - Run
task lintto fix auto-fixable linting issues
b) Import issues:
- Ruff with isort will fix import ordering
- Remove unused imports if any remain
c) JSON/YAML formatting:
- Pre-commit will auto-format JSON files
- Fix any YAML syntax errors
d) File issues:
- Fix missing newlines at end of files
- Fix mixed line endings
- Remove any debug statements
e) Type checking errors (if any):
- Fix MyPy errors by adding type annotations
- Handle missing imports for type checking
- Run
-
After each category of fixes, run pre-commit again to verify:
pre-commit run --all-files- This ensures we haven't introduced new issues
-
Final verification:
- Run all tests:
task test - Ensure no functionality was broken by the fixes
- Run all tests:
-
Provide summary of all changes made
-
If any errors persist that can't be auto-fixed:
- Provide detailed explanation of each error
- Show exact code locations and suggested fixes
- Explain why manual intervention might be needed
Error Pattern Reference
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.
- 4d ago First seen · 102 lines · 0 tokens per session scan A 2e16bae7cbf7
pre-commit-fix is a command published in the GitHub repository greyhaven-ai/sygaldry (11 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 864 tokens. 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-30.
Other commands, from other repositories
checkpoint
Create a checkpoint by staging the changes you have made using git. usage: git [-v | --version] [-h | --help] [-C ] [-c = ] [--exec-path[= ]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir= ] [--work-tree= ] [--namespace= ] [--super-prefix= ]…
commit
智能创建 git 提交,分析代码变更并生成符合项目规范的提交信息.
git
Unified git operations - commits, pull requests, and issue management.
ship
Commit staged changes, push, and create PR.
changelog
Summarize staged git changes into a concise changelog/commit message.
commit
Create an atomic git commit with conventional message.