Use when you have a written implementation plan to execute in a separate session with review checkpoints
npx skills add 30eggis/claude-frontend-skills --skill "hack-2-spec"
Install specific skill from multi-skill repository
# Description
|
# SKILL.md
name: hack-2-spec
description: |
Analyze services/projects and systematically generate Spec (Specification Document), PHASE, and TASKS documents.
Supports website URLs (via Chrome Extension), local codebases, and mobile apps (screenshot-based).
Use when documenting existing products or reverse-engineering requirements from implementations.
Output format compatible with spec-it for seamless integration.
permissionMode: bypassPermissions
Hack 2 Spec
Analyze services/projects and generate spec-it compatible documentation.
Workflow
[Identify Input Source] β [Analyze Source] β [Ask Language Preference] β [Write Spec] β [Write PHASE] β [Write TASKS]
Step 1: Identify Input Source
Confirm the documentation target with the user:
| Source Type | Requirements | Proceed When |
|---|---|---|
| Website | URL, Chrome Extension data availability | Data collection complete |
| Code | Project path, build capability | Build succeeds |
| Mobile App | Screenshots, app description, feature list | Sufficient info gathered |
Analysis Methods by Source
Website Analysis:
- Review page structure, feature list, UI flow collected via Chrome Extension
- Ask user about core features and business logic
Code Analysis:
1. Understand project structure (package.json, README, etc.)
2. Run build test
3. On build failure: Resolve issues or report to user
4. On build success: Proceed with code analysis
Mobile App Analysis:
- Extract features based on provided screenshots and descriptions
- Reference app store descriptions, user reviews (if available)
Step 2: Ask Language Preference
Before generating documents, ask the user which language to use for the output documents.
Prompt to user:
Which language would you like the documents to be written in?
- English
- Korean (νκ΅μ΄)
- Other (please specify)
Store the user's language preference and apply it to all generated documents.
Step 3: Write Spec (spec-it Format)
Generate specification in spec-it compatible format.
Output Structure (spec-it Compatible)
{output-folder}/
βββ 01-persona/
β βββ personas.md
βββ 02-screens/
β βββ screen-list.md
β βββ wireframes/
β βββ screen-{name}.md
β βββ ...
βββ 03-components/
β βββ component-inventory.md
β βββ specs/
β βββ {ComponentName}.md
β βββ ...
βββ 04-review/
β βββ scenarios/
β βββ critical-path.md
β βββ screen-{name}.md
βββ 05-tests/
β βββ coverage-map.md
β βββ components/
β βββ {ComponentName}.test.md
βββ 06-final/
βββ final-spec.md
βββ dev-tasks.md
Required Information for Spec
01-persona/
- User personas with goals, pain points, behaviors
- Device preferences, usage patterns
02-screens/
- Screen list with routes and purposes
- ASCII wireframes for each screen
- Component mapping per screen
03-components/
- Component inventory with categories
- Individual component specs (props, states, interactions)
04-review/
- Critical path scenarios
- Screen-specific user scenarios
05-tests/
- Coverage map linking components to tests
- Test specifications per component
06-final/
- Consolidated final spec
- Development task breakdown
Step 4: Write PHASE
Use assets/templates/PHASE_TEMPLATE.md template.
Divide implementation into logical stages:
Phase Structure Principles:
- PHASE-01: MVP / Core features
- PHASE-02: Extended features
- PHASE-03: Enhancement / Optimization
Output: docs/phases/PHASE-01.md, docs/phases/PHASE-02.md...
Step 5: Write TASKS
Use assets/templates/TASKS_TEMPLATE.md template.
Generate specific task lists for each Phase:
Task Writing Rules:
- Identifier: TASK-{Phase}.{Seq} (e.g., TASK-1.01)
- Each Task must reference a component or screen spec
- No implementation technology/code mentions (write at behavior level)
- Specify dependencies and priorities
Output: docs/tasks/TASKS-PHASE-01.md, docs/tasks/TASKS-PHASE-02.md...
User Confirmation Points
After completing each document, confirm with user:
1. Spec complete β "Please review the Spec. Any modifications needed?"
2. PHASE complete β "Is the Phase structure appropriate?"
3. TASKS complete β "Please review the task list."
Integration with spec-mirror
When called from spec-mirror for reverse-engineering:
# spec-mirrorκ° νΈμΆνλ ν¨ν΄
Skill(hack-2-spec --source codebase --output docs/_mirror/)
# κ²°κ³Όλ¬Ό
docs/_mirror/
βββ 03-components/specs/ β ꡬνλ μ»΄ν¬λνΈ μ€ν
βββ 02-screens/ β ꡬνλ νλ©΄ μ€ν
βββ 06-final/final-spec.md β ν΅ν© μ€ν (REQ-### νμ)
Templates
This skill uses templates from assets/templates/ directory:
- SPEC_TEMPLATE.md - Feature Specification
- PHASE_TEMPLATE.md - Phase Document
- TASKS_TEMPLATE.md - Task Document
Replace {{placeholder}} in templates with actual content when generating documents.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.