🎯

speckit-baseline

🎯Skill

from dceoy/speckit-agent-skills

VibeIndex|
What it does

Automatically generates feature specifications by analyzing existing source code, extracting key functionality, and creating standardized documentation.

πŸ“¦

Part of

dceoy/speckit-agent-skills(10 items)

speckit-baseline

Installation

git cloneClone repository
git clone https://github.com/github/speckit-agent-skills.git
πŸ“– Extracted from docs: dceoy/speckit-agent-skills
2Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Generate feature specifications by analyzing existing source code.

Overview

# Spec Kit Baseline Skill

When to Use

  • You need a spec for existing or legacy code.
  • You want to document a feature before refactoring.
  • You inherited a codebase without written requirements.

Inputs

  • A target path, file list, or glob pattern describing the code to analyze.
  • Repo context with .specify/ scripts and templates.

If the target is missing or ambiguous, ask a focused question before continuing.

Goal

Generate a technology-agnostic spec for existing code, then create the feature branch/spec file using the standard Spec Kit templates.

Workflow

  1. Parse target input: Identify files, directories, or patterns to analyze.

- Accept file paths, glob patterns, or directory paths.

- If empty: stop and ask for a concrete target.

  1. Discover and read source files:

- Expand globs to a file list.

- Read file contents for analysis.

- Identify primary language(s) and frameworks.

- Map key file relationships and dependencies.

  1. Analyze code structure:

- Identify entry points and public interfaces.

- Extract function/method signatures and behaviors.

- Find data models and entities.

- Detect API endpoints and routes.

- Identify user-facing functionality.

  1. Generate a short name (2-4 words) from the analyzed code:

- Use action-noun format (e.g., "user-auth", "payment-processing").

- Base on primary functionality discovered.

- Preserve technical terms where meaningful.

  1. Create the feature branch and spec file:

- Find the highest existing feature number for this short name (branches/specs).

- Run .specify/scripts/bash/create-new-feature.sh --json with the calculated number and short name.

- Read BRANCH_NAME, FEATURE_DIR, and SPEC_FILE paths from the script JSON output.

- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").

  1. Load the spec template from .specify/templates/spec-template.md.
  1. Draft the specification using the template structure:

- User Stories: Infer from user-facing code paths and interactions.

- Acceptance Scenarios: Derive from validation logic, error handling, and tests.

- Functional Requirements: Extract from business rules and constraints.

- Key Entities: Identify from data models and schemas.

- Success Criteria: Infer from metrics, logging, or performance-related code.

- Assumptions: Document inferences made during analysis.

  1. Abstract implementation details:

- Convert technical patterns to user-focused requirements.

- Remove framework-specific terminology.

- Focus on WHAT the code does, not HOW it does it.

  1. Create spec quality checklist at FEATURE_DIR/checklists/requirements.md.
  1. Report completion with:

- Branch name and spec file path.

- Summary of analyzed files.

- Key features discovered.

- Areas needing clarification or review.

Outputs

  • specs//spec.md
  • specs//checklists/requirements.md

Key rules

  • Focus on extracting WHAT and WHY from HOW.
  • Abstract away implementation details in the generated spec.
  • Document assumptions made during code analysis.
  • Flag areas where code behavior is unclear.
  • Preserve discovered business rules and constraints.
  • Use [NEEDS CLARIFICATION] for ambiguous code sections (max 3).
  • Generated specs should be validated by someone who knows the feature.

Examples

Code Pattern β†’ Spec Requirement:

  • if (user.role === 'admin') β†’ "System MUST restrict action to administrator users"
  • password.length >= 8 β†’ "Passwords MUST be at least 8 characters"
  • cache.set(key, value, 3600) β†’ "System MUST cache results for improved performance"
  • try { ... } catch (e) { notify(e) } β†’ "System MUST notify users when errors occur"

Code Pattern β†’ User Story:

  • Login endpoint with OAuth β†’ "As a user, I can sign in using my social account"
  • Shopping cart logic β†’ "As a customer, I can add items to my cart for later purchase"
  • Report generation β†’ "As an analyst, I can generate reports on system activity"

Next Steps

After generating spec.md:

  • Clarify with domain experts using speckit-clarify.
  • Plan modernization/refactoring with speckit-plan.
  • Compare the generated spec with actual requirements to identify gaps.

More from this repository9

🎯
speckit-specify🎯Skill

Generates a concise feature specification and branch name from a natural language description, ensuring unique naming and context preservation.

🎯
speckit-implement🎯Skill

Implements feature tasks from tasks.md by executing a comprehensive implementation workflow with prerequisite and checklist validation.

🎯
speckit-plan🎯Skill

Generates a comprehensive implementation plan for a feature by researching unknowns, defining data models, and creating technical design artifacts.

🎯
speckit-tasks🎯Skill

Generates a dependency-ordered, actionable task list for a feature based on design artifacts and user stories.

🎯
speckit-constitution🎯Skill

Generates and synchronizes project constitution templates by interactively collecting principles and automatically updating dependent artifacts.

🎯
speckit-analyze🎯Skill

Analyzes spectral data files, extracting key features and generating comprehensive statistical summaries for scientific research.

🎯
speckit-clarify🎯Skill

Identifies and resolves underspecified areas in a feature specification by asking targeted clarification questions and updating the spec accordingly.

🎯
speckit-taskstoissues🎯Skill

Converts tasks from a markdown file into dependency-ordered, actionable GitHub issues for a specific feature.

🎯
speckit-checklist🎯Skill

Generates tailored, domain-specific checklists that validate requirements quality by identifying completeness, clarity, and potential gaps.