Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add ruslan-korneev/claude-plugins/plugin install pythonWrote 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/ruslan-korneev/claude-plugins/clean-code-patterns)<a href="https://agentmods.dev/skills/ruslan-korneev/claude-plugins/clean-code-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/clean-code-patterns/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/ruslan-korneev/claude-plugins/clean-code-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/clean-code-patterns.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.00000 | $0.01768 |
| Opus 5.5 | $0.00000 | $0.00707 |
| Sonnet 5.5 | $0.00000 | $0.00354 |
| Haiku 4.5 | $0.00000 | $0.00177 |
Grade A, and why
clean-code-patterns 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 3mo 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 — 325 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Patterns
Clean code principles for Python. Code should read like well-written prose.
Triggers
Use this skill when:
- Code is hard to read or understand
- Function/class does too much
- Refactoring is needed
- Code review revealed issues
- Questions about SOLID, DRY, KISS
SOLID
More details: ${CLAUDE_PLUGIN_ROOT}/skills/clean-code-patterns/references/solid.md
S — Single Responsibility
# Bad — class does everything
class UserService:
def create_user(self, data): ...
def send_welcome_email(self, user): ...
def generate_report(self, users): ...
def export_to_csv(self, users): ...
# Good — each class = one responsibility
class UserService:
def create_user(self, data): ...
class EmailService:
def send_welcome_email(self, user): ...
class UserReportGenerator:
def generate(self, users): ...
def export_to_csv(self, users): ...
O — Open/Closed
# Bad — modify code when adding new type
def calculate_discount(order_type: str, amount: float) -> float:
if order_type == "regular":
return amount * 0.1
elif order_type == "premium":
return amount * 0.2
elif order_type == "vip": # Added new type — modified function
return amount * 0.3
# Good — extend through new classes
from abc import ABC, abstractmethod
class DiscountStrategy(ABC):
@abstractmethod
def calculate(self, amount: float) -> float: ...
class RegularDiscount(DiscountStrategy):
def calculate(self, amount: float) -> float:
return amount * 0.1
class PremiumDiscount(DiscountStrategy):
def calculate(self, amount: float) -> float:
return amount * 0.2
# Add VIP — create new class, don't modify existing code
class VIPDiscount(DiscountStrategy):
def calculate(self, amount: float) -> float:
return amount * 0.3
L — Liskov Substitution
# Bad — subclass violates parent's contract
class Bird:
def fly(self) -> None: ...
class Penguin(Bird):
def fly(self) -> None:
raise NotImplementedError("Penguins can't fly") # LSP violation!
# Good — correct hierarchy
class Bird:
def move(self) -> None: ...
class FlyingBird(Bird):
def fly(self) -> None: ...
class Penguin(Bird):
def move(self) -> None:
self.swim()
What ships with it
4 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.
- 3mo ago First seen · 325 lines · 0 tokens per session scan A 2bcd0c4387bd
clean-code-patterns is a skill published in the GitHub repository ruslan-korneev/claude-plugins (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,768 tokens. 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.
clean-code-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| clean-code-patternsruslan-korneev/claude-plugins | Skill | 5 | 9mo ago | MIT | A | 0 | Claude Code |
| python-servicesiliaal/whetstone | Skill | 37 | today | MIT | A | 48 | Claude Code, Codex |
| Unit Test Scaffold (Python/pytest)s977043/river-review | Skill | 8 | yesterday | MIT | A | 19 | Claude Code |
| writing-pythonAleksandarBisevac/claude-plugins | Skill | 5 | today | MIT | A | 161 | Claude Code |
| update-depsreidemeister94/development-skills | Skill | 12 | 19d ago | MIT | A | 27 | Claude Code |
| exec-pythonanhnguyen0905/codex-mcp | Skill | 4 | 5d ago | MIT | A | 35 | Claude Code |
| no-silent-passAleksandarBisevac/claude-plugins | Skill | 5 | today | MIT | A | 143 | Claude Code |