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 skills add hculap/better-code --skill code-standardsgit 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/skills/hculap/better-code/code-standards)<a href="https://agentmods.dev/skills/hculap/better-code/code-standards"><img src="https://agentmods.dev/badge/skills/hculap/better-code/code-standards/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/skills/hculap/better-code/code-standards"><img src="https://agentmods.dev/badge/skills/hculap/better-code/code-standards.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.00083 | $0.01353 |
| Opus 5.5 | $0.00033 | $0.00541 |
| Sonnet 5.5 | $0.00017 | $0.00271 |
| Haiku 4.5 | $0.00008 | $0.00135 |
Grade A, and why
Code Standards 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.
How it starts
The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Standards
Practical code quality standards with concrete "rules of thumb" - actionable thresholds rather than philosophy.
Core Principles
KISS (Keep It Simple, Stupid)
Prefer the simplest solution that works. Avoid "clever" code, magic, and over-engineering.
DRY (Don't Repeat Yourself)
Remove duplication when it's real duplication. Avoid premature abstraction.
YAGNI (You Aren't Gonna Need It)
Build features/abstractions only for real, current needs - not hypothetical future ones.
SRP (Single Responsibility Principle)
One module/class/function should have one reason to change.
Separation of Concerns
Keep UI, domain logic, persistence, integration, and config separated.
Principle of Least Surprise
Code should behave as a reader expects.
Fail Fast, Loudly
Validate inputs early; crash with clear errors rather than silently continuing.
Size Limits
File Size (Lines of Code)
| Level | LOC | Action |
|---|---|---|
| Target | 100-300 | Ideal |
| Soft limit | 400 | Consider splitting (warning) |
| Hard limit | 800 | Must refactor (critical) |
When a file grows too large, ask what responsibilities got mixed (SRP), then split by domain or feature.
Function/Method Size
| Level | LOC | Action |
|---|---|---|
| Target | 10-30 | Ideal |
| Soft limit | 50 | Review (warning) |
| Hard limit | 80 | Must refactor (critical) |
If a function cannot be named clearly, it's doing too much.
Cyclomatic Complexity
| Score | Action |
|---|---|
| >10 | Review required |
| >15 | Refactor strongly |
| >20 | Almost always too complex |
Language-Specific Thresholds
Different languages have different conventions. See references/language-thresholds.md for complete per-language limits.
Naming & Readability
- Prefer clear names over comments
- Use consistent vocabulary (e.g., "user" everywhere, not sometimes "customer")
- Avoid abbreviations unless universally known
- Boolean names:
isEnabled,hasAccess,shouldRetry
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 182 lines · 83 tokens per session scan A 4239e5d0867c
Code Standards is a skill published in the GitHub repository hculap/better-code (2 stars, last pushed 8d ago), licensed MIT. It adds 83 tokens to every session and 1,353 once invoked, about $0.0003 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 skills, from other repositories
audit-comment-residue
Read-only classifier that flags residue in code comments: history narration, plan or session references, conversational asides, ticket or PR back-references, origin notes, and workarounds with no link or removal condition. Use when asked to 'audit code comments' or report which comments only make sense with the chat…
improve
Codebase scan for module-level friction (shallow modules, seam leaks, locality gaps): an HTML candidate report, then a Design-It-Twice interview on the chosen one. Use when 'improve architecture', 'find deepening opportunities', 'shallow modules', 'design it twice', 'compare alternative interfaces', 'make code more…
review-pr
Multi-agent PR review with four modes (review, re-review, self-review, address-feedback) - spawns parallel subagents, saves diff to /tmp for context efficiency, supports file exclusion patterns.
code-review
CI code-review lane for a GitHub pull request. High-signal correctness and maintainability findings only, scoped out of security when a security lane exists. Use when: 'CI code review', 'claude-review lane', '/review:code-review', or a reusable workflow invokes the org code-review plugin command.
code-review-assistant
Automated code review with PR analysis, change summaries, quality checks, and code smell detection. Use this skill when reviewing pull requests, generating review comments, checking against best practices, identifying code smells, or providing refactoring guidance — even if they just say "review this" or "look at this…
semantic-validation
GenAI-powered semantic validation - detects outdated docs, version mismatches, and architectural drift.