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.
git clone --depth 1 https://github.com/hculap/better-codeWrote 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/hculap/better-code/code-standards-enforcer)<a href="https://agentmods.dev/agents/hculap/better-code/code-standards-enforcer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/code-standards-enforcer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/hculap/better-code/code-standards-enforcer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/code-standards-enforcer.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00286 | $0.00965 |
| Opus 5.5 | $0.00114 | $0.00386 |
| Sonnet 5.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 1mo 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 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.
- 1mo ago 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 8d ago), licensed MIT. It adds 286 tokens to every session and 965 once invoked, about $0.0011 per session on Opus 5.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
phase-verifier
Fresh-context acceptance verifier dispatched by /implementation:implement-dispatch at phase boundaries and for post-phase source commits: checks a phase's binary acceptance criteria against the actual diff with the orchestrator's rationale withheld, and returns a per-criterion verdict grounded in direct evidence. Its…
compare-labeler
Read-only labeler for /docs-hygiene:compress compare: labels every difference between two versions of a skill directory and returns rows plus a VERDICT line. Dispatched by /docs-hygiene:compress; not intended for direct ad-hoc use.
review-docs
Documentation reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-docs with artifact paths. Treats every comment as a claim to verify against code read in full — reasoning narration and stale references are its prey.
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-rails
Rails conventions and architecture reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-rails with artifact paths. Ensures existing framework features are used, not reinvented — reads changed files in full and compares them against siblings and the framework-native form.
review-tests-minitest
Minitest test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-minitest in repos that test with minitest. Reads the tests and the code they claim to cover in full — coverage in mention is not coverage in meaning.