Clean Code
Principles and practices for writing readable, maintainable, and testable code
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill clean-codegit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/development/clean-code ~/.claude/skills/clean-codePersonal 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 Write code that humans can read, understand, and change with confidence. ## Core Principles ### 1. Mean What You Say — Say What You Mean Code is communication. Every name, structure, and abstraction should reveal intent. If you need a comment to explain *what* the code does, the code is failing at communication. ### 2. Small Things, Done Well Small functions, small classes, small files. Each unit of code should have one clear responsibility and do it well. Composability beats complexity. ### 3. The Boy Scout Rule Leave the code cleaner than you found it. Every commit should improve the codebase incrementally — even if it's just renaming one variable or extracting one function. ### 4. Testability == Design Quality If code is hard to test, it has a design problem. Testable code is modular, decoupled, and honest about its dependencies. --- ## Clean Code Scoring Rubric Use this rubric to evaluate code quality on a scale of 1-5 for each dimension: | Dimension | 1 (Poor) | 3 (Adequate) | 5 (Excellent) | |-----------|----------|---------------|----------------| | **Naming** | Single-letter vars, ambiguous abbreviations | Descriptive but occasionally redundant | Reveals intent, consistent, searchable | | **Function Size** | Monolithic 500+ line functions | 50-100 line functions with mixed concerns | <20 lines, one clear level of abstraction |
Details
- Skill name
clean-code- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/development/clean-code/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Clean Code skill do?
Principles and practices for writing readable, maintainable, and testable code
How do I install the Clean Code skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill clean-code. 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 cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Cloud Architecture
492cosmicstack-labs/mercury-agent-skills
Multi-cloud, VPC design, high availability, disaster recovery, and cost optimization
Caching Strategies
492cosmicstack-labs/mercury-agent-skills
CDN, Redis, in-memory cache, cache invalidation, and distributed caching patterns
Code Review
492cosmicstack-labs/mercury-agent-skills
Systematic code review methodology, PR checklist, feedback techniques, and review automation patterns
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.