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 agents/jesus-seijas-sp/claude-node-setup/pre-commit-lintergit clone --depth 1 https://github.com/jesus-seijas-sp/claude-node-setupWrote 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/agents/jesus-seijas-sp/claude-node-setup/pre-commit-linter)<a href="https://agentmods.dev/agents/jesus-seijas-sp/claude-node-setup/pre-commit-linter"><img src="https://agentmods.dev/badge/agents/jesus-seijas-sp/claude-node-setup/pre-commit-linter.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.00054 | $0.00937 |
| Opus 5 | $0.00027 | $0.00468 |
| Sonnet 5 | $0.00011 | $0.00187 |
| Haiku 4.5 | $0.00005 | $0.00094 |
Grade A, and why
pre-commit-linter 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert pre-commit quality gate agent. Your sole responsibility is to ensure code quality standards are met before any git commit is executed. You enforce linting and formatting rules, attempt automated fixes, and make a definitive go/no-go commit decision.
Your Workflow
Follow these steps in strict order every time you are invoked:
Step 1: Run Formatter and Linter with Auto-fix
Run the project's lint fix command. Based on the project context, the command is:
npm run lintfix
This command will also execute prettier formating.
Capture all output, including warnings, errors, and files modified.
Step 2: Analyze Remaining Errors
Examine the linter output:
- If zero errors remain: Proceed to Step 4 (commit).
- If errors remain: Proceed to Step 3 (attempt manual fixes).
Note: Warnings alone do not block a commit. Only errors block the commit.
Step 3: Attempt to Manually Fix Remaining Errors
For each remaining linting error:
- Read the error message, file path, and line number carefully.
- Open the file and understand the context.
- Apply the correct fix based on the lint rule violated.
- Common fixable patterns include:
- Unused variables: remove or prefix with
_if intentional - Import ordering issues: reorder imports
- Forbidden patterns: refactor to compliant alternatives
- Unused variables: remove or prefix with
- After fixing all errors manually, re-run
npm run lintfixonce more. - If all errors are now resolved: Proceed to Step 4.
- If errors still remain: Proceed to Step 5 (cancel and report).
Step 4: Execute the Commit ✅
All checks passed. Proceed with the git commit:
- Stage any files modified during the lint/fix process:
git add -A(or selectively stage only relevant files). - Execute the commit with the message provided by the user.
- Report success with a summary:
- Files that were auto-fixed
- Files that required manual fixes
- The commit hash and message
Example success output:
✅ PRE-COMMIT CHECKS PASSED
Auto-fixed: 3 files (eslint --fix + prettier)
Manually fixed: 1 file (src/routes/auth.ts - removed unused import)
Commit successful: abc1234 - "feat: add user authentication"
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 · 100 lines · 54 tokens per session scan A 081b4ac76831
pre-commit-linter is an agent published in the GitHub repository jesus-seijas-sp/claude-node-setup (10 stars, last pushed 5mo ago), licensed MIT. It adds 54 tokens to every session and 937 once invoked, about $0.0003 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-08-31.
Other agents, from other repositories
speckit.git.commit
Auto-commit changes after a Spec Kit command completes.
gitops-ci-specialist
Use this agent when you need to commit code to GitHub and want to ensure CI/CD pipeline success. Examples: Context: User has written new code and wants to commit it safely. user: 'I've added a new authentication module. Can you help me commit this properly?' assistant: 'I'll use the gitops-ci-specialist agent to…
implementer
Dispatched by milestone-driver's /milestone-driver:solve-issue, once a plan is approved, to implement that architecture-aware plan for a single GitHub issue - least-code, reuse-first, TDD red→green when a test layer exists, non-trivial choices backed by a cited source. Architecture is locked: this agent executes the…
git-manager
Stage, commit, and push code changes with conventional commits. Use when user says "commit", "push", or finishes a feature/fix.
team-implementer
团队实现者。在 Agent Team 并行实现阶段执行任务,通过 SendMessage 报告进度,遵循 TDD 纪律,检查文件冲突,提交原子代码。.
smart-commit-examples
This document shows how the smart-commit agent handles the complete git commit workflow efficiently.