Agent skill

Structured Spec

by irahardianto in irahardianto/awesome-agv

Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) —…

MITAuto-check passedDevelopment

Install Structured Spec

skills CLI
$ npx skills add irahardianto/awesome-agv --skill structured-spec -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install irahardianto/awesome-agv structured-spec --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/structured-spec .claude/skills/structured-spec && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
structured-spec
GitHub stars
157
Token cost
~2.3k tokens
SKILL.md length
870 words
Files
12
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) —…

  • Works in 4 steps: Define milestones in frontmatter:… → Tag annotations with milestone: "Phase… → Review per phase — completeness rules… → …
  • Check completeness/traceability of a spec
  • SKILL.md covers Use this skill when, Where to look, Pick the profile and When to consolidate vs separate, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Structured Spec is an agent skill from irahardianto/awesome-agv. Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) — using the Structured Spec standard (YAML frontmatter + Markdown narrative + HTML-comment annotations for requirement/contract/test/architecture/decision/slo + executable code contracts, with requirement-to-contract-to-test traceability). Use when asked to draft, scaffold, template, or check completeness/traceability of…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files (for example `example-prd.md`, `profiles/adr.md` and `profiles/bdd.md`).

It sits in Development, covering Architecture decision records and Planning. The repository describes itself as: Comprehensive sets of standards and practices designed to elevate the capabilities of AI coding agents. The licence is MIT.

When your agent uses it

  • Check completeness/traceability of a spec
  • Requirements doc
  • Decision record
  • Migrate a plain-Markdown spec to this format

Example prompts

  • “/structured-spec”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Define milestones in frontmatter: milestones: [{name: "Phase 1: Core", target_date: "2026-09-01", status: "in-progress"}, ...]
  2. Tag annotations with milestone: "Phase 1: Core" — requirements, contracts, tests, and tasks
  3. Review per phase — completeness rules (§6.5) apply per milestone. Phase 2 requirements don't block Phase 1 approval.
  4. Slice by milestone — orchestrators can dispatch Phase 1 tasks first, then Phase 2 after review

What it can do on your machine

Read from SKILL.md and the folder at commit 9e997ba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Structured Spec loads about 2.3k tokens when it runs. Until then it costs about 171 tokens; SKILL.md has 870 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~171
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from irahardianto/awesome-agv at commit 9e997ba, republished under its MIT licence (© irahardianto). 870 words, ~2,301 tokens.

Download SKILL.mdSave it as .claude/skills/structured-spec/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
structured-spec
description
Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) — using the Structured Spec standard (YAML frontmatter + Markdown narrative + HTML-comment annotations for requirement/contract/test/architecture/decision/slo + executable code contracts, with requirement-to-contract-to-test traceability). Use when asked to draft, scaffold, template, or check completeness/traceability of a spec, requirements doc, design doc, or decision record, migrate a plain-Markdown spec to this format, or slice a spec into tasks for multiple agents.

Structured Spec

Specification documents that are readable by humans, writable by agents, and parseable by machines. Standard GitHub-Flavored Markdown plus typed annotations carried in HTML comments, so renderers ignore them and parsers don't have to guess.

Standard version 2.0.0. Every file in this directory is at 2.0.0; do not mix with v1 documents (see specification.md §9 to migrate one).

Use this skill when

  • Writing or reviewing a PRD, SDD, implementation plan, TSD, BDD spec, or ADR
  • Validating a spec's completeness or requirement traceability
  • Migrating plain Markdown into the structured format
  • Slicing a spec into work packages for multiple agents

Not for: ordinary prose docs, READMEs, or runbooks that have no requirements to trace.

Where to look

Read only what the task needs. These files do not repeat each other — each fact lives in exactly one place.

QuestionFile
Which document type do I write?This file, next section
What are the annotation fields and rules?specification.md §3–§4
How does traceability work?specification.md §5
When is a spec complete?specification.md §6
Which type value do I use?taxonomy.md
What section order for this doc type?profiles/<doc_type>.md
Is the frontmatter legal?spec-schema.json
Show me a full real documentexample-prd.md
Give me a blank starting pointtemplate.md
Is this document actually valid?Manual review against specification.md §6 completeness rules

Pick the profile

doc_type is a closed set of seven. Choose by the question the document answers:

The document answersdoc_typeProfile
WHY — business context, users, success criteriaprdprofiles/prd.md
HOW — architecture, components, trade-offssddprofiles/sdd.md
WHEN and WHO — tasks, sequencing, ownersimplementation-planprofiles/implementation-plan.md
INTERFACE — APIs, payloads, errors, versioningtsdprofiles/tsd.md
BEHAVIOR — scenarios and edge casesbddprofiles/bdd.md
DECISION — one choice, its alternatives and consequencesadrprofiles/adr.md
None of the abovecustomno profile; universal rules only

If the request spans several, write separate documents and link them via dependencies.specs. Do not merge a PRD and an SDD into one file.

When to consolidate vs separate

Not every project needs six documents. Use project scale to decide:

ScaleGuidance
Small (Tier 1, ≤5 files, single module)One PRD is sufficient. Embed BDD scenarios inline (Section 7: Acceptance Tests). Embed API contracts inline. No separate SDD, TSD, or BDD document needed.
Medium (Tier 2, cross-module, 6+ files)PRD + SDD. Embed decisions as inline <!-- decision --> annotations in the SDD. Separate TSD only if external consumers exist. Separate BDD only if scenario count exceeds ~15.
Large (Tier 3, public API, multi-service)Full separation: PRD + SDD + TSD + BDD + Implementation Plan. Standalone ADRs for decisions that outlive the SDD.

Rule of thumb: Start with one document. Separate when a section grows past what a single reader needs to scan (typically >15 scenarios for BDD, >10 endpoints for TSD, or when different audiences need different documents).

Phased delivery

For large features, use milestones in frontmatter and milestone fields on annotations to split delivery into phases:

  1. Define milestones in frontmatter: milestones: [{name: "Phase 1: Core", target_date: "2026-09-01", status: "in-progress"}, ...]
  2. Tag annotations with milestone: "Phase 1: Core" — requirements, contracts, tests, and tasks
  3. Review per phase — completeness rules (§6.5) apply per milestone. Phase 2 requirements don't block Phase 1 approval.
  4. Slice by milestone — orchestrators can dispatch Phase 1 tasks first, then Phase 2 after review

Annotations without a milestone field belong to all phases (backward compatible).

Show full SKILL.md (325 more words)Show less

Document storage

Structured spec documents live under docs/ alongside other project documentation. Each document type has a prescribed location:

text
docs/
├── specs/                    ← PRDs, SDDs, TSDs, BDD specs, Implementation Plans
│   ├── prd-billing-export.md
│   ├── sdd-payment-service.md
│   ├── tsd-billing-api.md
│   ├── bdd-checkout-flow.md
│   └── plan-v2-migration.md
├── decisions/                ← ADRs (convention from `adr` skill)
│   ├── 0001-use-postgresql.md
│   └── 0002-adopt-feature-structure.md
├── research_logs/            ← Research findings (convention from `research-methodology` skill)
├── audits/                   ← Audit reports (convention from `code-review` skill)
└── debugging/                ← Debug investigations (convention from `debugging-protocol` skill)

File naming for specs: {doc_type}-{short-slug}.md (e.g., prd-billing-export.md, sdd-payment-service.md). The spec_id in frontmatter is the canonical identifier; the filename is for human navigation.

ADRs stay in docs/decisions/ — the adr skill owns that convention (NNNN-short-title.md numbering). Do not move ADRs to docs/specs/.

.agentwork/ is ephemeral — scope cards, handoffs, findings, and pipeline artifacts go there. Persisted specifications always go under docs/.

Workflow

  1. Pick the profile from the table above. If genuinely ambiguous, ask; otherwise infer and state the choice.
  2. Open profiles/<doc_type>.md for that profile's ID prefixes, section order, and extra rules.
  3. Write frontmatter. Nine required fields. New documents start at status: draft.
  4. Write the narrative. Plain Markdown. Context and reasoning that annotations cannot carry.
  5. Add annotations immediately above what they describe — specification.md §4 for fields, taxonomy.md for type values.
  6. Link once, from the child. Contracts, tests, architecture, SLOs, and decisions name the requirements they serve. Requirements never point back; the reverse index is derived. Adding a test never means editing a requirement.
  7. Verify completeness against specification.md §6. Fix gaps before raising status above draft.

Minimum viable spec

Enough to be valid. Everything else is elaboration.

markdown
---
$schema: "https://raw.githubusercontent.com/irahardianto/awesome-agv/main/.agents/skills/structured-spec/spec-schema.json"
spec_id: "PRD-BILLING-EXPORT-V1"
title: "Billing Export"
doc_type: "prd"
status: "draft"
version: "0.1.0"
owners: ["platform-team"]
created: "2026-08-18"
modified: "2026-08-18"
---

# 1. Problem Context

Finance reconciles invoices by hand because usage data never leaves the platform.

<!-- requirement
  id: REQ-001
  title: Export daily usage as CSV
  priority: must
  category: functional
  rationale: Manual reconciliation costs the finance team two days per month
-->

Exports run nightly and cover the previous UTC day.

<!-- contract
  id: CT-API-001
  type: api-contract
  title: Usage export endpoint
  stack_category: application-code
  implements_requirements: [REQ-001]
-->

```yaml
paths:
  /exports/usage:
    get:
      parameters: [{ name: date, in: query, required: true, schema: { type: string, format: date } }]
      responses: { "200": { description: CSV export } }
```

<!-- test
  id: TC-001
  type: acceptance-test
  title: Export returns the previous day's usage
  verifies_requirements: [REQ-001]
-->

```gherkin
Scenario: Export returns the previous day's usage
  Given usage exists for 2026-08-17
  When the client requests the export for 2026-08-17
  Then the response is CSV containing that day's rows
```

Rules that are easy to get wrong

  1. Link once, from the child. Never mirror a link on both ends — that is what made v1 documents contradict themselves.
  2. Tests are not contracts. acceptance-test and integration-test are test types. A Gherkin block is never a <!-- contract -->.
  3. Code contracts run as written. No pseudocode, no ... elisions inside a contract's code block.
  4. IDs are unique per document and never renumbered once the status is approved — other specs cite them.
  5. Annotations touch the content they describe, separated by at most one blank line.
  6. draft is never blocked. Enforcement scales with status; see specification.md §6.3. Do not refuse to write a rough draft because it lacks tests.

© irahardianto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files in .agents/skills/structured-spec of irahardianto/awesome-agv.

  • SKILL.md
  • example-prd.md
  • profiles/adr.md
  • profiles/bdd.md
  • profiles/implementation-plan.md
  • profiles/prd.md
  • profiles/sdd.md
  • profiles/tsd.md
  • spec-schema.json
  • specification.md
  • taxonomy.md
  • template.md

Open the folder on GitHubat commit 9e997ba

Compare with similar skills

Structured Spec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Structured Spec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Structured Spec this skillirahardianto/awesome-agv157—~2.3kAutomated safety check: PassMIT
Plan Previewu-ichi/reviewable-html-workbench2981 repos~1.8kAutomated safety check: PassMIT
Designsynnaxlabs/synnax128—~4.5kAutomated safety check: PassCustom licence
Manual Planningfjrevoredo/mini-diarium308—~3.7kAutomated safety check: PassMIT
Idea To Implementation DocAkoliteZA/hermes-agent-idea-workflow271—~3.1kAutomated safety check: PassMIT
Architecturenteract/nteract179—~497Automated safety check: PassBSD-3-Clause

Similar skills

  • Plan Preview

    u-ichi/reviewable-html-workbench

    Plan Mode の <proposedplan を出す直前に、計画の段階・依存関係・検証観点を一時HTMLで視覚確認したい時に使う agent-internal skill。Use this agent-internal skill to create a temporary HTML preview for a plan just before presenting…

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Agent WorkflowsAuto-check passed
  • Design

    synnaxlabs/synnax

    Process and hard rules for designing and planning complex new features, refactors, and re-architectures.

    128 GitHub stars~4.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Manual Planning

    fjrevoredo/mini-diarium

    Create, update, review, and execute manual Markdown implementation plans when harness planning mode is not being used.

    308 GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Idea To Implementation Doc

    AkoliteZA/hermes-agent-idea-workflow

    A skill your agent uses when reviewing one specific idea/design doc, researching similar products, and producing a separate technical implementation plan or roadmap.

    271 GitHub stars~3.1k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed
  • Architecture

    nteract/nteract

    Architecture and documentation framing for cross-cutting repo decisions, docs taxonomy placement, ADRs, memos, PRDs, implementation plans, audits, measurements, runbooks, and source-grounded…

    179 GitHub stars~497 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Idea Discovery

    muratgur/ordinus

    Explore a new feature, product idea, technical design, workflow change, or ADR candidate before committing to an implementation plan.

    113 GitHub stars~851 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from irahardianto/awesome-agv

All 34 skills in this repo
  • Distinctive Frontend Design Builder

    irahardianto/awesome-agv

    Commits to one bold aesthetic direction, sets up a CSS token system for it, then builds the interface in Vue or plain HTML using those tokens.

    157 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed
  • Perf Optimization

    irahardianto/awesome-agv

    Profile-driven performance optimization protocol. An agent skill from irahardianto/awesome-agv.

    157 GitHub stars~4.3k tokensUpdated 4 days ago
    Auto-check passed
  • Angular Idioms and Patterns

    irahardianto/awesome-agv

    Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.

    157 GitHub stars~3.8k tokensUpdated 4 days ago
    Auto-check passed
  • CI/CD Pipeline Principles

    irahardianto/awesome-agv

    Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.

    157 GitHub stars~2.7k tokensUpdated 4 days ago
    Auto-check: notes
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    157 GitHub stars~3k tokensUpdated 4 days ago
    Auto-check passed
  • Mobile Testing

    irahardianto/awesome-agv

    Mobile E2E testing patterns — Flutter integrationtest, Patrol, Maestro, golden testing, device matrix, and test data management.

    157 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check: notes

Questions about Structured Spec

What does Structured Spec do?

Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) —…. Structured Spec is an agent skill from irahardianto/awesome-agv. Write, review, validate, or parse structured specification documents — PRDs, SDDs (design docs), implementation plans, TSDs (technical specs), BDD specs, and ADRs (architecture decision records) — using the Structured Spec standard (YAML frontmatter + Markdown narrative + HTML-comment annotations for requirement/contract/test/architecture/decision/slo + executable code contracts, with requirement-to-contract-to-test traceability).

When should I use Structured Spec?

Structured Spec fits situations like: check completeness/traceability of a spec; requirements doc; decision record; migrate a plain-Markdown spec to this format.

How do I install Structured Spec in Claude Code?

Run `npx skills add irahardianto/awesome-agv --skill structured-spec -a claude-code`. Or copy the skill folder (.agents/skills/structured-spec in irahardianto/awesome-agv) into .claude/skills/structured-spec in your project. Claude Code loads it when a task matches its description.

How do I install Structured Spec in Codex?

Run `npx skills add irahardianto/awesome-agv --skill structured-spec -a codex`. Or copy the skill folder (.agents/skills/structured-spec in irahardianto/awesome-agv) into .agents/skills/structured-spec in your project. Codex loads it when a task matches its description.

Can I use Structured Spec in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add irahardianto/awesome-agv --skill structured-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structured-spec, .gemini/skills/structured-spec, .github/skills/structured-spec and .opencode/skills/structured-spec in your project.

What does Structured Spec need to run?

SKILL.md names no scripts, command-line tools or credentials: Structured Spec is instructions for the agent only.

Does Structured Spec access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Structured Spec safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Structured Spec use?

Structured Spec is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Structured Spec use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Structured Spec?

Skills that share tags, products or a category with Structured Spec: Plan Preview (u-ichi/reviewable-html-workbench, 298 stars), Design (synnaxlabs/synnax, 128 stars), Manual Planning (fjrevoredo/mini-diarium, 308 stars) and Idea To Implementation Doc (AkoliteZA/hermes-agent-idea-workflow, 271 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Structured Spec?

irahardianto (a GitHub user) maintains it in irahardianto/awesome-agv, which has 157 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 5, 2026.

Source: irahardianto/awesome-agv on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.