Agent skill

Clean Code

by xenitV1 in xenitV1/Antigravity-Workflows

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

MITAuto-check passedDevelopment

Install Clean Code

skills CLI
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/clean-code .claude/skills/clean-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clean-code
GitHub stars
130
Used in
4 other repos
Token cost
~1.6k tokens
SKILL.md length
582 words
Files
1
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

  • Works in 5 steps: Run the script and capture ALL output → Parse the output - identify errors,… → Summarize to user in this format → …
  • Tasks that involve Code quality
  • SKILL.md covers Core Principles, Naming Rules, Function Rules and Code Structure, plus 6 more sections
  • Calls python

What it does

Clean Code is an agent skill from xenitV1/Antigravity-Workflows. Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code quality and Code simplification. The licence is MIT.

When your agent uses it

  • Tasks that involve Code quality
  • Tasks that involve Code simplification

Example prompts

  • “/clean-code”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run the script and capture ALL output
  2. Parse the output - identify errors, warnings, and passes
  3. Summarize to user in this format
  4. Wait for user confirmation before fixing
  5. After fixing → Re-run script to confirm

What it can do on your machine

Read from SKILL.md and the folder at commit f0a1fa7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clean Code loads about 1.6k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 582 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xenitV1/Antigravity-Workflows at commit f0a1fa7, republished under its MIT licence (© xenitV1). 582 words, ~1,650 tokens.

Download SKILL.mdSave it as .claude/skills/clean-code/SKILL.md (or your agent's skills folder).
name
clean-code
description
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
allowed-tools
Read, Write, Edit
version
2
priority
CRITICAL

Clean Code - Pragmatic AI Coding Standards

CRITICAL SKILL - Be concise, direct, and solution-focused.


Core Principles

PrincipleRule
SRPSingle Responsibility - each function/class does ONE thing
DRYDon't Repeat Yourself - extract duplicates, reuse
KISSKeep It Simple - simplest solution that works
YAGNIYou Aren't Gonna Need It - don't build unused features
Boy ScoutLeave code cleaner than you found it

Naming Rules

ElementConvention
VariablesReveal intent: userCount not n
FunctionsVerb + noun: getUserById() not user()
BooleansQuestion form: isActive, hasPermission, canEdit
ConstantsSCREAMING_SNAKE: MAX_RETRY_COUNT

Rule: If you need a comment to explain a name, rename it.


Function Rules

RuleDescription
SmallMax 20 lines, ideally 5-10
One ThingDoes one thing, does it well
One LevelOne level of abstraction per function
Few ArgsMax 3 arguments, prefer 0-2
No Side EffectsDon't mutate inputs unexpectedly

Code Structure

PatternApply
Guard ClausesEarly returns for edge cases
Flat > NestedAvoid deep nesting (max 2 levels)
CompositionSmall functions composed together
ColocationKeep related code close

AI Coding Style

SituationAction
User asks for featureWrite it directly
User reports bugFix it, don't explain
No clear requirementAsk, don't assume

Anti-Patterns (DON'T)

❌ Pattern✅ Fix
Comment every lineDelete obvious comments
Helper for one-linerInline the code
Factory for 2 objectsDirect instantiation
utils.ts with 1 functionPut code where used
"First we import..."Just write code
Deep nestingGuard clauses
Magic numbersNamed constants
God functionsSplit by responsibility

🔴 Before Editing ANY File (THINK FIRST!)

Before changing a file, ask yourself:

QuestionWhy
What imports this file?They might break
What does this file import?Interface changes
What tests cover this?Tests might fail
Is this a shared component?Multiple places affected

Quick Check:

File to edit: UserService.ts
└── Who imports this? → UserController.ts, AuthController.ts
└── Do they need changes too? → Check function signatures

🔴 Rule: Edit the file + all dependent files in the SAME task. 🔴 Never leave broken imports or missing updates.


Summary

DoDon't
Write code directlyWrite tutorials
Let code self-documentAdd obvious comments
Fix bugs immediatelyExplain the fix first
Inline small thingsCreate unnecessary files
Name things clearlyUse abbreviations
Keep functions smallWrite 100+ line functions

Remember: The user wants working code, not a programming lesson.


Show full SKILL.md (231 more words)Show less

🔴 Self-Check Before Completing (MANDATORY)

Before saying "task complete", verify:

CheckQuestion
✅ Goal met?Did I do exactly what user asked?
✅ Files edited?Did I modify all necessary files?
✅ Code works?Did I test/verify the change?
✅ No errors?Lint and TypeScript pass?
✅ Nothing forgotten?Any edge cases missed?

🔴 Rule: If ANY check fails, fix it before completing.


Verification Scripts (MANDATORY)

🔴 CRITICAL: Each agent runs ONLY their own skill's scripts after completing work.

Agent → Script Mapping
AgentScriptCommand
frontend-specialistUX Auditpython ~/.claude/skills/frontend-design/scripts/ux_audit.py .
frontend-specialistA11y Checkpython ~/.claude/skills/frontend-design/scripts/accessibility_checker.py .
backend-specialistAPI Validatorpython ~/.claude/skills/api-patterns/scripts/api_validator.py .
mobile-developerMobile Auditpython ~/.claude/skills/mobile-design/scripts/mobile_audit.py .
database-architectSchema Validatepython ~/.claude/skills/database-design/scripts/schema_validator.py .
security-auditorSecurity Scanpython ~/.claude/skills/vulnerability-scanner/scripts/security_scan.py .
seo-specialistSEO Checkpython ~/.claude/skills/seo-fundamentals/scripts/seo_checker.py .
seo-specialistGEO Checkpython ~/.claude/skills/geo-fundamentals/scripts/geo_checker.py .
performance-optimizerLighthousepython ~/.claude/skills/performance-profiling/scripts/lighthouse_audit.py <url>
test-engineerTest Runnerpython ~/.claude/skills/testing-patterns/scripts/test_runner.py .
test-engineerPlaywrightpython ~/.claude/skills/webapp-testing/scripts/playwright_runner.py <url>
Any agentLint Checkpython ~/.claude/skills/lint-and-validate/scripts/lint_runner.py .
Any agentType Coveragepython ~/.claude/skills/lint-and-validate/scripts/type_coverage.py .
Any agenti18n Checkpython ~/.claude/skills/i18n-localization/scripts/i18n_checker.py .

❌ WRONG: test-engineer running ux_audit.py ✅ CORRECT: frontend-specialist running ux_audit.py


🔴 Script Output Handling (READ → SUMMARIZE → ASK)

When running a validation script, you MUST:

  1. Run the script and capture ALL output
  2. Parse the output - identify errors, warnings, and passes
  3. Summarize to user in this format:
markdown
## Script Results: [script_name.py]

### ❌ Errors Found (X items)
- [File:Line] Error description 1
- [File:Line] Error description 2

### ⚠️ Warnings (Y items)
- [File:Line] Warning description

### ✅ Passed (Z items)
- Check 1 passed
- Check 2 passed

**Should I fix the X errors?**
  1. Wait for user confirmation before fixing
  2. After fixing → Re-run script to confirm

🔴 VIOLATION: Running script and ignoring output = FAILED task. 🔴 VIOLATION: Auto-fixing without asking = Not allowed. 🔴 Rule: Always READ output → SUMMARIZE → ASK → then fix.

© xenitV1, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/clean-code of xenitV1/Antigravity-Workflows.

Open the folder on GitHubat commit f0a1fa7

Used in 4 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in xenitV1/Antigravity-Workflows, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Clean Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clean Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clean Code this skillxenitV1/Antigravity-Workflows1304 repos~1.6kAutomated safety check: PassMIT
Codebase Health Refactoringkucherenko/jscpd6.3k—~2.5kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.3k—~2.1kAutomated safety check: PassMIT
Code Simplifierkeep-starknet-strange/starkzap1081 repos~2.1kAutomated safety check: WarnNone
Code SimplifierTwiTech-LAB/devchain101—~2kAutomated safety check: PassCustom licence
Simplify Recent ChangesQwenLM/qwen-code28k—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • A three-part cleanup guided by jscpd: measure health, then fix duplicated code, remove dead code and simplify the most complex files, finishing by re-measuring the score.

    6.3k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.3k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Simplifier

    keep-starknet-strange/starkzap

    Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.

    108 GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check: warnings
  • Code Simplifier

    TwiTech-LAB/devchain

    Review a change set for reuse, simplification, efficiency, and altitude problems, then apply the fixes while preserving exact behavior.

    101 GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Simplify Recent Changes

    QwenLM/qwen-code

    Reviews your uncommitted diff with three parallel passes for reuse, quality and efficiency, then applies the straightforward cleanups before a pull request.

    28k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Rnd Code Simplify

    chendongqi/OPB-Skills

    Expert code simplification and refactoring specialist that autonomously enhances code clarity, consistency, and maintainability while preserving exact functionality.

    125 GitHub stars~2.2k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from xenitV1/Antigravity-Workflows

All 42 skills in this repo
  • Parallel Agents

    xenitV1/Antigravity-Workflows

    Native multi-agent orchestration using Claude Code's Agent Tool.

    130 GitHub starsUsed in 9 repos~1.3k tokens
    Auto-check passed
  • Mobile Design

    xenitV1/Antigravity-Workflows

    Mobile-first design thinking and decision-making for iOS and Android apps.

    130 GitHub starsUsed in 2 repos~3.7k tokens
    Auto-check: notes
  • Bash Linux

    xenitV1/Antigravity-Workflows

    Bash/Linux terminal patterns. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 8 repos~1k tokens
    Auto-check: notes
  • Behavioral Modes

    xenitV1/Antigravity-Workflows

    AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate).

    130 GitHub starsUsed in 8 repos~1.3k tokens
    Auto-check passed
  • Plan Writing

    xenitV1/Antigravity-Workflows

    Structured task planning with clear breakdowns, dependencies, and verification criteria.

    130 GitHub starsUsed in 8 repos~994 tokens
    Auto-check passed
  • I18n Localization

    xenitV1/Antigravity-Workflows

    Internationalization and localization patterns. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 7 repos~758 tokens
    Auto-check passed

Categories

Questions about Clean Code

What does Clean Code do?

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments. Clean Code is an agent skill from xenitV1/Antigravity-Workflows.

When should I use Clean Code?

Clean Code fits situations like: tasks that involve Code quality; tasks that involve Code simplification.

How do I install Clean Code in Claude Code?

Run `npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a claude-code`. Or copy the skill folder (skills/clean-code in xenitV1/Antigravity-Workflows) into .claude/skills/clean-code in your project. Claude Code loads it when a task matches its description.

How do I install Clean Code in Codex?

Run `npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a codex`. Or copy the skill folder (skills/clean-code in xenitV1/Antigravity-Workflows) into .agents/skills/clean-code in your project. Codex loads it when a task matches its description.

Can I use Clean Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clean-code, .gemini/skills/clean-code, .github/skills/clean-code and .opencode/skills/clean-code in your project.

What does Clean Code need to run?

Going by SKILL.md and its folder, Clean Code needs the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit.

Does Clean Code access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Clean Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clean Code use?

Clean Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clean Code use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Clean Code?

Skills that share tags, products or a category with Clean Code: Codebase Health Refactoring (kucherenko/jscpd, 6.3k stars), DRY Refactoring With jscpd (kucherenko/jscpd, 6.3k stars), Code Simplifier (keep-starknet-strange/starkzap, 108 stars) and Code Simplifier (TwiTech-LAB/devchain, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Code?

xenitV1 (a GitHub user) maintains it in xenitV1/Antigravity-Workflows, which has 130 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on January 14, 2026.

Source: xenitV1/Antigravity-Workflows on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.