Index of every page on this site: llms.txt
All skills
masihmoafi avatar

/spec

@c0a5d13
by Masih Moafimasihmoafi/skills10 stars
Run it yourself

Use for nontrivial implementation, requirements, a PRD or vision document, or acceptance criteria. Defines done before code. Not for trivial edits, exploration, spikes or prototypes.

  • 1 file
  • 3.8 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/masihmoafi/skills/spec

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈47 tokens for metadata: the name and description. ≈928 when used: this file.

Description uses 2.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈189 characters, or 2.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Spec-driven development

Define what done means before code, because an agent fills every gap in intent from its training data. A spec adds no approval gate; ask only about material gaps.

Size the loop to the task (Stanford CS146S, 29 Sep 2026):

  • a copy change or small fix: just ask the agent;
  • a small feature across several files: one plan;
  • a medium feature: research, then plan, in separate sessions;
  • a big refactor or migration: several rounds of research and plans, split into stacked issues, one agent each.

For discovery, spike first and specify once the behavior is known. Review the spec and plan yourself; that review is where the leverage is.

The loop: Specify, Plan, Execute, Verify. Go back to Specify when evidence changes the intent.

1. Specify

Numbered items, each with an acceptance check and a status, written before work begins. A check is observable ("feature works" is not one). When the change touches money, data, security or an external integration, add all four risk checks:

  1. Failure: what happens when a dependency or write fails.
  2. Concurrency: what happens when actors or async events collide.
  3. Observability: how production behavior is measured.
  4. Rollback: how the old behavior comes back, and how that is checked.

When intent has gaps, interview the user (goal, constraints, criteria, non-goals, edge cases) before writing. Keep the spec in version control beside the code it governs. Two tiers, after OpenSpec: specs/ holds the current truth of each capability; a change is a short proposal with its delta against that truth, and once shipped its delta is merged into specs/ and the proposal archived. No competing specs for one capability.

# SPEC: [Feature]

Goal: [1-3 sentences: the problem and the outcome]
Invariants: [contracts and rules that must not break]
Constraints: [stack, banned dependencies, limits]

| # | Item | Acceptance check | Status |
| --- | --- | --- | --- |
| 1 | [observable happy path] | [command or action → result] | todo |
| 2 | [failure / concurrency / rollback, as relevant] | … | todo |

Non-goals: [what must not be touched]
Stop and ask: [3-5 task-specific conditions, e.g. a test still fails after 3 fixes; data would be deleted outside a test environment]

2. Plan

Read the spec and the codebase's conventions; write the approach, the trade-off chosen and why, the files affected and the order. Then split it into tasks: one atomic change each, ordered by dependency, each with a binary done-check (if it needs "and" twice, split it). Rate each task's importance (foundational, important, nice-to-have) and difficulty (easy, medium, hard) separately: importance is value, difficulty routes the work.

3. Execute

One task per fresh session when a combined diff would be too big to review; otherwise run the list in one session. Tick each item's status as its check passes. When reality contradicts the spec, stop, update the spec, then resume.

4. Verify

Every project gate passes first (lint, types, tests). A claim of "passes" or "fixed" needs the command run in this turn and its full output read; an earlier run or a subagent's report is a lead, not evidence. Evidence ranks: an agent's claim (untrusted) < automated tests or CI (necessary, not sufficient) < a real end-to-end run < the user's own acceptance, the only thing that closes "done". Name the level behind every completion claim, and give the user a one-line check per item.

For a vision document or PRD, follow project-docs (VISION.md): thesis, purpose, value, non-goals, kept apart from status.

Source: AI-Native Software Engineering, chapters 5 and 6.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at c0a5d13. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 3 weeks ago

README badge

README badge for masihmoafi/skills/spec