Clean Code

Use when the user writes new Python, or asks for review, refactor, or cleanup of Python code, names, comments/docstrings, functions, or tests. Applies Robert Martin's complete Clean Code catalog -- naming, functions, comments, DRY, boundary conditions, and tests -- to the code being changed.

5 starsSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Sagargupta16/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Sagargupta16/claude-skills --skill clean-code
Manual install
git clone --depth 1 https://github.com/Sagargupta16/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/clean-code/skills/clean-code ~/.claude/skills/clean-code

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Clean Code (Python)

> "Always leave the campground cleaner than you found it."
> — Robert Baden-Powell

> "Always check a module in cleaner than when you checked it out."
> — Robert C. Martin, *Clean Code*

## Rule Chapters

Load the chapter that matches the work. Rule IDs (N1, C5, G25, F3, T9...) are defined in these files:

| Chapter | When |
|---------|------|
| [references/full-catalog.md](references/full-catalog.md) | Reviewing any Python -- the complete rule index (master) |
| [references/names.md](references/names.md) | Naming variables, functions, classes, modules |
| [references/comments.md](references/comments.md) | Writing or editing comments and docstrings |
| [references/functions.md](references/functions.md) | Creating or refactoring functions |
| [references/general.md](references/general.md) | Code quality review -- DRY, intent, abstractions |
| [references/tests.md](references/tests.md) | Writing or reviewing tests |

## The Philosophy

You don't have to make every module perfect. You simply have to make it **a little bit better** than when you found it.

If we all followed this simple rule:
- Our systems would gradually get better as they evolved
- Teams would care for the system as a whole
- The relentless deterioration of software would end

## When Working on Code

Every time you touch code, look for **at least one small improvement**:

### Quick Wins (Do These Immediately)
- Rename a poorly named variable → [references/names.md](references/names.md)
Read the full skill on GitHub

Details

Skill name
clean-code
Path
plugins/clean-code/skills/clean-code/SKILL.md
License
MIT
Repo updated
13 November 2026

FAQ

What does the Clean Code skill do?

Use when the user writes new Python, or asks for review, refactor, or cleanup of Python code, names, comments/docstrings, functions, or tests. Applies Robert Martin's complete Clean Code catalog -- naming, functions, comments, DRY, boundary conditions, and tests -- to the code being changed.

How do I install the Clean Code skill?

Claude Code plugin: /plugin marketplace add Sagargupta16/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Clean Code popular?

It lives in Sagargupta16/claude-skills, which has 5 GitHub stars and 0 forks.

Related skills

Context Management

5

Sagargupta16/claude-skills

Use when managing Claude Code context window during long sessions, when context feels degraded, or when deciding between /compact, /clear, /rewind, and sub-agents. Covers context rot detection, compaction timing, branching strategy, and sub-agent isolation patterns.

AI, LLMs & Agents

Debug Triage

5

Sagargupta16/claude-skills

Use when triaging a pasted error, stack trace, or terminal transcript. Activates on "debug this", "fix this", "why is this broken", or when a user pastes red terminal output. Produces a tight cause-fix-test report, not a lecture.

Software Development

Deps Audit

5

Sagargupta16/claude-skills

Use when auditing, updating, or securing project dependencies. Covers multi-language dependency detection, security vulnerability scanning, outdated package identification, unused dependency detection, and update strategies for npm, pip, cargo, and go.

Security

Cloud Cost Optimization

9

sandbaseai/workbuddy-skill

Use when a cloud bill is unexplained, when reviewing architecture cost, or before changing capacity, storage, logging, transfer, or commitment plans. Start from measured cost drivers and utilization, not assumptions.

Software Development

Chrome Devtools

9

sandbaseai/workbuddy-skill

Use when inspecting an authorized live Chrome page, debugging console or network failures, capturing visual evidence, emulating conditions, or profiling browser performance with DevTools.

Software Development

Code Reviewer

9

sandbaseai/workbuddy-skill

Use before building or merging a change to review intent, correctness, regressions, scope, maintainability, and security.

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.