30eggis

hack-2-spec

by @30eggis in Tools
0
0
# Install this skill:
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.