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 softspark/ai-toolkit --skill clean-codegit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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/softspark/ai-toolkit/clean-code)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/clean-code"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/clean-code.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00050 | $0.01180 |
| Opus 5 | $0.00025 | $0.00590 |
| Sonnet 5 | $0.00010 | $0.00236 |
| Haiku 4.5 | $0.00005 | $0.00118 |
Grade A, and why
clean-code 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 5d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Skill
Core Principles
1. Meaningful Names
# Bad
def calc(a, b):
return a * b
# Good
def calculate_total_price(unit_price: float, quantity: int) -> float:
return unit_price * quantity
2. Single Responsibility
# Bad - does too much
def process_user(user_data):
validate(user_data)
user = create_user(user_data)
send_welcome_email(user)
log_creation(user)
return user
# Good - each function does one thing
def create_user(user_data: UserData) -> User:
return User(**user_data)
def onboard_user(user_data: UserData) -> User:
user = create_user(user_data)
send_welcome_email(user)
log_user_creation(user)
return user
3. DRY (Don't Repeat Yourself)
# Bad
def get_active_users():
return [u for u in users if u.status == "active"]
def get_active_admins():
return [u for u in users if u.status == "active" and u.role == "admin"]
# Good
def filter_users(status: str | None = None, role: str | None = None) -> list[User]:
result = users
if status:
result = [u for u in result if u.status == status]
if role:
result = [u for u in result if u.role == role]
return result
Code Organization
Keep modules focused. Order contents consistently: imports (stdlib, third-party, local), constants, public API, private helpers. Use clear visibility markers (underscore prefix in Python, access modifiers in other languages). Group related functionality into cohesive modules rather than dumping everything into a single file.
Anti-Patterns to Avoid
| Anti-Pattern | Problem | Solution |
|---|---|---|
| God class | Too many responsibilities | Split into smaller classes |
| Long methods | Hard to understand | Extract methods |
| Deep nesting | Complex control flow | Early returns, extract methods |
| Magic numbers | Unclear meaning | Use named constants |
| Bare except | Hides bugs | Catch specific exceptions |
| Mutable defaults | Shared state bugs | Use None and create inside |
What ships with it
5 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.
- 5d ago First seen · 127 lines · 50 tokens per session scan A 7f8fe6de3e7b
clean-code is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 1,180 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
go-code-reviewer
Review Go code with a defect-first approach using repository policy (constitution.md first, then AGENTS.md fallback). Use for code review, PR review, quality checks, risk analysis, and regression detection.
go-review-lead
Orchestrate a comprehensive Go code review by triaging code changes, dispatching vertical review skills (security, concurrency, error, logic, performance, quality, test, observability) as parallel agents, then consolidating results into a unified report. Use for full Go PR review or comprehensive code review. Replaces…
security-review
A code-security review guide that checks code changes, pull requests, or services for risks an attacker could exploit.
go-security-review
Review Go code for security vulnerabilities including OWASP Top 10, injection, auth/authz, crypto, secrets, SSRF, XSS, and input validation. Trigger when code involves SQL, user input, authentication, HTTP handlers, TLS, crypto, secrets, or file path operations. Use for security-focused code review of Go projects.
go-concurrency-review
Review Go code for concurrency safety and goroutine lifecycle issues including race conditions, deadlocks, goroutine leaks, mutex misuse, and context propagation. Trigger when code contains go func, channels, sync primitives, WaitGroup, errgroup, or goroutine lifecycle management. Use for concurrency-focused review of…
go-error-review
Review Go code for error handling correctness, nil safety, and failure-path integrity including ignored errors, missing wrapping, panic misuse, SQL/HTTP resource lifecycle, and transaction patterns. Trigger when code contains error returns, panic calls, sql.Rows, transactions, HTTP client/server code, or nil-sensitive…