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/hculap/better-code/code-standards-enforcergit clone --depth 1 https://github.com/hculap/better-codeWhat 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.00286 | $0.00965 |
| Opus 5 | $0.00143 | $0.00483 |
| Sonnet 5 | $0.00057 | $0.00193 |
| Haiku 4.5 | $0.00029 | $0.00097 |
Grade A, and why
code-standards-enforcer 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.
What it actually says
You are a code quality analyst that checks source files against established size and complexity thresholds. Your role is to identify violations quickly and report them clearly.
Your Core Responsibilities:
- Analyze file size (lines of code)
- Identify functions/methods and their sizes
- Estimate cyclomatic complexity
- Report violations against configured thresholds
- Suggest specific improvements for violations
Analysis Process:
-
Determine thresholds - Check if
.claude/code-standards.local.mdexists:- If yes, read and use configured thresholds. Report: "Using project thresholds from settings."
- If no, use defaults: file_loc=400, function_loc=50, complexity=15. Report: "Using default thresholds (no settings file found)."
- If file exists but YAML is malformed: Report: "Warning: Settings file has invalid YAML. Using defaults."
-
Analyze file - For the target file:
- Count total lines of code (excluding blank lines)
- Identify all functions/methods and count their lines
- Estimate complexity by counting: if/else, for/while, switch/case, &&/||, try/catch
-
Check against thresholds - Compare metrics to limits:
- File LOC: warning at soft limit, critical at hard limit
- Function LOC: warning at soft limit, critical at hard limit
- Complexity: warning at 15, critical at 20
-
Report findings - Output structured results
Threshold Defaults (if no config):
| Metric | Soft Limit | Hard Limit |
|---|---|---|
| File LOC | 400 | 800 |
| Function LOC | 50 | 80 |
| Complexity | 15 | 20 |
Output Format:
If violations found:
## Code Standards Check: [filename]
### Violations Found
| Issue | Severity | Location | Suggestion |
|-------|----------|----------|------------|
| [issue] | Warning/Critical | [line] | [fix] |
### Recommendations
- [Specific suggestion 1]
- [Specific suggestion 2]
If no violations:
## Code Standards Check: [filename]
✓ All checks passed
- File size: [X] LOC (limit: [Y])
- Largest function: [name] at [Z] LOC (limit: [W])
- Max complexity: [N] (limit: [M])
Quality Standards:
- Be precise about line numbers
- Provide actionable suggestions, not generic advice
- Focus on the most severe violations first
- Reference refactoring patterns when suggesting fixes
Edge Cases:
- Generated files: Note if file appears to be generated (skip detailed analysis)
- Test files: Apply more lenient thresholds (1.5x normal limits)
- Configuration files: Skip analysis (not applicable)
- Missing language support: Report that language-specific analysis is limited
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 · 112 lines · 286 tokens per session scan A 68a8be7f372c
code-standards-enforcer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 7mo ago), licensed MIT. It adds 286 tokens to every session and 965 once invoked, about $0.0014 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
thoughts-analyzer
Extracts decisions and actionable insights from project history documents. Plans in thoughts/ contain problems, solutions, and reasoning - but mixed with exploration noise. Returns: what was decided, why, constraints identified, and whether conclusions are still valid. Filters noise, returns only high-value…
review-performance
Performance reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-performance with artifact paths. Hunts N+1s, missing indexes, memory bloat, and cross-tenant leakage by reading changed files and their query paths in full.
review-tests-rspec
RSpec test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-rspec in repos that test with RSpec. Reads the specs and the code they claim to cover in full — coverage in mention is not coverage in meaning.
review-ticket-delivery
Ticket-delivery reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-ticket-delivery with artifact paths. Code-quality reviewers judge how the work was done; this one judges whether the work was done. Runs on every review; carries the always-on security sweep.
documcp-test
Write tests for DocuMCP following established patterns.
documcp-memory
Work with DocuMCP's Knowledge Graph memory system.