mcpbeat Sign in

Speckit Baseline Agent Skill

Generate feature specifications by analyzing existing source code.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
117
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/dceoy/speckit-agent-skills --skill speckit-baseline

The instruction itself

9 sections, as written by the author

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

  • 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.
  • 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.
  • 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.
  • 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.
  • 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").
  • Load the spec template from .specify/templates/spec-template.md.
  • 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.
  • 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.
  • Create spec quality checklist at FEATURE_DIR/checklists/requirements.md.

10. Report completion with:

  • Branch name and spec file path.
  • Summary of analyzed files.
  • Key features discovered.
  • Areas needing clarification or review.

Outputs

  • specs/<feature>/spec.md
  • specs/<feature>/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.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take dceoy/speckit-baseline from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.