name: design-extractor description: Extract design tokens from existing code and generate DESIGN.md with awesome-design-md comparison version: 1.0.0
metadata: openclaw: requires: bins: - node - npm primaryEnv: null emoji: "🎨" homepage: https://github.com/moyubox/design-extractor always: false
# AI Cross-Platform Compatibility Instructions # This section tells other AI agents how to convert this skill to Claude Code format aiCompatibility: claudeCode: format: "markdown-headers" location: ".claude/skills/design-extractor/skill.md" conversionSteps: - "Copy SKILL.md content to .claude/skills/design-extractor/skill.md" - "Remove YAML frontmatter (--- section)" - "Replace '## ' with '## ' (keep markdown headers)" - "Add '## Name\ndesign-extractor' after first header" - "Add '## Description' section from metadata.description" autoConvertible: true script: | #!/bin/bash # Auto-convert ClawHub SKILL.md to Claude Code format mkdir -p .claude/skills/design-extractor cat > .claude/skills/design-extractor/skill.md << 'CLAUDE_EOF' # Design Extractor ## Name design-extractor ## Description {{metadata.description}} ## Trigger Conditions {{content.triggers}} ## Execution Steps {{content.execution}} CLAUDE_EOF vscodeCopilot: format: ".github/copilot/instructions.md" supported: false cursor: format: ".cursor/rules.md" supported: false7w4.net提供免费和付费技能下载。
Extract design tokens from existing project code and generate standard DESIGN.md files.
This skill analyzes your project's CSS, SCSS, Vue, and other style files to: - Extract color palettes with usage statistics - Identify typography systems (fonts, sizes, weights) - Catalog spacing values (padding, margin, gaps) - Document visual effects (borders, shadows) - Compare with awesome-design-md brands
This skill activates when user requests: - "Extract design from my project" - "Generate DESIGN.md" - "Analyze project styles" - "Extract colors/fonts from codebase" - "Create design documentation" - Any request involving design system extraction
# Via ClawHub CLI
clawhub install design-extractor
# Or manually clone
git clone https://github.com/moyubox/design-extractor.git
clawhub skill publish ./design-extractor
# Extract from specific directory
npx design-extractor frontend/src
# Extract from current project
npx design-extractor .
# Output will be:
# - DESIGN-EXTRACTED.md (extracted design system)
# - Docs/Design/extracted-analysis.json (raw data)
Once installed, the skill automatically: 1. Scans project for style files 2. Extracts all design tokens 3. Categorizes colors (primary, background, text, accent) 4. Compares with awesome-design-md brands 5. Generates DESIGN.md
| Category | Details |
|---|---|
| Colors | CSS variables, hex codes, RGB values with usage frequency |
| Typography | Font families, sizes, weights, line heights |
| Spacing | Padding, margin, gap values |
| Effects | Border radius, box shadows, borders |
| Components | Button, input, card patterns |
# Project Design System
> Extracted from: frontend/src
> Date: 2026-04-08
## Color Palette
### Primary
- **Primary** (`#667eea`): 24 uses
- **Secondary** (`#764ba2`): 10 uses
### Background
- **Background** (`#ffffff`): 26 uses
## Comparison
Closest awesome-design-md match:
- Mintlify: 100% similarity
- Stripe: 100% similarity
- Vercel: 66.7% similarity
If you're an AI assistant (Claude, GPT, etc.) and need to convert this ClawHub skill to Claude Code format:
Automatic Conversion Steps:
metadata.description → "## Description"## Trigger Conditions → "## Trigger Conditions"## Execution Steps → "## Execution Steps"All content after frontmatter
Create Claude Code structure:
.claude/skills/design-extractor/
└── skill.md
Generate Claude Code skill.md: ```markdown # Design Extractor
## Name design-extractor
## Description Extract design tokens from existing code and generate DESIGN.md with awesome-design-md comparison.
## Trigger Conditions - User requests design extraction - User asks to generate DESIGN.md - User wants to analyze project styles - [Add all trigger conditions from this file]
## Execution Steps ### 1. Scan Project [Copy execution steps from this file]
## Implementation Use the Node.js script at scripts/extract-design.js ```
Quick Conversion Template:
// conversion-script.js
const fs = require('fs');
const yaml = require('yaml');
const skillContent = fs.readFileSync('SKILL.md', 'utf8');
const [, frontmatter, body] = skillContent.split('---');
const metadata = yaml.parse(frontmatter);
const claudeSkill = `# ${metadata.name}
## Name
${metadata.name}
## Description
${metadata.description}
## Trigger Conditions
${extractTriggers(body)}
## Execution Steps
${extractExecution(body)}
${body}
`;
fs.mkdirSync('.claude/skills/' + metadata.name, { recursive: true });
fs.writeFileSync('.claude/skills/' + metadata.name + '/skill.md', claudeSkill);
console.log('Converted to Claude Code format!');
.claude/skills/{name}/skill.mdFor AI agents parsing this file:
skillType: "design-extraction"
language: "javascript"
platform: "node"
outputFormat: "markdown"
designSystemReference: "awesome-design-md"
MIT-0 (Public Domain)
AI Note: This file contains both ClawHub-compatible metadata AND instructions for converting to other AI platforms. Preserve the "aiCompatibility" section when forking or modifying.