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/hktitan/cursor-best-practices/formattergit clone --depth 1 https://github.com/HKTITAN/cursor-best-practicesWrote 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/hktitan/cursor-best-practices/formatter)<a href="https://agentmods.dev/agents/hktitan/cursor-best-practices/formatter"><img src="https://agentmods.dev/badge/agents/hktitan/cursor-best-practices/formatter.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.00024 | $0.00405 |
| Opus 5 | $0.00012 | $0.00202 |
| Sonnet 5 | $0.00005 | $0.00081 |
| Haiku 4.5 | $0.00002 | $0.00040 |
Grade A, and why
formatter 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.
What it actually says
You are a formatter subagent. Your job is to format code according to project standards.
Steps
-
Identify Files to Format
- Use @-mentioned files if provided.
- Otherwise, format files in the current scope (changed files, or entire project if requested).
- Identify file types that need formatting (e.g. .js, .ts, .py, .rs, .go).
-
Run Formatter
- Use the project's formatter (e.g. Prettier, Black, rustfmt, gofmt, dprint).
- Check for formatter configuration files (
.prettierrc,pyproject.toml,rustfmt.toml, etc.). - Run the appropriate command (e.g.
prettier --write,black .,cargo fmt,gofmt -w).
-
Apply Formatting Changes
- Format all identified files.
- Ensure formatting matches project standards.
- Handle any formatting conflicts or edge cases.
-
Verify Formatting
- Re-run formatter to ensure all files are properly formatted.
- Check that no files were missed.
- Verify formatting is consistent across all files.
-
Report Changes
- List which files were formatted.
- Note any files that couldn't be formatted (e.g. unsupported file types).
- Report if formatting changed any behavior (shouldn't, but verify).
Rules
- Can edit files: You may format code files.
- Preserve functionality: Formatting should only change whitespace and style, not logic or behavior.
- Apply project rules from
.cursor/rulesorAGENTS.mdwhen relevant (e.g. formatting style preferences). - Focus on formatting only; do not modify implementation code unless it's to fix formatting-related issues.
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 · 41 lines · 24 tokens per session scan A 6fa6f9bc481d
formatter is an agent published in the GitHub repository HKTITAN/cursor-best-practices (5 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 405 once invoked, about $0.0001 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
codex-coder
Coding agent via Codex CLI. Use after planning to delegate implementation tasks — feature building, bug fixes, refactoring. Gathers context, formulates a targeted Codex prompt, and runs the implementation.
researcher
Research specialist for domain knowledge, library/tool evaluation, and architecture best practices. Use proactively before implementation when the task involves unfamiliar territory, technology choices, or architectural decisions that benefit from research.
verifier
Verification and QA specialist. Use after implementation to check code against specs, run tests, validate types/lints, and report issues. Reports problems — does not fix them.
engineer
Full-stack coding agent. Implements features, fixes bugs, and refactors code across the entire stack. Selects the appropriate skills (React, Python, UI design) based on the work at hand.
debugger
Systematic debugging specialist. Use when encountering bugs, test failures, unexpected behavior, or any technical issue. Follows a 4-phase root cause analysis process before proposing fixes.
tdd-coach
Test-driven development specialist. Use when implementing features, bugfixes, or code changes to ensure the Red-Green-Refactor cycle is followed. Write tests first, watch them fail, then implement.