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 rules/hbarbosa02/alaz-mcp-nestjs/commit-patterngit clone --depth 1 https://github.com/hbarbosa02/alaz-mcp-nestjsWhat 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.00699 | $0.00699 |
| Opus 5 | $0.00349 | $0.00349 |
| Sonnet 5 | $0.00140 | $0.00140 |
| Haiku 4.5 | $0.00070 | $0.00070 |
Grade A, and why
commit-pattern 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 2d 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 — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Commit pattern and pre-commit analysis
When to use this
Apply before every git commit (human or agent): validate the message and that pre-commit analysis has passed (or will pass) via npm run precommit.
Commit message — Conventional Commits
Format (required):
<type>(<optional-scope>): <imperative subject>
- type (pick one):
feat|fix|docs|style|refactor|test|chore|ci|perf|build - scope (optional): area in lower kebab-case, e.g.
mcp,git-context,e2e - subject: imperative mood, no trailing period, ≤ 72 characters; describe what and why in a single line
Body (optional, after a blank line): explain motivation, trade-offs, or follow-ups. Wrap at ~72 chars. Reference issues, e.g. Closes #12.
Footer (optional): BREAKING CHANGE: ... or Refs #id.
Examples
fix(mcp): return empty list when project root is missing
feat: add get-recent-changes prompt wrapper for Cursor clients
Anti-patterns
- ❌
WIP/fix stuff/ only a ticket id as subject - ❌ Vague:
update,changes,misc - ❌ Ending the subject with
.
Pre-commit analysis (automation + checklist)
Automated (required when hook is active): core.hooksPath points to .githooks. On commit, the hook runs npm run precommit (see package.json).
Manual if hook failed or skipped: run the same: npm run precommit
Checklist (must be satisfied before pushing)
- Lint:
npm run lint— no new ESLint errors in{src,test}/**/*.ts - Format:
npm run format:check— Prettier is clean - Tests:
npm test— relevant unit tests pass; for risky changes, alsonpm run test:e2e - Scope: commit contains a single logical change; unrelated edits belong in a separate commit
- Secrets / noise: no
.envkeys, tokens, or large generated artifacts; no accidentalnode_modulesordist/ - Docs: if behavior changed, user-visible docs (e.g.
README.md,docs/) updated in the same PR when required
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.
- 2d ago First seen · 67 lines · 699 tokens per session scan A ce411cb44aa1
commit-pattern is a cursor rule published in the GitHub repository hbarbosa02/alaz-mcp-nestjs (2 stars, last pushed 4mo ago), licensed MIT. It adds 699 tokens to every session, about $0.0035 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 cursor rules, from other repositories
git-staging
Git commit best practices - avoid git add -A, stage files explicitly, always sign off.
commit-message-rules
Git commit message 生成規則 - 使用 Gitmoji 規範.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
cursor-markdown-file-links
Review markdown in Cursor — path-only file links (no :line in link targets).