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 skills/asyrafhussin/agent-skills/clean-code-principlesnpx skills add AsyrafHussin/agent-skills --skill clean-code-principlesgit clone --depth 1 https://github.com/AsyrafHussin/agent-skillsWrote 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/asyrafhussin/agent-skills/clean-code-principles)<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/clean-code-principles"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/clean-code-principles.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.1 | $0.00067 | $0.01744 |
| Opus 5 | $0.00034 | $0.00872 |
| Sonnet 5 | $0.00013 | $0.00349 |
| Haiku 4.5 | $0.00007 | $0.00174 |
Grade A, and why
clean-code-principles 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 6d 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 — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Principles
Fundamental software design principles, SOLID, design patterns, and clean code practices. Language-agnostic guidelines for writing maintainable, scalable software.
When to Apply
Reference these guidelines when:
- Designing new features or systems
- Reviewing code architecture
- Refactoring existing code
- Discussing design decisions
- Improving code quality
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | SOLID Principles | CRITICAL | solid- |
| 2 | Core Principles | CRITICAL | core- |
| 3 | Design Patterns | HIGH | pattern- |
| 4 | Code Organization | HIGH | org- |
| 5 | Naming & Readability | MEDIUM | name- |
| 6 | Functions & Methods | MEDIUM | func- |
| 7 | Comments & Documentation | LOW | doc- |
Quick Reference
1. SOLID Principles (CRITICAL)
solid-srp- Single Responsibility Principlesolid-ocp- Open/Closed Principlesolid-lsp- Liskov Substitution Principlesolid-isp- Interface Segregation Principlesolid-dip- Dependency Inversion Principle
2. Core Principles (CRITICAL)
core-dry- Don't Repeat Yourselfcore-kiss- Keep It Simple, Stupidcore-yagni- You Aren't Gonna Need Itcore-separation-of-concerns- Separate different responsibilitiescore-composition-over-inheritance- Favor compositioncore-law-of-demeter- Principle of least knowledgecore-fail-fast- Detect and report errors earlycore-encapsulation- Hide implementation details
3. Design Patterns (HIGH)
pattern-factory- Factory pattern for object creationpattern-strategy- Strategy pattern for algorithmspattern-repository- Repository pattern for data accesspattern-decorator- Decorator pattern for behavior extensionpattern-observer- Observer pattern for event handlingpattern-adapter- Adapter pattern for interface conversionpattern-facade- Facade pattern for simplified interfacespattern-dependency-injection- DI for loose coupling
What ships with it
28 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.
- AGENTS.md 14 KB
- metadata.json 10 KB
- README.md 3.6 KB
- rules/_sections.md 9.5 KB
- rules/_template.md 4.8 KB
- rules/core-composition.md 7.3 KB
- rules/core-dry-extraction.md 8.8 KB
- rules/core-dry-single-source.md 7.9 KB
- rules/core-dry.md 7.6 KB
- rules/core-encapsulation.md 9.4 KB
- rules/core-fail-fast.md 9.4 KB
- rules/core-kiss-readability.md 5.6 KB
- rules/core-kiss-simplicity.md 6.5 KB
- rules/core-law-demeter.md 7.5 KB
- rules/core-separation-concerns.md 9.8 KB
- rules/core-yagni-abstractions.md 7.3 KB
- rules/core-yagni-features.md 5.8 KB
- rules/pattern-repository.md 9.3 KB
- rules/solid-dip-abstractions.md 9.6 KB
- rules/solid-dip-injection.md 11 KB
- rules/solid-isp-clients.md 7.9 KB
- rules/solid-isp-interfaces.md 9.5 KB
- rules/solid-lsp-contracts.md 5.1 KB
- rules/solid-lsp-preconditions.md 8.2 KB
- rules/solid-ocp-abstraction.md 7.8 KB
- rules/solid-ocp-extension.md 6.1 KB
- rules/solid-srp-class.md 4.0 KB
- rules/solid-srp-function.md 6.3 KB
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.
- 6d ago First seen · 214 lines · 67 tokens per session scan A 6d3a1fa5372f
clean-code-principles is a skill published in the GitHub repository AsyrafHussin/agent-skills (72 stars, last pushed 9d ago), licensed MIT. It adds 67 tokens to every session and 1,744 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-08-30.
Other skills, from other repositories
code-humanizer
Use when AI-written code needs structural cleanup or when implementing a change under a guard against AI coding slop — duplicated reimplementations of existing helpers, try-import fallbacks, broad exception swallowing, speculative abstraction layers, v2 copies, dead "for future use" code, narrating comments …
slop-review
Read-only slop review of prose, documentation, reports, agent output, commit messages or PR descriptions. Use when someone asks what is wrong with a draft, asks for an editorial or quality review, asks whether text is padded, vague, puffed up, unsourced or hollow, or asks whether writing "sounds like AI". Produces a…
slop-verify
Verification pass for citations, links, package names and vendor residue. Use when someone asks whether the sources in a document are real, asks to check DOIs, ISBNs, arXiv IDs or URLs, asks whether a cited source actually supports the claim attached to it, asks to check that imported packages exist, or asks to strip…
anti-slop-brain
Scaffold and operate Anti-Slop Brain, a source-cited Obsidian brain for detection and repair of AI slop in prose, code, documentation, and agent output, grounded in corpus evidence rather than authorship detection. Use when the user says "anti-slop-brain", "Anti-Slop Brain", "create a detection and repair of AI slop…
anti-slop
Router for the anti-slop toolkit. Use when someone asks to review, clean, de-slop, humanize, or quality-check prose, documentation, code, commit messages, PR descriptions, or agent output, or asks whether some writing "sounds like AI". Also use for verifying citations, DOIs, links and imported package names, for…
slop-code
Slop review and repair for source code, tests, configuration, generated documentation, README files, commit messages and pull request descriptions. Use when someone asks to review generated or agent-written code for quality, asks whether a diff is padded or ceremonial, asks about hallucinated or slopsquatted imports…