skills/spec-write/SKILL.md
This skill should be used when the user asks to "write a spec", "create a spec", "spec this out", "plan this feature", or "write an implementation plan" for a feature or change. Creates a structured implementation spec in .specs/<slug>/spec.md and mirrors it to GitHub only when the current repository is hosted on GitHub.
npx skillsauth add ryan-mahoney/ryan-llm-skills spec-writeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a deterministic implementation spec from the current proposal and persist it to the repository-local spec folder. The local file is canonical; issue trackers are optional mirrors.
Always write the completed spec to:
.specs/<feature-slug>/spec.md
If the current repository is a GitHub repository and gh is authenticated, also mirror the same spec body to a GitHub issue:
$ARGUMENTS is an issue number, edit that issue.Do not require GitHub for this workflow. Bitbucket, GitLab, self-hosted, and local-only repositories use .specs/<feature-slug>/spec.md only.
Before writing the spec, locate the spec folder for this feature: .specs/<feature-slug>/.
Resolve the folder in this order:
$ARGUMENTS names an existing .specs/<feature-slug>/ folder, use it.spec-architect-initial, use it..specs/*/ folder whose proposal.md matches the feature under discussion, using the most recently modified match on ties..specs/<feature-slug>/ from a short kebab-case feature slug.The folder contains fixed-name artifacts:
proposal.md - the architecture proposal. This is the primary input for the Architecture and Implementation Steps sections. If there is no spec folder, no proposal, and no analysis in the current conversation, stop and tell the user there is nothing to spec from.critique.md - optional. If present, reconcile it using the rules below. If absent, skip reconciliation; the critique stage is optional and its absence is not an error.spec.md - the output of this skill. Overwrite it only after producing the complete updated spec body.A large proposal may be split into multiple specs, one per phase. All phase specs share the same spec folder unless the proposal explicitly creates separate folders.
When writing a phase spec:
Spec folder: .specs/<feature-slug>/ (phase N).Treat GitHub as an optional mirror only when all of these are true:
git remote get-url origin identifies a GitHub remote, such as [email protected]:owner/repo.git or https://github.com/owner/repo.git.command -v gh succeeds.gh auth status succeeds for the remote host.If any check fails, continue with the local spec.md output and report why the GitHub mirror was skipped. Do not block spec creation on issue-tracker access.
Triage each recommendation by scope and relevance:
| Priority | Action | |---|---| | Must Address - flaws that will cause real problems if shipped | Incorporate into the spec's architecture. If a recommendation changes a core decision, update the design and document the rationale. | | Should Address - meaningful improvements, not showstoppers | Address in the spec if the scope of the feature makes it natural to include. Otherwise, record in the Notes section as a known follow-up with a brief rationale for deferring. | | Consider - polish/refinement | Note in the Notes section only if relevant. Skip if out of scope. No need to address every consideration. |
Reconciliation principles:
Apply reconciled decisions when writing the Architecture, Notes, and Implementation Steps sections below.
Every section is required. If not applicable, include the heading with "N/A".
List concrete technical domains required for this implementation. Include only skills actually needed.
In 2-4 sentences: what capability is missing or broken, what the current behavior is, and what this spec addresses.
One sentence describing the concrete outcome when implementation is complete.
Include:
Design for current requirements, not imagined future ones. Start simple: boring technology, explicit boundaries, and data flow that can be explained in under 5 minutes. Fail fast on invalid inputs; do not add defensive fallbacks unless explicitly required.
Avoid abstractions with only one use, abstract layers "for future flexibility," complex patterns without matching problem complexity, and optimizations without measured need.
Create a numbered list (AC-1, AC-2, etc.) of observable, automatable assertions:
Cover trade-offs, risks, ambiguities, migration concerns, and sequencing dependencies.
For each significant trade-off, state why this approach was chosen, what it gives up, what it gains, and which alternatives were considered.
Create a flat, numbered, sequential list of deterministic engineering tasks.
For each step include:
Covers: AC-3, AC-7). Every criterion must be covered by at least one step; a step covering no criterion must trace to a stated architectural need instead.Step constraints:
Step ordering:
Exclude:
End spec.md with a single metadata line so downstream skills can locate the folder:
Spec folder: .specs/<feature-slug>/
For phase specs, include the phase:
Spec folder: .specs/<feature-slug>/ (phase 2)
The GitHub mirror, when used, must contain the same footer.
.specs/<feature-slug>/spec.md.Do not implement the plan.
Do not add Co-Authored-By trailers, "Generated with" footers, or any AI model attribution.
data-ai
This skill should be used when the user asks to "execute the spec", "run the plan", "implement the spec", "implement the issue", "run all steps", or "run spec". Implements all steps from .specs/<slug>/spec.md, using a subagent per step when the harness supports subagents.
testing
This skill should be used when the user asks to "review a spec", "review an issue", "check the plan", "review the implementation plan", "find gaps in the spec", or "review spec". Reviews .specs/<slug>/spec.md for gaps and viability, edits it when needed, and mirrors changes to GitHub only when a GitHub mirror exists.
development
This skill should be used when the user asks to "remediate the audit findings", "fix the spec violations", "close the audit findings", "fix conformance violations", or "spec remediate". Reads a spec-audit report, drives one smart subagent per VIOLATION to converge the code back to the frozen spec, and re-audits until clean. Edits production code; never rewrites the spec.
development
This skill should be used when the user asks to "compile review criteria", "generate spec criteria", "compile the conformance checklist", "build guardrails from the spec", or "spec criteria". Compiles a frozen spec's normative prose into an executable conformance checklist at .specs/<slug>/criteria/, blind to any implementation of that spec, and accumulates cross-phase ownership invariants in .specs/<slug>/invariants.md.