Agent skill

Clean Code

by operately in operately/operately

Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language.

Custom licenceAuto-check passedDevelopment

Install Clean Code

skills CLI
$ npx skills add operately/operately --skill clean-code -a claude-code

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

GitHub CLI
$ gh skill install operately/operately 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/operately/operately.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/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
576
Token cost
~2.3k tokens
SKILL.md length
1,132 words
Files
3
Skills in repo
9
Repo updated
First seen
Licence
Custom licence

At a glance

Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language.

  • Works in 12 steps: Leave the code cleaner → Optimize for readers → Use strong names → …
  • Asks to write clean code
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Follow clean-code principles

What it does

Clean Code is an agent skill from operately/operately. Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language. Use this whenever the user asks to write clean code, follow clean-code principles, refactor for clarity, improve naming, reduce complexity or duplication, separate concerns, tighten error handling, work test-first or do TDD, or otherwise raise code quality, readability, and maintainability. Also use when writing or reviewing Operately APIs or Ecto queries. Apply these rules by default when producing or…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `getter.md` and `reference.md`).

It sits in Development, covering Code quality, Test-driven development and Refactoring. The repository describes itself as: The open source company operating system.

When your agent uses it

  • Asks to write clean code
  • Follow clean-code principles
  • Refactor for clarity
  • Reduce complexity

Example prompts

  • “/clean-code”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Leave the code cleaner
  2. Optimize for readers
  3. Use strong names
  4. Keep methods small and focused
  5. Keep abstraction levels separate
  6. Make side effects explicit
  7. Control conditionals
  8. Treat errors as design
  9. Keep modules and classes cohesive
  10. Remove duplication at the right level
  11. Work test-first
  12. Refactor while you work

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    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 2.3k tokens when it runs. Until then it costs about 142 tokens; SKILL.md has 1,132 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,132 words (~2,264 tokens).

“These are mandatory engineering standards for any code you write, change, or review while this skill is active. They are language-agnostic: apply them in whatever language the project uses, respecting that language's idioms.”

— opening of SKILL.md by operately, Custom licence
name
clean-code

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files in .agents/skills/clean-code of operately/operately.

  • SKILL.md
  • getter.md
  • reference.md

Open the folder on GitHubat commit a11131d

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 skilloperately/operately576—~2.3kAutomated safety check: PassCustom licence
Solidramziddin/solid-skills606—~2.7kAutomated safety check: PassNone
Clean Codesuperplanehq/superplane7.7k—~1.5kAutomated safety check: PassCustom licence
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Clean Code GuardamElnagdy/guard-skills1.3k2 repos~4.3kAutomated safety check: PassMIT

Similar skills

  • Solid

    ramziddin/solid-skills

    A skill your agent uses when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging.

    606 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Clean Code

    superplanehq/superplane

    Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language.

    7.7k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Clean Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.

    1.3k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from operately/operately

All 9 skills in this repo
  • Components Architecture

    operately/operately

    Defines where UI components belong in Operately (TurboUI-first).

    576 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Ecto Migrations

    operately/operately

    Rules for Operately schema migrations (app/priv/repo/migrations/) and data migrations (app/lib/operately/data/change.ex).

    576 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • MCP Tools

    operately/operately

    Defines how to add Operately MCP tools (API-first wrappers).

    576 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Tanstack Query

    operately/operately

    Operately frontend data fetching with TanStack Query. An agent skill from operately/operately.

    576 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Writing Tests

    operately/operately

    Operately test layout, naming (.projections.json), factories, feature/e2e steps, external query/mutation auth specs, and how to run Elixir/API/JS/EE tests.

    576 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • Help Docs

    operately/operately

    Discover help documentation work from operately git history.

    576 GitHub stars~866 tokensUpdated today
    Auto-check passed

Categories

Questions about Clean Code

What does Clean Code do?

Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language. Clean Code is an agent skill from operately/operately. Clean-code engineering standards for writing, refactoring, and reviewing code in any programming language.

When should I use Clean Code?

Clean Code fits situations like: asks to write clean code; follow clean-code principles; refactor for clarity; reduce complexity.

How do I install Clean Code in Claude Code?

Run `npx skills add operately/operately --skill clean-code -a claude-code`. Or copy the skill folder (.agents/skills/clean-code in operately/operately) 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 operately/operately --skill clean-code -a codex`. Or copy the skill folder (.agents/skills/clean-code in operately/operately) 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 operately/operately --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?

SKILL.md names no scripts, command-line tools or credentials: Clean Code is instructions for the agent only.

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 has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Clean Code use?

About 2.3k tokens (SKILL.md is roughly 9.1k 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: Solid (ramziddin/solid-skills, 606 stars), Clean Code (superplanehq/superplane, 7.7k stars), Systematic Code Refactoring (luongnv89/claude-howto, 42k stars) and Dignified Python Standards (docling-project/docling, 68k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Code?

operately (a GitHub organization) maintains it in operately/operately, which has 576 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

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