Parses design assets (PDF, CSS) to generate a draft design spec.
Purpose: Parse design deliverables (Figma export images/CSS/HTML, screen-spec PDF) to produce a draft dev spec Outputs:
{tasksRoot}/{feature-name}/design-spec.md,pending-questions.mdWhen to use: Before implementing a new feature when design assets are provided
Automatically extract UI/feature requirements from design assets and generate a structured spec that developers can implement immediately.
.claude/docs/design-assets/*.pdfCall automatically or manually in these cases:
.claude/docs/design-assets/# Example user requests
"Parse the screen-spec PDF and create a dev spec"
"Analyze Figma export CSS and organize style tokens"
Input file list:
- Screen spec: .claude/docs/design-assets/batch-management_v3.pdf
- Figma export: .claude/docs/design-assets/batch-management-export.zip
- Feature name: batch-management
Work:
Extract items:
Work:
Extract items:
/* Style tokens */
--color-primary: #1a73e8;
--font-size-base: 14px;
--spacing-md: 16px;
Output file: {tasksRoot}/{feature-name}/design-spec.md
Base structure:
# Design-based Development Spec
## Screen Overview
- Page structure
- Main flow
## UI Elements and Behavior
### Form Fields
| Field | Type | Required | Default | Validation |
|--------|------|---------|--------|------------|
### Table Columns
| Column | Sort | Filter | Notes |
|--------|------|--------|------|
### Buttons/Actions
- Button: action description
### State/Error/Loading
- Loading: spinner location
- Success/Error: message rules
## Style Tokens
- Colors, fonts, spacing
## Asset Manifest
- Image/icon list
## Extraction Evidence
- Source files, page numbers
## Open Questions
- List of unclear requirements
Output file: {tasksRoot}/{feature-name}/pending-questions.md
# Pending Questions
## Date: {YYYY-MM-DD}
### Priority: HIGH
1. **Question title**
- Source: design-spec.md section
- Question: specific question
- Impact: impact on implementation/design
OK Design Asset Parser Skill complete
## Outputs
- design-spec.md: N UI elements, N style tokens
- pending-questions.md: N open questions
## Next steps
1. Resolve HIGH priority questions in pending-questions.md
2. Call Requirements Analyzer Agent
3. Call Context Builder Agent
You are the Design Asset Parser Skill.
Read design assets and structure a dev spec.
## Input
- Design file paths: {designPaths}
- Target feature name: {featureName}
- Existing design-spec.md: {hasSpec}
## Tasks
1. Read PDF/Figma export files (use Read tool)
2. Extract UI elements (Form/Table/Button/State)
3. Specify validation/edge cases
4. Extract style tokens (if CSS exists)
5. Build asset manifest
6. Organize open questions
## Output
- `{tasksRoot}/{feature-name}/design-spec.md`: structured dev spec
- `{tasksRoot}/{feature-name}/pending-questions.md`: open questions list
## Quality bar
- UI elements in table format
- Validation rules clearly specified (length/pattern/range)
- Convert ambiguous requirements into questions
- Priority included (HIGH/MEDIUM/LOW)
User: "Parse the screen-spec PDF and create a dev spec.
Path: .claude/docs/design-assets/batch-management_v3.pdf
Feature: batch-management"
Design Asset Parser Skill ->
1. Read PDF (Read tool)
2. Parse by section (layout, field definitions, requirements)
3. Create design-spec.md
4. Create pending-questions.md (unclear parts)
Outputs:
- {tasksRoot}/batch-management/design-spec.md
- {tasksRoot}/batch-management/pending-questions.md
User: "Analyze Figma CSS export and organize style tokens.
Path: .claude/docs/design-assets/batch-ui-export.css
Feature: batch-management"
Design Asset Parser Skill ->
1. Read CSS file
2. Extract CSS variables (--color-*, --font-*, --spacing-*)
3. Extract component classes (.button--primary, .button--disabled)
4. Update the "Style Tokens" section in design-spec.md
Outputs:
- design-spec.md (style tokens updated)
User: "Parse the screen-spec PDF and Figma CSS together.
PDF: .claude/docs/design-assets/batch-management_v3.pdf
CSS: .claude/docs/design-assets/batch-ui-export.css
Feature: batch-management"
Design Asset Parser Skill ->
1. Parse PDF -> UI elements, feature requirements
2. Parse CSS -> style tokens
3. Merge results -> design-spec.md
4. Conflicts -> pending-questions.md
Outputs:
- design-spec.md (UI + styles merged)
- pending-questions.md (conflict questions)
1. Design Asset Parser Skill:
- Input: PDF/CSS files
- Output: design-spec.md (draft), pending-questions.md
2. User:
- Review pending-questions.md
- Answer HIGH priority questions
3. Design Spec Extractor Agent:
- Review design-spec.md
- Compare with CLAUDE.md rules
- Apply project patterns
- Generate final design-spec.md
4. Requirements Analyzer Agent:
- Create preliminary agreement based on design-spec.md
.claude/docs/design-assets/*.pdf.claude/docs/design-assets/*.zip, *.css, *.html