claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage. Use when adding code, choosing a dependency, or auditing a diff.
Claude Code
$ npx -y skills add athola/claude-night-market --skill elegant-code --agent claude-code
Codex
$ npx skills add athola/claude-night-market --skill elegant-code -a codex -y
Cursor
$ npx skills add athola/claude-night-market --skill elegant-code -a cursor -y
Gemini CLI
$ npx skills add athola/claude-night-market --skill elegant-code -a gemini-cli -y
GitHub Copilot
$ npx skills add athola/claude-night-market --skill elegant-code -a github-copilot -y
OpenCode
$ npx skills add athola/claude-night-market --skill elegant-code -a opencode -y
Windsurf
$ npx skills add athola/claude-night-market --skill elegant-code -a windsurf -y
name: elegant-code description: Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage. Use when adding code, choosing a dependency, or auditing a diff. alwaysApply: false category: conservation tags: - minimalism - yagni - decision-ladder - dependency-discipline - additive-bias tools: [] complexity: low estimated_tokens: 900
> Write the minimal, elegant code that fully solves the problem: > its performance, its edge cases, and its failure cases. Minimal > is not fewest lines. It is no incidental complexity, with > nothing essential omitted.
This skill codifies a discipline that strong models already exhibit *some* of the time. Its value is not teaching a missing capability. Its value is three things:
1. A shared **vocabulary** (the rungs, the floor) that review skills can point at, so "you skipped rung 2" is a concrete, auditable note. 2. **Consistency**: the ladder is applied every time, not just when the model happens to think of it. 3. A **guard**: the negligence floor below is never traded away for brevity.
It is the generative counterpart to the review-side contract in `leyline:additive-bias-defense`.
dependency.
near zero.
add the guard first and optimize length second.
Walk the rungs in order. Climb down only when the current rung does not hold. Stop at the first rung that solves the problem.
| # | Rung | Ask | Stop here when | Example | |---|------|-----|----------------|---------| | 1 | Need-to-exist | Does this need to exist at all? | The requirement is speculative or already met. Delete or defer. | "Config loader for a value used once" -> inline the value | | 2 | Already in this repo | Does this codebase already do this somewhere? | A helper, module or convention here covers it. Reuse it. | an existing `estimate_tokens` before writing another | | 3 | Builtin / stdlib | Can a language builtin or the standard library do it? | The stdlib covers it. | `str.zfill`, `f"{n:05d}"`, `pathlib`, `itertools` | | 4 | Native platform | Is there a native platform or framework feature? | The platform already ships it. | `URLSession` retry, `fetch`, framework validators | | 5 | Installed dependency | Is an already-installed, audited dependency enough? | A dep in the lockfile covers it. | reuse `requests`/`urllib3` backoff before adding `tenacity` | | 6 | A few lines | Can it be one line or a small explicit block? | A short, obvious block solves it. | a 20-line retry loop over a retry framework |
Search before writing: `rg` for the function, the concept and its likely names. Rung 2 sits above the stdlib because a second way of doing something the codebase already does is a redundant model. Each one is locally valid, and every later change must translate between them. Measured agent adoption leaves complexity raised after the velocity gain fades (`docs/knowledge-corpus/decoherence.md`).
the stdlib offers a shorter spelling.
(stdlib, native platform, installed dependency) and compare the contracts. The same contract in a different spelling is reused as it is. A contract that differs with a recorded reason is reused, and the reuse cites that reason. A contract that differs with no recorded reason is raised with both models named before it spreads to new code. A departure is an input the two handle differently: a copied version key in minister ranked `1.10.1-rc1` below `1.10.0`.
Never copy the superseded variant, even when it is the majority of call sites.
retires the first in the same change or records why both must stand (in the commit body, or the module docstring when it must outlive the commit).
not quietly start a parallel one.
A *new* dependency is the last resort, below rung 6. Before adding one, verify it actually exists and is safe with `Skill(imbue:dependency-verification)`: generated code imports non-existent packages at measurable rates, and recurring fake names enable slopsquatting (arXiv 2406.10279, USENIX 2025).
Prefer reuse of an installed, audited dependency over both a new dependency and a hand-rolled reinvention. Zero-dependency code is not automatically cheaper: it relocates the maintenance and bug surface into your own tree (see `references/sources.md`).
Minimal does not mean fewest lines. It means no incidental complexity, with nothing essential omitted. The decision ladder removes incidental code: reinvention, speculative abstraction, needless dependencies. Three things are essential and are never traded for brevity.
Never cut for brevity. A review must never propose deleting these as "extra code":
that cannot double-charge).
This floor is evidence-backed, not a slogan. The dangerous failure mode in generated code is *omission*: roughly 45% of AI-generated samples carry a security flaw, with a measured ~2.74x vulnerability rate versus human c
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use…
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily…
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use…
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled…
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.