clean-code

clean-code is a skill for Claude Code, Codex from Pixel-Process-UG/superkit-agents. It costs 55 tokens per session (2,453 once invoked), scanned A, original, MIT.

A code-quality guide for making software easier to read, maintain, and test. It covers common code smells, SOLID design principles, duplicated logic, naming, error handling, and complexity.

In plain words
What is it for?
Use it to review code quality, reduce complexity, improve names and error handling, and choose refactoring patterns.
Why use it?
It helps identify tangled or repetitive code and plan focused refactoring without losing sight of how the code works.

Skill for Claude CodeCodex

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

Good fit Use it to review code quality, reduce complexity, improve names and error handling, and choose refactoring patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pixel-process-ug/superkit-agents/clean-code
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 Pixel-Process-UG/superkit-agents --skill clean-code
Clone the repo
git clone --depth 1 https://github.com/Pixel-Process-UG/superkit-agents

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pixel-process-ug/superkit-agents/clean-code/github.svg)](https://agentmods.dev/skills/pixel-process-ug/superkit-agents/clean-code)
Your own site
<a href="https://agentmods.dev/skills/pixel-process-ug/superkit-agents/clean-code"><img src="https://agentmods.dev/badge/skills/pixel-process-ug/superkit-agents/clean-code/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pixel-process-ug/superkit-agents/clean-code"><img src="https://agentmods.dev/badge/skills/pixel-process-ug/superkit-agents/clean-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,453 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.
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.00055 $0.02453
Opus 5.5 $0.00022 $0.00981
Sonnet 5.5 $0.00011 $0.00491
Haiku 4.5 $0.00006 $0.00245

Measured 1mo ago against content hash 4cb40f8ddbb7, 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 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.

templates/skills/clean-code/SKILL.md · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clean Code

Overview

Apply clean code principles to produce readable, maintainable, and testable software. This skill covers SOLID principles, DRY application, code smell identification, refactoring patterns, naming conventions, error handling, and complexity management. Based on the works of Robert C. Martin, Martin Fowler, and Kent Beck.

Announce at start: "I'm using the clean-code skill to improve code quality."


Phase 1: Analyze Current Code

Goal: Read and understand the code in full context before changing anything.

Actions

  1. Read the code in its full context (not just the snippet)
  2. Identify the code's responsibility and purpose
  3. Measure cyclomatic complexity
  4. Map coupling and dependencies
  5. Note any existing tests

STOP — Do NOT proceed to Phase 2 until:

  • Code is read in full context
  • Purpose and responsibility are understood
  • Complexity hotspots are identified
  • Existing test coverage is known

Phase 2: Identify Code Smells

Goal: Catalog all code smells using the reference tables below.

Bloaters

Smell Detection Refactoring
Long Method > 30 lines Extract Method
Large Class > 300 lines or > 5 responsibilities Extract Class
Long Parameter List > 3 parameters Introduce Parameter Object
Data Clumps Same params appear together Extract Class
Primitive Obsession Primitives instead of small objects Replace with Value Object

Object-Orientation Abusers

Smell Detection Refactoring
Switch Statements Switch on type Replace with Polymorphism
Parallel Inheritance Every subclass requires parallel subclass Merge hierarchies
Refused Bequest Subclass ignores inherited methods Replace Inheritance with Delegation

Change Preventers

Smell Detection Refactoring
Divergent Change One class changed for multiple reasons Extract Class (SRP)
Shotgun Surgery One change touches many classes Move Method, Inline Class

Read the full file on GitHub · 333 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 · 333 lines · 55 tokens per session scan A 4cb40f8ddbb7

Subscribe to this mod's changes

clean-code is a skill published in the GitHub repository Pixel-Process-UG/superkit-agents (3 stars, last pushed 7mo ago), licensed MIT. It adds 55 tokens to every session and 2,453 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

code-review-and-quality

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted…

addyosmani/agent-skills · 71 tokens

doubt-driven-development

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high…

addyosmani/agent-skills · 96 tokens

code-simplification

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

addyosmani/agent-skills · 51 tokens

chinese-code-review

A Chinese-language code-review communication guide with templates and severity levels for review comments.

jnMetaCode/superpowers-zh · 62 tokens

receiving-code-review

A guide for handling code-review feedback carefully. Code review is the process of checking proposed changes before they are accepted into a project.

jnMetaCode/superpowers-zh · 50 tokens

requesting-code-review

A code-review procedure for checking completed work against its requirements before it spreads or is merged. A code reviewer is a person or agent who looks for defects and missing parts.

jnMetaCode/superpowers-zh · 24 tokens