Codebase Health Refactoring
kucherenko/jscpd
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.
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .claude/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-codeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/clean-code .agents/skills/clean-code && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .agents/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/clean-code .cursor/skills/clean-code && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .cursor/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/xenitV1/Antigravity-Workflows.git --path skills/clean-code--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/clean-code .gemini/skills/clean-code && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .gemini/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install xenitV1/Antigravity-Workflows clean-codeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/clean-code .github/skills/clean-code && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .github/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xenitV1/Antigravity-Workflows --skill clean-code -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install xenitV1/Antigravity-Workflows clean-code --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/clean-code .opencode/skills/clean-code && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "clean-code" agent skill from https://github.com/xenitV1/Antigravity-Workflows/tree/main/skills/clean-code into .opencode/skills/clean-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-code", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
clean-codePragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
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.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f0a1fa7. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from xenitV1/Antigravity-Workflows at commit f0a1fa7, republished under its MIT licence (© xenitV1). 582 words, ~1,650 tokens.
.claude/skills/clean-code/SKILL.md (or your agent's skills folder).CRITICAL SKILL - Be concise, direct, and solution-focused.
| Principle | Rule |
|---|---|
| SRP | Single Responsibility - each function/class does ONE thing |
| DRY | Don't Repeat Yourself - extract duplicates, reuse |
| KISS | Keep It Simple - simplest solution that works |
| YAGNI | You Aren't Gonna Need It - don't build unused features |
| Boy Scout | Leave code cleaner than you found it |
| Element | Convention |
|---|---|
| Variables | Reveal intent: userCount not n |
| Functions | Verb + noun: getUserById() not user() |
| Booleans | Question form: isActive, hasPermission, canEdit |
| Constants | SCREAMING_SNAKE: MAX_RETRY_COUNT |
Rule: If you need a comment to explain a name, rename it.
| Rule | Description |
|---|---|
| Small | Max 20 lines, ideally 5-10 |
| One Thing | Does one thing, does it well |
| One Level | One level of abstraction per function |
| Few Args | Max 3 arguments, prefer 0-2 |
| No Side Effects | Don't mutate inputs unexpectedly |
| Pattern | Apply |
|---|---|
| Guard Clauses | Early returns for edge cases |
| Flat > Nested | Avoid deep nesting (max 2 levels) |
| Composition | Small functions composed together |
| Colocation | Keep related code close |
| Situation | Action |
|---|---|
| User asks for feature | Write it directly |
| User reports bug | Fix it, don't explain |
| No clear requirement | Ask, don't assume |
| ❌ Pattern | ✅ Fix |
|---|---|
| Comment every line | Delete obvious comments |
| Helper for one-liner | Inline the code |
| Factory for 2 objects | Direct instantiation |
| utils.ts with 1 function | Put code where used |
| "First we import..." | Just write code |
| Deep nesting | Guard clauses |
| Magic numbers | Named constants |
| God functions | Split by responsibility |
Before changing a file, ask yourself:
| Question | Why |
|---|---|
| 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.
| Do | Don't |
|---|---|
| Write code directly | Write tutorials |
| Let code self-document | Add obvious comments |
| Fix bugs immediately | Explain the fix first |
| Inline small things | Create unnecessary files |
| Name things clearly | Use abbreviations |
| Keep functions small | Write 100+ line functions |
Remember: The user wants working code, not a programming lesson.
Before saying "task complete", verify:
| Check | Question |
|---|---|
| ✅ 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.
🔴 CRITICAL: Each agent runs ONLY their own skill's scripts after completing work.
| Agent | Script | Command |
|---|---|---|
| frontend-specialist | UX Audit | python ~/.claude/skills/frontend-design/scripts/ux_audit.py . |
| frontend-specialist | A11y Check | python ~/.claude/skills/frontend-design/scripts/accessibility_checker.py . |
| backend-specialist | API Validator | python ~/.claude/skills/api-patterns/scripts/api_validator.py . |
| mobile-developer | Mobile Audit | python ~/.claude/skills/mobile-design/scripts/mobile_audit.py . |
| database-architect | Schema Validate | python ~/.claude/skills/database-design/scripts/schema_validator.py . |
| security-auditor | Security Scan | python ~/.claude/skills/vulnerability-scanner/scripts/security_scan.py . |
| seo-specialist | SEO Check | python ~/.claude/skills/seo-fundamentals/scripts/seo_checker.py . |
| seo-specialist | GEO Check | python ~/.claude/skills/geo-fundamentals/scripts/geo_checker.py . |
| performance-optimizer | Lighthouse | python ~/.claude/skills/performance-profiling/scripts/lighthouse_audit.py <url> |
| test-engineer | Test Runner | python ~/.claude/skills/testing-patterns/scripts/test_runner.py . |
| test-engineer | Playwright | python ~/.claude/skills/webapp-testing/scripts/playwright_runner.py <url> |
| Any agent | Lint Check | python ~/.claude/skills/lint-and-validate/scripts/lint_runner.py . |
| Any agent | Type Coverage | python ~/.claude/skills/lint-and-validate/scripts/type_coverage.py . |
| Any agent | i18n Check | python ~/.claude/skills/i18n-localization/scripts/i18n_checker.py . |
❌ WRONG:
test-engineerrunningux_audit.py✅ CORRECT:frontend-specialistrunningux_audit.py
When running a validation script, you MUST:
## 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?**🔴 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
Just SKILL.md in skills/clean-code of xenitV1/Antigravity-Workflows.
Open the folder on GitHubat commit f0a1fa7
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.
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Clean Code this skillxenitV1/Antigravity-Workflows | 130 | 4 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Codebase Health Refactoringkucherenko/jscpd | 6.3k | — | ~2.5k | Automated safety check: Pass | MIT | |
| DRY Refactoring With jscpdkucherenko/jscpd | 6.3k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Code Simplifierkeep-starknet-strange/starkzap | 108 | 1 repos | ~2.1k | Automated safety check: Warn | None | |
| Code SimplifierTwiTech-LAB/devchain | 101 | — | ~2k | Automated safety check: Pass | Custom licence | |
| Simplify Recent ChangesQwenLM/qwen-code | 28k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 |
kucherenko/jscpd
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.
kucherenko/jscpd
Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.
keep-starknet-strange/starkzap
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.
TwiTech-LAB/devchain
Review a change set for reuse, simplification, efficiency, and altitude problems, then apply the fixes while preserving exact behavior.
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.
chendongqi/OPB-Skills
Expert code simplification and refactoring specialist that autonomously enhances code clarity, consistency, and maintainability while preserving exact functionality.
xenitV1/Antigravity-Workflows
Native multi-agent orchestration using Claude Code's Agent Tool.
xenitV1/Antigravity-Workflows
Mobile-first design thinking and decision-making for iOS and Android apps.
xenitV1/Antigravity-Workflows
Bash/Linux terminal patterns. An agent skill from xenitV1/Antigravity-Workflows.
xenitV1/Antigravity-Workflows
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate).
xenitV1/Antigravity-Workflows
Structured task planning with clear breakdowns, dependencies, and verification criteria.
xenitV1/Antigravity-Workflows
Internationalization and localization patterns. An agent skill from xenitV1/Antigravity-Workflows.
Categories
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments. Clean Code is an agent skill from xenitV1/Antigravity-Workflows.
Clean Code fits situations like: tasks that involve Code quality; tasks that involve Code simplification.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.