all skills / build
arsdlc-craft
Bridge to code-craft, the line-level clean-code discipline.
Use during BUILD and review, before writing or refactoring code, over anything: over-engineering, dead code, deep nesting, any/casts, swallowed errors, duplication. Prefers the official code-craft skill (AnshRoshan/ansh-other-skills) when installed, falls back to an embedded distillation, and adds the arsdlc scope rules - craft serves the spec, touched lines only.
MIT · skills/arsdlc-craft/SKILL.md · read the same way by every supported harness
Install everything, or just this one
npx skills add AnshRoshan/arsdlcnpx skills add AnshRoshan/arsdlc --skill arsdlc-craftClaude Code: /plugin marketplace add AnshRoshan/arsdlc, then/plugin install arsdlc@arsdlc. Skills work without the CLI; the CLI is what makes done mean something.
Ponytail decides whether the code needs to exist. Craft decides how the code that must exist is written: least lines, honest types, organized so the next change touches few files - then delete what no longer earns its place.
0. Companion resolution (silent, every session)
- If a skill named
code-craftis available (Claude Code pluginansh-other-skills@ansh-other-skills, a.agents/skills/code-craft/SKILL.mdcopy, or any harness that reads SKILL.md), invoke it for the full ladder, smell→fix tables, and reference files (types, control-flow, naming, organization, refactoring catalog, tests). Then apply §3 of this file. - If not installed, apply §1-§3 below. Say once per session: "official
code-craftnot installed; using arsdlc's embedded distillation. Install withnpx arsdlc addon code-craft." - Never install anything without asking.
1. The ladder (climb before writing)
Stop at the first rung that solves the problem:
- Does it need to exist? No present, real requirement → don't build it (YAGNI). Existing code now unused and in scope → delete it.
- Stdlib / the platform? Use it; add no dependency.
- An already-installed dependency? Use it before adding a new one.
- One line / one expression? Write that; don't wrap it in a class, layer, or config.
- The minimum honest code. Smallest version with good names and real types.
If you cannot point to two concrete cases today, an abstraction (interface, base class, strategy, plugin hook, generic param) is premature. Wait for the third (Rule of Three).
2. Smell → fix (touched lines only)
| smell | fix |
|---|---|
| dead / unused code (exports, params, branches) | delete; confirm dynamic references first (reflection, routes, DI, templates) |
| deep nesting | guard clauses, early returns; invert the condition |
| long argument list | options object - but only from 3-4 args that travel together |
any / casts / non-null assertions |
type the boundary once, honestly; no lying types to silence the checker |
| swallowed errors / floating promises | handle, wrap with context, or let it crash loudly - never catch {} |
| comments restating the code | delete the comment; rename if the code is unclear |
| copy-paste duplication | extract only on the third instance |
| god class / fat interface | split along the seams the change actually uses - not speculative axes |
The official code-craft skill carries the full tables and six reference files; this row set covers the 90% case.
3. The arsdlc part: craft serves the spec
- Blast radius = the task's requirement and its scenario. Fix in-scope lines; out-of-scope mess gets flagged for
arsdlc-review, not fixed in passing. Unrequested cleanup is how diffs grow teeth. - Deletion that changes spec-relevant behaviour is a delta. Dead-code removal touching a
SHALLline's path goes througharsdlc-delta, never a quiet edit. - A tool's candidate list is not proof. knip/vulture/tsc findings must be confirmed by hand (dynamic references) before deletion - and the deletion still needs the evidence run to pass.
- Craft never trades away the never-lazy list (
arsdlc-ponytail§4): trust boundaries, data loss, security, a11y, anything the spec says. - Report what you changed and what you deliberately left alone; the second half is what the reviewer reads first.