clean-code-principles

clean-code-principles is a skill for Claude Code, Codex from AsyrafHussin/agent-skills. It costs 67 tokens per session (1,744 once invoked), scanned A, original, MIT.

A reference guide to common software design principles, including SOLID, avoiding repetition, keeping solutions simple, and using design patterns.

In plain words
What is it for?
Reviewing architecture, checking code quality, refactoring, and discussing how software should be organised.
Why use it?
It gives developers shared rules for making code easier to understand, maintain, and change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 93repo +4 1mo ago A scan Socket: passSnyk: passSkillSpector: pass 67 tokens original MIT

Good fit Reviewing architecture, checking code quality, refactoring, and discussing how software should be organised.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asyrafhussin/agent-skills/clean-code-principles
Install

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.

Any agent
npx skills add AsyrafHussin/agent-skills --skill clean-code-principles
Clone the repo
git clone --depth 1 https://github.com/AsyrafHussin/agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for clean-code-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/clean-code-principles/github.svg)](https://agentmods.dev/skills/asyrafhussin/agent-skills/clean-code-principles)
Your own site
<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/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.

agentmods 80×15 button for clean-code-principles

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01744
Opus 5.5 $0.00027 $0.00698
Sonnet 5.5 $0.00013 $0.00349
Haiku 4.5 $0.00007 $0.00174

Measured 1mo ago against content hash 6d3a1fa5372f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 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.

skills/clean-code-principles/SKILL.md · 214 lines

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 Principle
  • solid-ocp - Open/Closed Principle
  • solid-lsp - Liskov Substitution Principle
  • solid-isp - Interface Segregation Principle
  • solid-dip - Dependency Inversion Principle

2. Core Principles (CRITICAL)

  • core-dry - Don't Repeat Yourself
  • core-kiss - Keep It Simple, Stupid
  • core-yagni - You Aren't Gonna Need It
  • core-separation-of-concerns - Separate different responsibilities
  • core-composition-over-inheritance - Favor composition
  • core-law-of-demeter - Principle of least knowledge
  • core-fail-fast - Detect and report errors early
  • core-encapsulation - Hide implementation details

3. Design Patterns (HIGH)

  • pattern-factory - Factory pattern for object creation
  • pattern-strategy - Strategy pattern for algorithms
  • pattern-repository - Repository pattern for data access
  • pattern-decorator - Decorator pattern for behavior extension
  • pattern-observer - Observer pattern for event handling
  • pattern-adapter - Adapter pattern for interface conversion
  • pattern-facade - Facade pattern for simplified interfaces
  • pattern-dependency-injection - DI for loose coupling

Read the full file on GitHub · 214 lines

Changes

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.

  1. 1mo ago First seen · 214 lines · 67 tokens per session scan A 6d3a1fa5372f

Subscribe to this mod's changes

clean-code-principles is a skill published in the GitHub repository AsyrafHussin/agent-skills (93 stars, last pushed 1mo ago), licensed MIT. It adds 67 tokens to every session and 1,744 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-30.

Related

Other skills, from other repositories

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…

AgriciDaniel/anti-slop · 161 tokens

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 …

LeonardNJU/code-humanizer · 100 tokens

slop-cop

Audit, grade, rewrite, and issue funny evidence-backed tickets for generic AI-slop patterns in prose, social posts, UI/design, and code. Use when asked to de-slop writing, humanize AI copy, grade a draft, review a landing page or generated interface, remove vague claims and repetitive rhetoric, inspect AI-written code…

howshannon/slop-cop · 101 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

new-skill

Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…

hyhmrright/brooks-lint · 145 tokens

dorodango

Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.

athola/claude-night-market · 31 tokens