Spec-Driven Development

VerifiedCaution

Generates specification templates for non-trivial changes using GitHub Spec Kit 4-stage workflow (Specify → Clarify → Tasks → Implement). Creates GitHub issues and spec files automatically.

Sby Skills Guide Bot
DevelopmentIntermediate
3/4/2026
Claude Code
#spec-driven-development#github-issues#planning#crossplane#infrastructure-as-code

Recommended for

Automated summary

Generates a specification template for non-trivial changes by first opening an anchor GitHub issue and then creating a numbered spec file under docs/specs, following the Specify → Clarify → Tasks → Implement workflow.

Strengths

  • Automates the whole mechanics: semantic slug, GitHub issue creation, four-digit sequential numbering and filename that references the issue
  • Cleanly separates the "what/why" (issue) from the "how" (spec file), keeping traceability through "Implements #123"
  • Infers the spec type (composition, infrastructure, security, platform) from file patterns and suggests a default while still asking the user to confirm
  • Explicitly documents what should not get a spec (version bumps, docs, single-file fixes), preventing over-documentation

Limitations

  • Tightly coupled to a specific platform stack (Crossplane/KCL, OpenTofu/Terramate, EKS, OpenBao) and not directly reusable elsewhere
  • Assumes a docs/specs/active and docs/specs/completed layout plus pre-existing spec and <type> GitHub labels
  • Requires an authenticated gh CLI with issue-creation rights; the spec body itself remains a skeleton to fill in by hand
When to use it

Use it before implementing a Crossplane composition, a major infrastructure change, a security modification, or a multi-component feature.

When not to use it

Skip it for Renovate version bumps, documentation-only changes, single-file bug fixes, or minor HelmRelease value tweaks.

Security analysis

Caution
Quality score74/100

The skill uses Bash, the GitHub CLI (network), and Write to create issues and spec files, which are powerful but legitimate operations. There are no destructive commands (no rm -rf, no curl|sh), no obfuscated/base64 payloads, and no attempts to exfiltrate secrets or disable safety. All shell activity (git/gh/ls/sed/grep) is scoped to generating spec scaffolding, so it warrants 'caution' rather than 'risky'.

Findings
  • •Uses Bash with gh CLI (network calls to GitHub: issue create, issue comment)
  • •Creates/writes files under docs/specs/active/ via Write and shell redirection
  • •Runs shell pipelines (ls, sed, grep, printf) for numbering and slug generation
  • •Filename embeds '#' from issue number; unquoted usage could cause minor shell issues in some contexts
How this analysis is made

Examples

Crossplane composition
/specify composition Add a Valkey caching composition for Redis workloads
Security change
/specify security Zero-trust network policies and RBAC for the payments namespace
Infrastructure change
/specify infrastructure Migrate EKS node groups to Karpenter with spot instances

name: specify description: Generate a specification template for non-trivial changes using Spec-Driven Development. Creates GitHub issue + spec file following the 4-stage workflow (Specify → Clarify → Tasks → Implement). allowed-tools: Read, Write, Bash(git:), Bash(gh:), Glob, Grep

Specify Skill

Generate specification templates for changes that require formal design documentation before implementation. Follows GitHub Spec Kit 4-stage workflow: Specify → Clarify → Tasks → Implement.

Usage

/specify <type> [description]

Types: composition | infrastructure | security | platform

When to Use

Run /specify when making:

  • composition: New Crossplane compositions (KCL modules, XRDs)
  • infrastructure: Major OpenTofu/Terramate changes (VPC, EKS, IAM)
  • security: Network policies, RBAC, secrets management, PKI
  • platform: Multi-component features spanning multiple subsystems

When NOT to Use

Skip specs for:

  • Version bumps (Renovate PRs)
  • Documentation-only changes
  • Single-file bug fixes
  • Minor HelmRelease value tweaks

Workflow

Step 1: Determine Spec Type

If type argument provided, use it directly.

If type NOT provided, use AskUserQuestion to prompt:

Question: "What type of specification do you want to create?"
Header: "Spec type"
Options:
  - composition: "New Crossplane KCL composition, XRD, or managed resource pattern"
  - infrastructure: "OpenTofu/Terramate changes (VPC, EKS, IAM, network)"
  - security: "Network policies, RBAC, secrets management, PKI changes"
  - platform: "Multi-component features spanning multiple subsystems"

Context hints (use to suggest a default, but always confirm with user):

| Type | Trigger Patterns | |------|-----------------| | composition | KCL files, *-composition.yaml, *-definition.yaml | | infrastructure | opentofu/**/*.tf, terramate.tm.hcl, EKS/VPC changes | | security | *networkpolicy*, *rbac*, openbao/**, secrets | | platform | Multi-directory changes, new HelmReleases, observability |

Step 2: Get Description

If description provided, use it directly.

If description NOT provided, ask the user:

  • "Briefly describe what you want to specify (e.g., 'Add Valkey caching composition for Redis workloads')"

Step 3: Generate Semantic Slug

From description, create a slug:

  • Filter out stop words (I, want, to, the, for, a, an, etc.)
  • Take 3-4 most meaningful words
  • Join with hyphens, lowercase
  • Example: "Create a Valkey caching composition" → "valkey-caching-composition"

Step 4: Create GitHub Issue (Anchor)

Create a GitHub issue as the immutable anchor for discussion and tracking:

# Create issue and capture the issue number directly from the output
ISSUE_URL=$(gh issue create \
  --title "[SPEC] ${TITLE}" \
  --label "spec,${TYPE}" \
  --body "## Summary
${DESCRIPTION}

## Spec Type
${TYPE}

## Spec File
Will be created at: \`docs/specs/active/XXXX-#ISSUE-${SLUG}.md\`

---
_This issue tracks a formal specification. See the linked spec file for full details._")

# Extract issue number from the returned URL
ISSUE_NUM=$(echo "$ISSUE_URL" | grep -oP 'issues/\K\d+$')

Why GitHub Issue first?

  • Provides discoverability (searchable, project boards)
  • Enables discussion (comments, reactions, mentions)
  • Creates linkable anchor for PRs (Implements #123)
  • Separates "what/why" (issue) from "how" (spec file)

Step 5: Generate Spec Number

# Find next spec number by extracting the highest existing number
MAX_NUM=$(ls -1 docs/specs/active/*.md docs/specs/completed/*.md 2>/dev/null | \
  sed 's|.*/||' | \
  grep -oP '^\d{4}(?=-)' | \
  sort -rn | \
  head -1)
SPEC_NUM=$(printf "%04d" $((10#${MAX_NUM:-0} + 1)))

Step 6: Create Spec File

# Include issue number in filename for traceability
SPEC_FILE="docs/specs/active/${SPEC_NUM}-#${ISSUE_NUM}-${SLUG}.md"

Copy the appropriate template:

  • composition → docs/specs/templates/spec-crossplane-composition.md
  • infrastructure → docs/specs/templates/spec-infrastructure.md
  • security → docs/specs/templates/spec-security.md
  • platform → docs/specs/templates/spec-platform-capability.md

Step 7: Pre-fill Context

Replace placeholders in the template:

  • SPEC-XXXX → SPEC-${SPEC_NUM}
  • YYYY-MM-DD → current date
  • [Composition Name] / [Title] → derived from description
  • GitHub Issue: #XXX → GitHub Issue: #${ISSUE_NUM}

Step 8: Update GitHub Issue with Spec Link

gh issue comment ${ISSUE_NUM} --body "Spec file created: [\`${SPEC_FILE}\`](${SPEC_FILE})"

Step 9: Read Related Context

To help fill in the template, scan relevant files (only if they exist):

# Always read these core files
[ -f "CLAUDE.md" ] && echo "Read: CLAUDE.md"
[ -f "docs/specs/constitution.md" ] && echo "Read: constitution.md (platform principles)"

# Type-specific context (only if files exist)
if [ "$TYPE" = "composition" ]; then
  [ -f "docs/crossplane.md" ] && echo "Read: docs/crossplane.md"
fi

# Optional architectural context
[ -f "docs/technology-choices.md" ] && echo "Read: docs/technology-choices.md"

# Always scan similar completed specs for patterns
ls docs/specs/completed/*.md 2>/dev/null | head -3

Required context files:

  • CLAUDE.md - Project patterns and validation requirements
  • docs/specs/constitution.md - Platform-wide non-negotiable principles

Optional context files (read if they exist):

  • docs/crossplane.md - Composition patterns (for composition type)
  • docs/technology-choices.md - Architectural context
  • docs/specs/completed/*.md - Similar completed specs for reference

Step 10: Output

Display:

  1. GitHub issue URL
  2. Created spec file path
  3. Template type used
  4. Quick reference to the 4 personas who should review
  5. Next steps

Output Format

✅ Specification created!

🔗 GitHub Issue: https://github.com/Smana/cloud-native-ref/issues/XXX
📄 Spec File: docs/specs/active/XXXX-#XXX-slug.md
📋 Type: [composition|infrastructure|security|platform]

## Review Personas
Before implementation, self-review as:
- [ ] PM: Problem clear? User stories valid? Scope defined?
- [ ] Platform Engineer: Patterns consistent? Implementation feasible?
- [ ] Security & Compliance: Zero-trust? Least privilege? Secrets managed?
- [ ] SRE: Observable? Recoverable? Failure modes documented?

## Next Steps
1. Fill in the spec template (especially [NEEDS CLARIFICATION] sections)
2. Run /clarify to resolve clarifications interactively
3. Run /tasks to generate task breakdown
4. Implement the changes
5. Reference issue in PR: `Implements #XXX`
6. After merge: `mv docs/specs/active/XXXX-*.md docs/specs/completed/`
7. Close the GitHub issue

Examples

# Explicit type
/specify composition Create a Valkey caching composition for Redis workloads

# Explicit type
/specify infrastructure Add Karpenter provisioner for GPU nodes

# Explicit type
/specify security Implement network policies for apps namespace

# Explicit type
/specify platform Add distributed tracing with Tempo

Integration with Other Skills

  • /specify → Creates GitHub issue + spec file (this skill)
  • /clarify → Resolves [NEEDS CLARIFICATION] markers interactively
  • /tasks → Generates task breakdown from spec's Rollout Plan
  • /create-pr → Auto-detects spec and references issue (Implements #XXX)

Spec Lifecycle

┌─────────────────┐     ┌──────────────────────────────────┐     ┌─────────────────────┐
│  GitHub Issue   │────▶│  docs/specs/active/XXXX-#XX.md   │────▶│  docs/specs/completed/
│  #XXX (anchor)  │     │  (detailed spec)                 │     │  XXXX-#XX.md        │
└─────────────────┘     └──────────────────────────────────┘     └─────────────────────┘
       │                              │                                    │
       │                              ▼                                    │
       │                     [Implementation]                              │
       │                              │                                    │
       ▼                              ▼                                    ▼
   Discussion              PR: "Implements #XXX"                    Reference
   Comments                     Code Review                         History
   Reactions                       Merge

Two-Document Model

| Document | Purpose | Location | |----------|---------|----------| | GitHub Issue | Immutable anchor, discussion, "what/why" | GitHub Issues | | Spec File | Detailed design, checklists, "how" | docs/specs/active/ |

The issue provides discoverability and discussion; the spec file contains implementation details.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/spec-driven-development-mmbizjsr/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/spec-driven-development-mmbizjsr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/spec-driven-development-mmbizjsr/download' --output '.skill-downloads/spec-driven-development-mmbizjsr/SKILL.md.part' && mv '.skill-downloads/spec-driven-development-mmbizjsr/SKILL.md.part' '.skill-downloads/spec-driven-development-mmbizjsr/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Bash(git:*), Bash(gh:*), Glob, Grep

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/spec-driven-development-mmbizjsr/SKILL.md' && test -s '.skill-downloads/spec-driven-development-mmbizjsr/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/specify' && cp -R '.skill-downloads/spec-driven-development-mmbizjsr' '.claude/skills/specify'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/spec-driven-development-mmbizjsr'

openskills read 'spec-driven-development-mmbizjsr'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/spec-driven-development-mmbizjsr/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills