name: spec:requirements description: Create Requirements Document - generates a structured requirements document based on the task context and project
Create Requirements Document
Creates a requirements document based on the task context and project. The user provides a spec name and task description, and this command generates a structured requirements document.
When to use
Use this skill when the user needs to:
- Create a new feature specification
- Document requirements for a task
- Generate a structured requirements document for planning
Instructions
Step 1: Gather Information
If the user hasn't provided sufficient context, ask them:
- What is the name for this specification? (used for folder name, e.g., "user-authentication", "payment-integration")
- What is the main goal or purpose of this feature/task?
- What are the key user stories or use cases?
- Are there any specific technical constraints or requirements?
Step 2: Analyze the Codebase
Before writing requirements:
- Explore the relevant parts of the codebase to understand existing patterns
- Identify related services, components, or modules
- Note any dependencies or integrations that will be affected
Step 3: Create the Requirements Document
Create the document at .specs/<spec-name>/requirements.md with this structure:
# Requirements Document
## Introduction
[Brief description of what this feature/task aims to achieve and why it's needed]
## Glossary
[Define key terms used throughout the document, formatted as:]
- **Term**: Definition
## Requirements
### Requirement 1: [Requirement Name]
**User Story:** As a [role], I want [feature] so that [benefit].
#### Acceptance Criteria
1. THE [Component] SHALL [action/behavior]
2. WHEN [condition] THEN [Component] SHALL [action/behavior]
3. THE [Component] SHALL NOT [prohibited action]
[Continue with additional requirements following the same pattern]
Writing Guidelines
- Use SHALL for mandatory requirements - "THE system SHALL..."
- Use WHEN-THEN for conditional behavior - "WHEN user clicks submit THEN system SHALL..."
- Use SHALL NOT for prohibitions - "THE system SHALL NOT expose..."
- Be specific and testable - Each criterion should be verifiable
- Reference existing code patterns - Align with project conventions
- Keep requirements atomic - One requirement per item
Step 4: Confirm with User
After creating the document, show the user:
- The location of the created file
- A summary of the requirements
- Ask if they want to make any changes
Arguments
This skill accepts an optional argument:
<args>- Can include the spec name and/or description. Parse it to extract:- Spec name (kebab-case, e.g., "user-auth" or "payment-flow")
- Task description or context
If <args> is provided, use it to determine the spec name and context. If not sufficient, ask the user for clarification.
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.