agent-comms
SendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against…
Necessity (YAGNI) gate before writing code: delete, reuse, stdlib, one-liner, then minimum. TRIGGER when: about to add code, a feature, a dependency or an abstraction. SKIP: sequencing a plan (planning-methodology); scoring a plan (quality-validation); checking finished work
$ npx -y skills add komluk/scaffolding --skill necessity-first --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/necessity-firstContext preview
The summary Claude sees to decide when to auto-load this skill.
Necessity (YAGNI) gate before writing code: delete, reuse, stdlib, one-liner, then minimum. TRIGGER when: about to add code, a feature, a dependency or an abstraction. SKIP: sequencing a plan (planning-methodology); scoring a plan (quality-validation); checking finished work
name: necessity-first description: "Necessity (YAGNI) gate before writing code: delete, reuse, stdlib, one-liner, then minimum. TRIGGER when: about to add code, a feature, a dependency or an abstraction. SKIP: sequencing a plan (planning-methodology); scoring a plan (quality-validation); checking finished work (verification-before-completion)."
The cheapest code is code that never gets written. This skill is a gate that runs **after** you understand the problem and **before** you implement: climb a short ladder and stop at the first rung that solves it. The goal is the smallest change that actually works, not the most impressive one.
Be lazy about the **solution**, never negligent about **correctness or safety**. Hardening, extra layers and "best practice" beyond what the task needs are an *option to offer*, not a default to impose.
TRIGGER when:
SKIP (use the named skill instead):
Boundary in one line: this skill decides **whether and how little** to build; the others plan it, score it, style it, or verify it.
The ladder is only valid on top of understanding. Before climbing it, read the code you would touch and trace the real flow (caller, data, failure path). Without that, "it already exists" and "one line is enough" are guesses.
Climb in order. Stop at the first rung that works.
| # | Rung | Question | If yes | |---|------|----------|--------| | 1 | Existence | Does this need to exist at all? Is the requirement real, or can we delete or not build it? | Do nothing, or delete. Say so. | | 2 | Reuse | Is it already in this codebase? | Call or extend what exists. | | 3 | Platform | Does the stdlib, the platform, or a dependency we already have do it? | Use that. No new dependency for a solved problem. | | 4 | Trivial | Can it be one line or a trivial edit? | Make that edit. | | 5 | Minimum | Only now: what is the least code that works? | Write that, plus a small test where the logic branches, loops, parses, handles money, or touches security. |
Rules of thumb:
nobody asked for, no "we might need it later".
security. One-liners with no logic do not need one.
Never cut these in the name of minimalism. They are part of "works", not extras:
| Always keep | Examples | |-------------|----------| | Trust-boundary / input validation | User input, API payloads, file uploads, env/config from outside | | Data-loss handling | Transactions, atomic writes, confirmation before destructive ops, backups | | Security | Authn/authz, secrets handling, injection and traversal defenses | | Accessibility | Labels, keyboard access, contrast, semantic markup |
Minimal means no *unnecessary* code. Safe-by-necessity code is necessary.
End each implementation with a short, honest note:
**Skipped / deferred / risks** - Skipped: [what you deliberately did not build, and why] - Deferred: [what could be added later if it becomes real] - Risks: [what the user should know — limits, assumptions, untested paths]
Keep it to a few lines. "Nothing skipped" is a valid answer when true.
| Mistake | Correction | |---------|------------| | Starting at rung 5 | Walk rungs 1-4 first; write down why each failed | | Climbing without reading the code | Do Step 0; trace the real flow | | Skipping validation or auth "to keep it small" | Carve-out is mandatory | | Adding a dependency for a stdlib one-liner | Rung 3 | | Building the configurable/extensible version unasked | Offer it as an option in the closing note | | Treating the ladder as a reason to refuse work | It picks the smallest *working* change, it does not block the task | | Silent omissions | Always list skipped/deferred/risks |
Spec-driven multi-agent orchestration for Claude Code — pure markdown, zero backend, runs on the stock runtime. 13 agents, 39 skills, 20 commands, 19 hooks, per-phase model tiers, opt-in lifecycle hooks, optional cross-device semantic memory.
SendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against…
Repo-local file memory under .scaffolding/ (shared/agent/conversation tiers). TRIGGER when: reading or writing .scaffolding/…
RESTful API design standards: resource naming, HTTP methods, status codes, pagination, versioning. TRIGGER when: designing new…
Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an…
Schema design, index strategy, migration safety, and query analysis. TRIGGER when: designing tables or indexes, writing a…