{
  "markdown": "<p align=\"center\">\n  <img src=\"./docs/images/banner.png\" alt=\"Clean Code Skills\">\n</p>\n\n# Clean Code Skills\n\n[![Release](https://img.shields.io/github/v/release/btseee/clean-code-skills?label=release)](https://github.com/btseee/clean-code-skills/releases/latest)\n[![CI](https://github.com/btseee/clean-code-skills/actions/workflows/ci.yml/badge.svg)](https://github.com/btseee/clean-code-skills/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)\n\nClean-code **and clean-architecture** discipline for AI coding agents — Claude Code, Antigravity, Codex App, Codex CLI, Cursor, Devin CLI, Factory Droid, Gemini CLI, GitHub Copilot, Grok Build CLI, Kimi Code, OpenCode, Pi, Hermes Agent, Amp, Windsurf, Cline, and any tool that reads Agent Skills or `AGENTS.md`.\n\n## Purpose\n\nAI agents rarely fail at syntax. They fail by putting code in the wrong place, duplicating knowledge, mixing responsibilities, inventing APIs, wiring the shortest path between two points, and claiming success without running anything. They also forget everything between sessions.\n\nThis package addresses those failures specifically. One language-agnostic `clean-code` skill is the source of truth; thin adapters carry an identical, versioned rules block into every agent's instruction file, so all your tools enforce the same behavior instead of each having its own opinion.\n\nTwo things make it different from a style guide:\n\n- **It covers both scales.** Naming and function size matter, but so does which direction a dependency crosses a boundary — and only one of those gets worse over years.\n- **It assumes the agent has no memory of your project.** Durable context lives on disk in a `.clean/` directory, so a cold session reconstructs the stack, the declared layering, and past decisions instead of guessing.\n\n## Capabilities\n\n### Code level\n\nMeaningful names, small focused functions, honest comments, formatting and ordering, data versus objects, error handling, boundaries, tests, concurrency, security, performance — plus correct file and code placement, one job per unit, and the full smell catalogue with stable citable IDs (`C`, `E`, `F`, `G1`–`G36`, `J`, `N`, `T`).\n\n### Architecture level\n\nThe Dependency Rule, level as distance from I/O, the four circles and what may cross them, boundary costs and the three partial-boundary forms, SOLID stated as dependency rules, component cohesion and coupling with the instability / abstractness / distance metrics, policy versus detail, the Humble Object, the four packaging strategies, and the three decoupling modes.\n\n### Named vocabulary, on purpose\n\nThe Three Laws of TDD, F.I.R.S.T., BUILD-OPERATE-CHECK, DRY, the Law of Demeter and train wrecks, the Stepdown Rule, data/object anti-symmetry, the Special Case pattern, LeBlanc's law, Producer-Consumer / Readers-Writers / Dining Philosophers, REP / CCP / CRP / ADP / SDP / SAP. Precision is the point: an agent that can name F.I.R.S.T. can apply it and cite it, and a reviewer can check the citation.\n\n### What an agent using this does\n\n1. Load project context from `.clean/` and the project's own instruction files before deciding anything. The `audit` and `questions` commands are what *create* `.clean/`; a plain session reads it and offers to persist at the end.\n2. Frame the change: behavior, assumptions, smallest scope, and the check that proves it.\n3. Read local context and search for existing implementations before writing anything new.\n4. Put code and files where the project's conventions say they belong — and wire new files in completely.\n5. Keep one job per unit; route behavior to the module that owns the responsibility.\n6. Point every new dependency inward, and keep details — database, web, framework, ORM types — out of business rules.\n7. Verify every API call against the dependency versions recorded in `.clean/context.json` — never against memory of a version that may not be installed.\n8. Keep comments at one to three lines, explaining why — a paragraph of comment is knowledge in the wrong place.\n9. Edit surgically; never regenerate whole files when a targeted edit will do.\n10. Verify with real commands and report honestly what ran and what did not.\n\n### What ships\n\n| Piece | Path | Purpose |\n| --- | --- | --- |\n| Agent skill (canonical) | `skills/clean-code/SKILL.md` | Router and non-negotiables, kept inside the spec's 500-line / 5k-token budget |\n| Canon index | `references/canon.md` | Every named rule with its operational meaning — the fastest way in when you know the name |\n| Architecture rules | `references/architecture.md` | Dependency rule, SOLID, component principles, boundaries, systems, packaging, testability, decoupling modes |\n| Architecture map | `references/architecture-map.md` | Routing table: the question you face, and the rule that answers it |\n| Code principles | `references/principles.md` | Naming, functions, formatting, errors, data, security, performance in full |\n| Test discipline | `references/tests.md` | Three Laws of TDD, F.I.R.S.T., BUILD-OPERATE-CHECK, and the test failure modes |\n| Concurrency | `references/concurrency.md` | Execution models, the four deadlock conditions, and seven tactics that catch a race |\n| Chapter and smell map | `references/chapter-map.md` | Per-chapter coverage, the smell IDs, and the cross-reference table |\n| Smell triage | `references/smell-triage.md` | Every smell with its usual response and the order to fix them in |\n| Workflows | `references/session-protocol.md`, `new-project.md`, `project-refactor.md`, `audit-report.md` | One per situation: a session, a greenfield start, a cleanup campaign, an exhaustive audit that fills `.clean/` |\n| Interview | `references/questions.md` | `/clean-code questions` — turns your answers into durable `.clean/` state |\n| Review checklist | `references/review-checklist.md` | Finding-first review scan including placement and responsibility |\n| Framework map | `references/framework-map.md` | Per-language idioms and file-placement conventions |\n| Worked examples | `references/examples.md` | Before-and-after cases in Python, TypeScript, Go and SQL, plus output templates |\n| Memory protocol | `references/memory-protocol.md` | What to persist in `.clean/` so a memoryless session can resume |\n| Host matrix | `references/host-matrix.md` | Per-host skill paths, capabilities, and portable substitutes |\n| Tools | `skills/clean-code/scripts/*.py` | `detect_stack.py`, `scan_repo.py`, `check_boundaries.py` |\n| Templates and hooks | `skills/clean-code/assets/` | `.clean/` templates, a portable git pre-commit hook, Claude Code hook settings |\n| Managed rules block | `templates/agent-block.md` | The single text inserted into every agent's instruction file |\n| Host table | `templates/hosts.tsv` | Every profile, scope, and path the installers, sync, and validator know; a new host is one row |\n| Adapters | `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.github/`, `.cursor/`, `.windsurf/`, `.clinerules/` | Per-client carriers of the same block |\n| Manifests | `.claude-plugin/`, `.codex-plugin/`, `gemini-extension.json` | Native packaging for Claude Code, Codex-style registries, Gemini CLI |\n| Installers | `scripts/install.{sh,ps1}`, `scripts/remote-install.{sh,ps1}` | Local and no-clone install, update, global mode, uninstall |\n| Validators and CI | `scripts/validate.sh`, `scripts/validate.ps1`, `.github/workflows/` | Repo integrity, block and version sync, installer behavior on Linux and Windows |\n\n`references/` paths above are relative to `skills/clean-code/`.\n\n## Requirements\n\n**The skill itself requires nothing.** It is Markdown that the agent reads, and every workflow works with zero tooling — each step that names a script also names its manual equivalent.\n\nEverything below is optional, and only for the piece it enables:\n\n| You need | To |\n| --- | --- |\n| bash, or PowerShell 7+ | run the installer locally |\n| `curl` and `tar`, or PowerShell `irm` | use the no-clone remote installer |\n| Python 3.8+ | run the three optional scripts (standard library only, no network) |\n| `git` | use the portable pre-commit hook |\n| Node / `npx` | contributors only: run markdownlint |\n\nHost support for hooks, slash commands, and permissions varies and is **never required for correctness** — see `references/host-matrix.md`.\n\n## Installation\n\n### Quick install, no clone\n\nRun inside your project. Linux, macOS, Git Bash:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/btseee/clean-code-skills/main/scripts/remote-install.sh | bash -s -- all\n```\n\nWindows PowerShell:\n\n```powershell\n& ([scriptblock]::Create((irm https://raw.githubusercontent.com/btseee/clean-code-skills/main/scripts/remote-install.ps1))) all\n```\n\nReplace `all` with just the agents you use: `claude cursor copilot`. Both commands fetch the latest release (falling back to `main`) and run the packaged installer against the current directory.\n\n### Cross-host skills CLI\n\nIf you want the skill alone, without adapter blocks. It installs into `.agents/skills/` and symlinks into each agent directory it detects:\n\n```bash\nnpx skills add btseee/clean-code-skills --skill clean-code\n```\n\n### Supported hosts\n\nEvery path below comes from that vendor's own documentation. `.agents/skills/` is the shared\ncross-agent root, and the `agents` profile installs the whole skill there — not just an instruction\nblock — which is what covers most of this table in one step.\n\n| Host | Install with | Reads |\n| --- | --- | --- |\n| Claude Code | `claude` profile, or `/plugin marketplace add btseee/clean-code-skills` then `/plugin install clean-code-skills@clean-code-skills` | `.claude/skills` |\n| Codex CLI | `agents` profile | `.agents/skills` |\n| Codex App | Upload in-product: Plugins → Skills, or the `clean-code.zip` release asset | in-product only |\n| Cursor | `agents` profile (also reads `.cursor/skills`) | `.agents/skills` |\n| Gemini CLI | `agents` profile, or `gemini extensions install https://github.com/btseee/clean-code-skills` | `.agents/skills`, `.gemini/skills` |\n| Antigravity | `agents` profile for a project; `antigravity` profile with `--global` | `.agents/skills`, `~/.gemini/config/skills` |\n| GitHub Copilot CLI | `copilot` profile, or `agents` | `.github/skills`, `.agents/skills` |\n| OpenCode | `agents` profile | `.opencode/skills`, `.agents/skills` |\n| Factory Droid | `agents` profile | `.factory/skills`, `.agents/skills` |\n| Devin CLI | `agents` profile | `.agents/skills`, `.devin/skills` |\n| Kimi Code | `agents` profile | `.kimi-code/skills`, `.agents/skills` |\n| Grok Build CLI | `grok` profile — its project root is **not** the shared one | `.grok/skills` |\n| Hermes Agent | `agents` profile | `.hermes/skills`, `.agents/skills` |\n| Pi | `agents` profile | `.pi/skills`, `.agents/skills` |\n| Amp | `agents` profile | `.agents/skills` |\n| Claude Desktop / claude.ai | Upload `clean-code.zip` from the [latest release](https://github.com/btseee/clean-code-skills/releases/latest): Settings → Capabilities → Skills. Works for the Skills API too | uploaded |\n| Windsurf / Cline | `windsurf` or `cline` profile — rules files, not skills | `.windsurf/rules`, `.clinerules` |\n| Anything else | Paste `templates/agent-block.md` into whatever instruction file it reads, and copy `skills/clean-code/` next to it | — |\n\nThree exceptions a generic installer gets wrong, and this one handles: Claude Code does not read the\nshared root; Grok Build CLI reads it personally but not inside a project; and Antigravity's personal\nroot is `~/.gemini/config/skills`, not `~/.agents/skills`. Full detail, including how each host lets\nyou invoke a skill explicitly, is in `references/host-matrix.md`.\n\n### Once for every project\n\nGlobal mode writes into the home-directory config that CLI agents read everywhere:\n\n```bash\nbash scripts/install.sh --global all      # ~/.claude, ~/.codex, ~/.config/opencode, ~/.gemini,\n                                          # ~/.agents/skills, ~/.grok/skills, ~/.gemini/config/skills\n```\n\n```powershell\npwsh scripts/install.ps1 -Global all\n```\n\nEditor rules (Cursor, Windsurf, Cline, Copilot) and the bare `skill` profile are project-scoped by design and are skipped in global mode.\n\n## Usage\n\nOnce installed, agents pick the skill up on their own — the `description` is what every host matches against, so a request about naming, structure, tests, or where a file belongs activates it without being asked.\n\n### The four commands\n\nThe skill takes arguments — `/clean-code <argument>` in Claude Code, with the full per-host forms listed under **Forcing it** below. Plain language (\"run the clean-code audit\") works on every host.\n\n| Command | What happens |\n| --- | --- |\n| `/clean-code audit` | Exhaustive audit: every file inventoried and reviewed, sweeps repeated until one adds zero new findings. Fills `.clean/` (context, architecture, decisions, ledger) and produces a findings-first report. Changes no code |\n| `/clean-code new-project <description>` | Greenfield protocol seeded with your description: requirements, actors, layers, standards, then vertical slices |\n| `/clean-code clean-up` | The cleanup campaign, consuming `.clean/ledger.md` in small verified batches — placement moves, package idioms, structure, boundaries. No ledger? It proposes the audit, names the project's file count, and waits for your consent |\n| `/clean-code questions` | Interviews you — purpose, layers, verify command, no-go zones — and writes the answers into `.clean/` |\n| *(no argument)* | The default session protocol for any coding task |\n\nCleanup never starts implicitly: it consumes the ledger the audit built, with a contract you approve first (`references/project-refactor.md`).\n\n### Prompt usage\n\nYou do not need special syntax. Ask for what you want and name the concern — the skill is written so that naming a concern routes the agent to the right rule.\n\n**Forcing it, when the host did not pick it up.** The explicit form varies more than you would expect: `/clean-code` in Claude Code, Copilot CLI, Grok Build CLI, Devin CLI and Hermes Agent (or `/clean-code-skills:clean-code` as a Claude Code plugin); `$clean-code` in Codex CLI; `@clean-code` in the Codex App; `/skill:clean-code` in Kimi Code. Gemini CLI and OpenCode have no user syntax — the agent activates it through a tool call. Cursor, Antigravity, Factory Droid and Pi document none, so name it in plain language:\n\n```text\nUse the clean-code skill for this.\n```\n\nThat works everywhere, because it puts the skill's own name into the text the description is matched against. The per-host table is in `references/host-matrix.md`.\n\nStarting a project:\n\n```text\nBootstrap a new payments service with clean architecture. Ask me whatever you\nneed before you design anything.\n\nSet up the project structure and declare the layers in .clean/architecture.md\nbefore writing any code.\n```\n\nWorking in an existing project — plain requests are enough, the skill loads itself:\n\n```text\nAdd a retry with backoff to the invoice sync. Keep the change surgical and tell\nme what you did not run.\n\nWhere should this currency formatter live? Follow the project's conventions and\ndo not invent a new folder.\n\nThis function validates, persists, sends mail, and renders. Split it along\nresponsibilities -- but only if my task actually touches it.\n```\n\nReviewing and auditing:\n\n```text\nAudit this project for clean code and architecture. Report only, change nothing.\nCite file and line for every finding.\n\nReview my current diff. Findings first, cite smell IDs, and skip anything the\nformatter already owns.\n\nDoes anything in src/domain import outward? Check the dependency direction and\nshow me the violations.\n```\n\nCleaning up, at scale:\n\n```text\nClean up this whole project. Propose the contract first -- depth, breadth, and\nbatch size -- and do not start editing until I agree.\n\nResume the cleanup campaign from .clean/ledger.md. Re-read the baseline before\nthe next batch.\n```\n\nArchitecture questions:\n\n```text\nShould this be a service, or a module in the same address space? Argue it from\nthe dependency rule, not from preference.\n\nExplain why this ORM type in the domain layer is a problem, and what the fix\nwould cost.\n\nIs this true duplication or accidental? These two functions look identical.\n```\n\nVerification and handoff:\n\n```text\nRun the verification you would need to prove this works, then report exactly\nwhat passed, what failed, and what you skipped.\n\nRecord this session's decisions in .clean/decisions.md and give me a clean\nhandoff.\n```\n\nTwo of these are worth knowing because they exercise what agents usually skip: asking for the **contract before a cleanup**, and asking what was **not run**. The skill is built to answer both honestly.\n\n### Optional enforcement\n\nInstructions are guidance, and a model can skip a step. Where determinism matters, let code do the checking:\n\n```bash\npython skills/clean-code/scripts/detect_stack.py --write       # cache project context\ncp skills/clean-code/assets/templates/architecture.md .clean/  # declare your layers\npython skills/clean-code/scripts/check_boundaries.py           # fail on outward dependencies\ncp skills/clean-code/assets/hooks/pre-commit .git/hooks/       # enforce it on every commit\n```\n\nThe pre-commit hook is the only enforcement that behaves identically on every host, because it needs no agent support at all.\n\n### Updating\n\nSame one-liner you installed with, plus `--detect`, which refreshes exactly the pieces already present and leaves everything else alone:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/btseee/clean-code-skills/main/scripts/remote-install.sh | bash -s -- --detect\n```\n\nNative channels update natively: Claude Code through the plugin marketplace, Gemini CLI with `gemini extensions update`, Claude Desktop by uploading the new release zip.\n\nThe rules block carries its version in its begin marker, so you can always see what a project is running. Agents are told **not** to fetch and execute remote update scripts on their own initiative — updating is your call.\n\nHow installs and updates behave:\n\n- **Shared files** (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.github/copilot-instructions.md`) get a managed block between `<!-- clean-code-skills:begin -->` markers. Everything outside the markers is preserved; updates replace only the block.\n- **Dedicated files and skill folders** (`.cursor/rules/clean-code.mdc`, `.windsurf/`, `.clinerules/`, `skills/clean-code/`, `.claude/skills/clean-code/`, `.github/skills/clean-code/`) are owned by this package and replaced on each run. A file that exists but was not created by this package is skipped unless you pass `--force`.\n- `--detect` inspects the target and operates only on profiles already installed — the right mode for updates.\n\n### Uninstalling\n\n```bash\nbash scripts/install.sh --target /path/to/project --uninstall all\n```\n\nRemoves managed blocks while keeping your own content, and deletes package-owned files and folders. Works with `--global` too.\n\n### Validating the package\n\nFor contributors, and after any change to the rules block:\n\n```bash\nbash scripts/validate.sh\n```\n\nOn Windows, run the same command from Git Bash. `pwsh scripts/validate.ps1` exercises only `install.ps1`, so the two installers stay in step.\n\nThe validator checks required files, front matter, version sync across every stamped location, managed-block consistency across all eight adapters, JSON and script syntax, the `SKILL.md` size budget, that the bundled Python imports nothing outside the standard library, that no shipped file carries an absolute machine path, that committed content is LF with a final newline, and full installer behavior — fresh install, content-preserving merge, idempotent re-install, a byte-identical install→uninstall round trip, `--detect`, global mode, and clean uninstall. CI runs the validator on Linux and on Windows (under Git Bash), exercises `install.ps1` with PowerShell, and adds markdownlint and a `skill-tools` job that executes all three bundled scripts against a fixture (including a boundary check that must fail, then pass) on every push and pull request.\n\n## Configuration\n\n### Project state: the `.clean/` directory\n\nThe mechanism that lets a memoryless session resume. Templates are in `skills/clean-code/assets/templates/`, and the protocol has the agent add `.clean/` to `.gitignore` — `architecture.md` is the one file usually worth committing, because it is a shared decision that drives a check in CI. The `audit` and `questions` commands create and populate the directory; a plain session reads it and offers to persist at the end.\n\n| File | Holds | Written by |\n| --- | --- | --- |\n| `context.json` | detected stack, frameworks, test command, layout, dependencies with versions, plus the interview's `confirmed` answers | `detect_stack.py --write` (merges — `confirmed` survives) and the `questions` interview |\n| `architecture.md` | declared layers and allowed dependencies | the `audit` or `questions` workflow, ordering confirmed with you |\n| `decisions.md` | decisions and their reasoning, append-only | any session that made a real choice |\n| `ledger.md` | the audit's coverage checklist and findings, then campaign state | the `audit` first, campaign sessions after |\n\nDeclare layers innermost first, in a fenced block the tools can read:\n\n````markdown\n```clean-architecture\nlayer domain         = src/domain/**\nlayer application    = src/application/**\nlayer adapter        = src/adapter/**\nlayer infrastructure = src/infrastructure/**\n\n# Optional. The default is inward-only, so most projects need none.\n# allow infrastructure -> domain\n```\n````\n\nThe default rule is the Dependency Rule itself: a layer may depend on itself and on any layer declared before it, and on nothing declared after it.\n\n### Environment variables\n\n| Variable | Effect |\n| --- | --- |\n| `CLEAN_CODE_REF` | Pin the remote installer to a version, e.g. `CLEAN_CODE_REF=v3.2.0` |\n| `CLEAN_CODE_HOME` | Override the home directory global mode installs into |\n| `CLEAN_CODE_HOOK=off` | Disable the pre-commit hook for one commit |\n| `PYTHON_BIN` | Point the hook at a specific interpreter |\n\n### Install profiles\n\n`claude`, `agents`, `codex`, `opencode`, `jules`, `gemini`, `cursor`, `copilot`, `windsurf`, `cline`, `grok`, `antigravity`, `skill`, `all`. Pass any combination; `--detect` picks the ones already present.\n\n`agents` is the one that matters most: it writes the `AGENTS.md` block **and** installs the full skill into `.agents/skills/clean-code/`, the shared root that twelve of the supported hosts read project-side. `codex`, `opencode` and `jules` are aliases for it (Jules reads `AGENTS.md` and the shared root; it is not separately verified, hence the alias rather than a row of its own).\n\n### Hooks\n\n`skills/clean-code/assets/hooks/pre-commit` is portable and needs no host support. `claude-settings.json` adds a session-start context print and a post-edit boundary check for Claude Code — merge it into `.claude/settings.json` rather than replacing the file. Neither hook blocks an edit; only the pre-commit hook blocks a commit, and only when the declared architecture is violated — or cannot be checked at all, because the declaration matches no files. The hook finds the skill in any of the project or global install locations and probes for `python3`, `python`, or `py`.\n\n## Examples\n\n### Declare an architecture and enforce it\n\n```console\n$ python skills/clean-code/scripts/check_boundaries.py\nDependency Rule check\n\n  Layers (innermost first): domain -> application -> adapter -> infrastructure\n  Files matched           : domain (5), application (149), adapter (8), infrastructure (12)\n  Cross-layer imports     : 304\n\n  FAIL: 1 dependency-rule violation(s).\n\n  src/domain/order.py:3: domain -> infrastructure (imports app.infrastructure.db)\n\n  Each line above is an outward dependency: an inner layer that knows\n  about an outer one. Fix by inverting it -- declare the interface in\n  the inner layer and implement it in the outer one -- not by widening\n  the rules.\n```\n\n### See what a cold session would find\n\n```console\n$ python skills/clean-code/scripts/detect_stack.py\nProject context (inferred; confirm before relying on it)\n\n  Primary language : C#\n  Languages        : C# (509), SQL (20), Python (5), Shell (2)\n  Ecosystems       : .NET solution, C#/.NET\n  Frameworks       : ASP.NET Core\n  Test runners     : MSTest\n  Test files       : 74\n  Source roots     : src\n  Quality tools    : EditorConfig\n  Dependencies     : 13 declared (13 with versions): Dapper 2.1.35, Serilog 4.0.1, ...\n    Verify API usage against these versions, not memory;\n    the full list is in context.json.\n  Verify with      : dotnet test\n\n  Layer candidates (conventional names found in paths):\n    domain         Core (31)\n    infrastructure Persistence (18)\n    Direction of dependencies is NOT verified here. Declare the\n    intended layering in .clean/architecture.md, then run\n    check_boundaries.py to test whether the code obeys it.\n```\n\n### Ask for a report instead of changes\n\n> Audit this project for clean code and architecture.\n\nProduces a findings-first report with a coverage line (files inventoried / reviewed / sweeps to convergence), a verdict, the recorded test baseline, findings by severity with file and line, an architecture assessment, a dependency review against installed versions, placement move candidates, and a recommended sequence — while filling `.clean/` and changing no production code. See `references/audit-report.md`.\n\n### Report completion honestly\n\nThe difference the skill insists on:\n\n> ~~This should work now.~~\n>\n> I ran `npm test -- email-validator` and the empty-email regression test passes. I did not run the full suite.\n\nMore before-and-after cases, in Python, TypeScript, Go and SQL, are in `references/examples.md`.\n\n## Constraints\n\nWorth knowing before you adopt it.\n\n- **`SKILL.md` is budget-locked** to 500 lines and roughly 5,000 tokens, because hosts load the whole body on activation. Depth lives in `references/`, which load on demand. The validator enforces the ceiling.\n- **Only five frontmatter fields are portable** — `name`, `description`, `license`, `compatibility`, `metadata`. `allowed-tools` is experimental and is never relied on for correctness.\n- **Hooks, slash commands, permissions, and memory are not part of the Agent Skills standard.** They are host-specific, so they live in `assets/` and `host-matrix.md` with a portable substitute for each.\n- **The bundled scripts are standard library only, with no network access.** They read your files and write only to `.clean/`. A validator check rejects any third-party import.\n- **Script output is evidence, not a verdict.** `scan_repo.py` measures; deciding what matters is the agent's job.\n- **The Boy Scout Rule is deliberately narrowed.** Agents clean the lines a task already touches and report the rest, because an agent applying the rule broadly produces unreviewable diffs. The departure from the source is documented in `references/chapter-map.md` rather than left implicit.\n- **No cross-host smoke test has been run.** Portability rests on conformance to the Agent Skills specification and the per-host audit in `host-matrix.md`, not on observed behavior in Copilot CLI, Codex, Cursor or Gemini CLI.\n- **No book text is reproduced here.** Principle names and their canonical one-line formulations are the established vocabulary of the field; all guidance around them is written for this project. Copyrighted study material used while writing it is gitignored and must never be committed or redistributed with this repo. If you clone this to study from, keep it that way.\n\n### Releases and versioning\n\n`VERSION` is the single source. To release: update `VERSION`, run `bash scripts/sync.sh` to propagate it everywhere, validate, then tag.\n\n```bash\ngit tag \"v$(cat VERSION)\"\ngit push origin main --tags\n```\n\nThe release workflow validates, checks the tag against `VERSION` — they must match exactly — and publishes a GitHub release with `clean-code.zip`, the skill packaged for Claude Desktop / claude.ai / Skills API upload. See [CHANGELOG.md](./CHANGELOG.md) and [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n",
  "bytes": 28197,
  "sha": "e4260216e9c0df06e1700e46291d9a035eee1a83a2d83597890080b74bc1d4cc",
  "repo_slug": "btseee/clean-code-skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_btseee_clean_code_skills_9c5e8339/readme"
}