[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77MEJQ0MXKQJZMXBGAXWRVZ":3,"skill-same:01M77MEJQ0MXKQJZMXBGAXWRVZ":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M77MEJQ0MXKQJZMXBGAXWRVZ","writing-clean-code",null,"Use when refactoring or restructuring code, splitting a file or module that has grown too large, deciding whether to extract a helper or inline it, naming things, removing dead or unused code, drawing module or package boundaries, handling errors, writing comments, applying DDD or hexagonal (ports and adapters) architecture, or checking a language's idiomatic style.","rahulmutt\u002Fdevkit","rahulmutt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8035100?v=4","01M77MDP08WTFYCS2MD2Q580EJ","Rahul Muttineni","01M77MDP11EQ3MN8WV69GM6JKP",0,"MIT","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: writing-clean-code\ndescription: Use when refactoring or restructuring code, splitting a file or module that has grown too large, deciding whether to extract a helper or inline it, naming things, removing dead or unused code, drawing module or package boundaries, handling errors, writing comments, applying DDD or hexagonal (ports and adapters) architecture, or checking a language's idiomatic style.\n---\n\n# Writing Clean Code\n\nCode should be easy for both humans and coding agents to maintain and evolve\nlong-term. Optimize every authoring decision for the next reader, who is often\nan agent with a bounded context window — legibility and locality serve both\naudiences at once.\n\n## Principles — each with its counter-pull\n\nEach principle names the failure it prevents _and_ the over-application it\nguards against, so neither humans nor agents apply it mechanically.\n\n### Abstract real duplication, not speculative duplication\n\nDRY when the same _decision_ repeats; tolerate incidental similarity. Prefer the\nrule of three over premature generalization — wait for a third repetition before\nreaching for an abstraction. Counter-pull: a wrong abstraction costs more than\nthe duplication it removed.\n\n### Inline the single-use and simple; name the reused or complex\n\nCollapse a variable or helper used once that adds no clarifying value; extract\nwhen it is reused or when the name documents intent. The test is _does the name\nearn its keep_, not line count.\n\n### One purpose per unit\n\nA module, function, or file should have a single reason to change. Growing size\nis the smell that surfaces a violation, not the violation itself.\n\n### Prefer small, modular units\n\nCompose behavior from many small, independently replaceable units rather than a\nfew large coupled ones — a unit you can understand, test, and swap without\nholding the rest in your head. Counter-pull: don't shatter one coherent behavior\ninto a dozen trivial units that only ever change together — premature\ndecomposition couples through indirection what was clear inline.\n\n### Domain-driven design\n\nName things in the domain's language; let module boundaries follow domain\nboundaries (bounded contexts), not technical layers alone. Counter-pull: don't\nimpose heavy tactical DDD patterns on a thin or CRUD domain.\n\n### Explicit boundaries and dependency direction\n\nSub-components talk through narrow, well-defined interfaces; dependencies point\ninward toward the domain. See\n[`references\u002Fhexagonal-architecture.md`](references\u002Fhexagonal-architecture.md).\n\n### Optimize for the next reader (human or agent)\n\nLocality of behavior, explicit over clever, names that make comments redundant.\nCounter-pull: don't chase brevity at the cost of legibility — a terse line the\nnext reader must decode is not optimizing for them.\n\n### Handle errors where you can act on them\n\nValidate at the boundary, then let the core trust its inputs. Catch an error\nonly where something useful can happen — retry, fall back, add context, or\nreport it to the user — and otherwise let it propagate with context attached.\nNever swallow an error silently. Counter-pull: don't wrap every call in\ndefensive try\u002Fcatch or re-validate data the boundary already checked; noise\nhides the handling that matters.\n\n### Comments say why, code says what\n\nComment the non-obvious — the reason, the constraint, the rejected alternative,\nthe workaround's upstream issue. Counter-pull: a comment restating the code is a\nsecond copy that drifts; rename or restructure until it's redundant, then delete\nit.\n\n### Prefer small, isolated files\n\nOne unit per file; keep files small enough to hold in a context window, and\nisolated enough that one file's internals aren't entangled with another's.\nCounter-pull: don't fragment so far that following one behavior means opening\nten files — locality matters as much as size.\n\n### Every line is a liability\n\nEvery line added is a line to read, test, and maintain — the cheapest code is\nthe code you don't write, so reach for the simplest thing that works (YAGNI).\nWhen code is reachable from no code path and you are _absolutely sure_, delete\nit; dead code misleads the next reader. Counter-pull: \"unused\" is easy to get\nwrong — check for reflection, dynamic dispatch, public API surface, feature\nflags, and external callers before deleting. When unsure, leave it and flag it.\n\n## Coding style\n\nStyle is mostly language-specific — follow the language's canonical style guide\nand let its formatter and linter be the source of truth, rather than\nhand-policing what a formatter already enforces. See the per-language references\nbelow for the canonical guide, formatter, linter, and key idioms for each\nsupported language.\n\n## Boundaries with sibling skills\n\n- Formatter \u002F linter installation → **`developer-environment`** (mise-pinned,\n  devenv.nix fallback). This skill names the style guide and idiom and never\n  gives install commands.\n- Counterpart skill for _validating_ code: `testing-practices` (this skill is\n  the _authoring_ counterpart).\n\n## References\n\n- [`references\u002Fhexagonal-architecture.md`](references\u002Fhexagonal-architecture.md)\n  — ports & adapters, the dependency rule, and when it earns its cost vs.\n  over-engineering.\n- Per-language canonical style guide, formatter, linter, and idioms:\n  [`references\u002Ftypescript.md`](references\u002Ftypescript.md),\n  [`references\u002Fpython.md`](references\u002Fpython.md),\n  [`references\u002Frust.md`](references\u002Frust.md),\n  [`references\u002Fgo.md`](references\u002Fgo.md),\n  [`references\u002Fhaskell.md`](references\u002Fhaskell.md).\n","# Writing Clean Code\n\nCode should be easy for both humans and coding agents to maintain and evolve\nlong-term. Optimize every authoring decision for the next reader, who is often\nan agent with a bounded context window — legibility and locality serve both\naudiences at once.\n\n## Principles — each with its counter-pull\n\nEach principle names the failure it prevents _and_ the over-application it\nguards against, so neither humans nor agents apply it mechanically.\n\n### Abstract real duplication, not speculative duplication\n\nDRY when the same _decision_ repeats; tolerate incidental similarity. Prefer the\nrule of three over premature generalization — wait for a third repetition before\nreaching for an abstraction. Counter-pull: a wrong abstraction costs more than\nthe duplication it removed.\n\n### Inline the single-use and simple; name the reused or complex\n\nCollapse a variable or helper used once that adds no clarifying value; extract\nwhen it is reused or when the name documents intent. The test is _does the name\nearn its keep_, not line count.\n\n### One purpose per unit\n\nA module, function, or file should have a single reason to change. Growing size\nis the smell that surfaces a violation, not the violation itself.\n\n### Prefer small, modular units\n\nCompose behavior from many small, independently replaceable units rather than a\nfew large coupled ones — a unit you can understand, test, and swap without\nholding the rest in your head. Counter-pull: don't shatter one coherent behavior\ninto a dozen trivial units that only ever change together — premature\ndecomposition couples through indirection what was clear inline.\n\n### Domain-driven design\n\nName things in the domain's language; let module boundaries follow domain\nboundaries (bounded contexts), not technical layers alone. Counter-pull: don't\nimpose heavy tactical DDD patterns on a thin or CRUD domain.\n\n### Explicit boundaries and dependency direction\n\nSub-components talk through narrow, well-defined interfaces; dependencies point\ninward toward the domain. See\n[`references\u002Fhexagonal-architecture.md`](references\u002Fhexagonal-architecture.md).\n\n### Optimize for the next reader (human or agent)\n\nLocality of behavior, explicit over clever, names that make comments redundant.\nCounter-pull: don't chase brevity at the cost of legibility — a terse line the\nnext reader must decode is not optimizing for them.\n\n### Handle errors where you can act on them\n\nValidate at the boundary, then let the core trust its inputs. Catch an error\nonly where something useful can happen — retry, fall back, add context, or\nreport it to the user — and otherwise let it propagate with context attached.\nNever swallow an error silently. Counter-pull: don't wrap every call in\ndefensive try\u002Fcatch or re-validate data the boundary already checked; noise\nhides the handling that matters.\n\n### Comments say why, code says what\n\nComment the non-obvious — the reason, the constraint, the rejected alternative,\nthe workaround's upstream issue. Counter-pull: a comment restating the code is a\nsecond copy that drifts; rename or restructure until it's redundant, then delete\nit.\n\n### Prefer small, isolated files\n\nOne unit per file; keep files small enough to hold in a context window, and\nisolated enough that one file's internals aren't entangled with another's.\nCounter-pull: don't fragment so far that following one behavior means opening\nten files — locality matters as much as size.\n\n### Every line is a liability\n\nEvery line added is a line to read, test, and maintain — the cheapest code is\nthe code you don't write, so reach for the simplest thing that works (YAGNI).\nWhen code is reachable from no code path and you are _absolutely sure_, delete\nit; dead code misleads the next reader. Counter-pull: \"unused\" is easy to get\nwrong — check for reflection, dynamic dispatch, public API surface, feature\nflags, and external callers before deleting. When unsure, leave it and flag it.\n\n## Coding style\n\nStyle is mostly language-specific — follow the language's canonical style guide\nand let its formatter and linter be the source of truth, rather than\nhand-policing what a formatter already enforces. See the per-language references\nbelow for the canonical guide, formatter, linter, and key idioms for each\nsupported language.\n\n## Boundaries with sibling skills\n\n- Formatter \u002F linter installation → **`developer-environment`** (mise-pinned,\n  devenv.nix fallback). This skill names the style guide and idiom and never\n  gives install commands.\n- Counterpart skill for _validating_ code: `testing-practices` (this skill is\n  the _authoring_ counterpart).\n\n## References\n\n- [`references\u002Fhexagonal-architecture.md`](references\u002Fhexagonal-architecture.md)\n  — ports & adapters, the dependency rule, and when it earns its cost vs.\n  over-engineering.\n- Per-language canonical style guide, formatter, linter, and idioms:\n  [`references\u002Ftypescript.md`](references\u002Ftypescript.md),\n  [`references\u002Fpython.md`](references\u002Fpython.md),\n  [`references\u002Frust.md`](references\u002Frust.md),\n  [`references\u002Fgo.md`](references\u002Fgo.md),\n  [`references\u002Fhaskell.md`](references\u002Fhaskell.md).\n",{"name":5,"description":7},"main","f92fca73134478305fd12b6f207db4ac71a1a901","skills\u002Fwriting-clean-code","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit","https:\u002F\u002Fgithub.com\u002Frahulmutt","2026-10-19 03:03:07",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add rahulmutt\u002Fdevkit --skill writing-clean-code",{"tool":36,"command":37},"bunx","bunx skills add rahulmutt\u002Fdevkit --skill writing-clean-code",{"tool":39,"command":40},"pnpm","pnpm dlx skills add rahulmutt\u002Fdevkit --skill writing-clean-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002FSKILL.md",true,[44,50,54,58,62,66],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fgo.md","REFERENCE","参考文档",578,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Fgo.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fhaskell.md",618,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Fhaskell.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fhexagonal-architecture.md",3895,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Fhexagonal-architecture.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fpython.md",636,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Fpython.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Frust.md",585,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Frust.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Ftypescript.md",676,"https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-clean-code\u002Freferences\u002Ftypescript.md",[71,78,85,92,99,106],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M77MEG5ZPHCG2VZKHV885VPQ","using-devkit","Use when starting any conversation or new engineering task in a repo with devkit installed — establishes that devkit skills exist and must be checked before acting.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fusing-devkit\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M77MECVQXHNQN0FQD62451G0","testing-practices","Use when writing, adding, or reviewing tests; choosing between unit, integration, snapshot\u002Fgolden, property, fuzz, mutation, e2e\u002FUI, or formal methods; when a test is flaky or the suite or CI is slow; or when deciding what runs in pre-commit, PR CI, or nightly.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Ftesting-practices\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M77ME7KX7BK4H37744MTG2J2","security-practices","Use when code touches a trust boundary — HTTP endpoints, webhooks, file uploads, auth, sessions, permissions, SQL or shell built from input, deserialization, service-to-service calls — when handling secrets, API keys, or .env files, on a CVE or vulnerability alert, when writing a threat model, or when choosing secret, SCA, SAST, or container scanners.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity-practices\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M77ME3080TN2RA76XBGJ5WKV","navigable-codebases","Use when writing or updating a README, AGENTS.md, CLAUDE.md, GEMINI.md, ARCHITECTURE.md, or onboarding docs; when setting up a new repository; when adding or naming task-runner commands (mise tasks, Makefile, justfile, npm scripts); or when getting-started steps are missing, stale, or slow for newcomers.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fnavigable-codebases\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M77MDZ2DRB45G9V3BTJ6VXTK","developer-environment","Use when installing or upgrading any tool, runtime, CLI, or library — brew, apt, npm i -g, pip install, cargo install, nvm, pyenv, asdf — editing mise.toml or .tool-versions, bumping or pinning versions, adding a dependency, hitting \"command not found\", setting up a dev or CI toolchain, reviewing Renovate or Dependabot version bumps, or considering Bazel.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fdeveloper-environment\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M77MDVH8D6Y5SPF72DXMYBS3","commits-and-releases","Use when writing commit messages or splitting work into commits; when cutting, versioning, or tagging a release; when editing a CHANGELOG or bumping a version number; when setting up or fixing release-please, semantic-release, or changesets; or when a release has the wrong version or is missing changelog entries.","https:\u002F\u002Fgithub.com\u002Frahulmutt\u002Fdevkit\u002Fblob\u002Fmain\u002Fskills\u002Fcommits-and-releases\u002FSKILL.md",[],[]]