Skip to content

xinetzone/SpecWeave / .agents/skills/design-library-creator

design-library-creator

Flagged

Create, expand, and refine professional Design Libraries / Design Systems with structured token architecture. ONLY invoke when user EXPLICITLY mentions design-system terminology: 'Design Library', 'Design System', '设计系统', '设计库', 'token system', 'design tokens', '组件库规范', or provides a parsed design-spec bundle (ZIP/Figma export). Also covers creating a new theme / color theme as a design-system deliverable (创建主题/新建暖色主题/深色主题等 — tokens + palette + component styling). Do NOT route here for: '素材库', '全套素材', '素材合集', '物料库', '生成素材', '做一套设计', '做几张图', '设计一套页面', '帮我出图', page/poster/landing-page creation, or any visual-asset generation intent where the user does not demonstrate knowledge of design-system concepts. Those belong to solo-design.

FileKindSize
SKILL.mdskill md19.3 KB
aesthetics/dark-mode.mdmarkdown1.8 KB
aesthetics/index.mdmarkdown33.8 KB
aesthetics/navigation-footer.mdmarkdown2.2 KB
aesthetics/screen-craft.mdmarkdown9.2 KB
aesthetics/self-check.mdmarkdown24.9 KB
examples/templates/component-dispatch-rules.mdmarkdown9.1 KB
examples/templates/figma-token-gen.mdmarkdown50.3 KB
examples/templates/incremental.mdmarkdown5.7 KB
examples/templates/phase-2-analysts.mdmarkdown6.8 KB
examples/templates/phase-2-structured-spec.mdmarkdown8.8 KB
examples/templates/phase-2.5-intent-synthesis.mdmarkdown31.0 KB
examples/templates/phase-3-4-component.mdmarkdown9.0 KB
examples/templates/phase-4-ui-kit.mdmarkdown39.3 KB
examples/templates/phase-5-docs.mdmarkdown12.5 KB
examples/templates/scratch-token-gen.mdmarkdown14.4 KB
examples/templates/specimen-reference.htmlother6.0 KB
file-specs/css-json.mdmarkdown9.5 KB
file-specs/css-tokens.mdmarkdown33.6 KB
file-specs/design-library-output.mdmarkdown10.3 KB
file-specs/design-spec-bundle.mdmarkdown5.9 KB
file-specs/documentation.mdmarkdown12.3 KB
file-specs/preview-pages.mdmarkdown28.0 KB
file-specs/ui-kit.mdmarkdown28.5 KB
operation-policies/agent-orchestration.mdmarkdown20.2 KB
operation-policies/bundle-exploration.mdmarkdown9.0 KB
operation-policies/decision-rules.mdmarkdown10.7 KB
operation-policies/quality-gates.mdmarkdown10.5 KB
operation-policies/user-output-policy.mdmarkdown7.8 KB
scripts/check-design-library-phase.mjsscript85.1 KB
scripts/copy-bundle-assets.mjsscript12.3 KB
scripts/css-to-json.mjsscript53.1 KB
scripts/css-utils.mjsscript748 B
scripts/extract-components-css.mjsscript10.3 KB
scripts/generate-uikit-plan.mjsscript27.5 KB
scripts/jsonl-utils.mjsscript7.3 KB
scripts/validate-design-library-output.mjsscript3.1 KB
scripts/validate-intent.mjsscript7.3 KB
scripts/validate-token-input.mjsscript4.0 KB
scripts/validate-uikit-plan.mjsscript13.6 KB
skill-release-manifest.jsonconfig202 B
workflows/create-from-scratch.mdmarkdown22.5 KB
workflows/create-from-structured-spec.mdmarkdown17.5 KB
workflows/create-library.mdmarkdown53.0 KB
workflows/expand-components.mdmarkdown9.0 KB
workflows/generate-additional-kit.mdmarkdown4.9 KB
workflows/refine-library.mdmarkdown9.7 KB

examples/templates/phase-2-analysts.md

View on GitHub
# Phase 2: Brand Analysis Sub-Task Template

> **Return contract**: The brand-analyst MUST write full JSON to disk AND return a compact summary (per SKILL.md #23, tightened to ≤ 600 tokens) containing ALL orchestration fields needed by Main Agent. Main Agent proceeds to Phase 3 with ZERO file reads between Phase 2 return and Phase 3 dispatch.

---

## Sub-Agent Execution Constraints

These apply to the brand-analyst:
- Tool bans per SKILL.md invariant #16: `TodoWrite`, `Skill`, `Grep`, `RunCommand`, `SearchCodebase`.
- FORBIDDEN additionally: `LS`, `Glob` — no discovery; use only the explicit file lists.
- FORBIDDEN: reading any path not listed in `validFiles` or the task's named input files.
- FORBIDDEN: retrying a NotFound path with another guessed path. Only size-limit retries with `offset`/`limit` are allowed.
- After all required Writes, write the compact report to `ReturnReportFileAbs` and STOP with only `已完成设计规范分析。`. No read-back, no verification prose, no markdown tables.
- SILENT: Do NOT output intermediate reasoning, status updates, or planning text between tool calls. After all Writes are done, write the report file and final-respond only `已完成设计规范分析。`.
- ⚠️ DISPATCH PARAMETER: `subagent_type` MUST be `"general_purpose_task"` (not "Explore", not "search"). Sub-agents WRITE files to disk — they need Write-capable agent type.

---

## brand-analyst

```
Task: Analyze brand identity, product type, and visual personality.
Output: {tmp_dir}/phase2-brand-analyst.json (written to disk)

⚠️ HARD RULES (embedded — do NOT skip):
  1. Brand narrative is inference; token values are not brand evidence by themselves
  2. Prefer structured brand-input and annotations-summary signals over generic design-system labels
  3. If UI copies are only state labels, mark brand confidence lower instead of fabricating
  4. If any Read fails with "exceeds the limit of 64KB" error: Re-read with offset=1, limit=600. Record in warnings: "Partial read: {filename} truncated at ~40KB"
  5. NEVER retry a failed Read without adding offset/limit parameters
  6. Total Read calls budget: ≤ 10
  7. ⚠️ WRITE full analysis JSON to disk, then return ONLY a summary (≤ 600 tokens): productType, confidence, personality keywords, language, kitType, colorNamingPrefix
  8. Write the file to disk, then write the compact report to `ReturnReportFileAbs`. Final response: `已完成设计规范分析。` No verification, no read-back, no extra prose.
  9. kitType mapping guidance (MUST follow):
     - design system / component library / enterprise UI framework → dashboard
     - mobile screens / consumer app / native app patterns → app
     - marketing / landing page / corporate site / portfolio → website
     - editorial / print-inspired / visual-heavy / poster → poster
     - When ambiguous, prefer dashboard over app for B2B/enterprise products
  10. colorNamingPrefix inference (CRITICAL):
     - If `colorPalette.brandSignalHints` exists and is non-empty, derive the prefix from the brand signal's
       HUE (e.g., "bg/bg-brand: #0fdc78" → green hue → prefix could be "jade", "emerald", "mint").
     - If brandSignalHints is empty, use `primaryHint` as fallback for hue inference.
     - NEVER use color-bearing words (e.g., "cobalt", "crimson") if you are unsure of the actual brand hue.
       Prefer neutral/product-derived names (product name abbreviation, brand name) when confidence is low.
     - The prefix must be a single lowercase word (no hyphens), suitable for CSS: `--{prefix}-blue-500`.
  12. productNarrative (MANDATORY in the written JSON): infer 2-3 realistic business scenarios this design system would power, based on the component inventory in brand-input (e.g., table+pagination+filter → "data management console"; chat-bubble → "messaging center"; cards+jumbotron → "marketing site"). Write into the JSON:
     ```json
     "productNarrative": {
       "scenario": "one-line product story (what app/site this system powers)",
       "userTasks": ["task 1 a real user performs", "task 2", "task 3"],
       "screens": [
         { "name": "screen name (product scenario, NOT a token page name)", "purpose": "user goal on this screen", "primaryAction": "single primary CTA label" }
       ]
     }
     ```
     - screens: 2-3 entries; names MUST be product scenarios (e.g., "Customer List", "Order Details"), NEVER design-system specimen pages ("Colors", "Typography").
     - Each screen declares exactly ONE primaryAction.
     - This narrative is consumed by the UIKit planner when the Figma file is a pure design system with no product pages.

Constraint files:
  ⚠️ INLINE READING STRATEGY (replaces bundle-exploration.md read for this analyst):
  --- Reading Priority (brand-analyst) ---
  1. {bundle_path}/generated/brand-input.jsonl — PRIMARY (structured JSONL data, read FIRST; each line is a JSON object with `_type` field, line 0 is meta).
  2. {bundle_path}/generated/annotations-summary.jsonl — Supplementary compact designer notes/UI copy signals (if brand-input lacks copy or token-note signals).
  3. context/brand-clues.md — Fallback brand narrative (only if JSON inputs lack sufficient cues).
  4. annotations/ui-copies*.md — Last resort only if JSON inputs are insufficient.
  Stop when: productType, personality, language, and kitType are determined.
  --- Bundle Structure ---
  Bundle is multi-file Markdown+SVG: tokens/, components/, assets/, pages/, annotations/, context/.
  --- END INLINE ---

  DO NOT Read bundle-exploration.md or design-spec-bundle.md — all needed strategy is above.
  If the above inline section is absent (backward compat), fall back to reading from disk.
Input data:
  - Bundle root path: {bundle_path}
  - Tmp dir: {tmp_dir}
  - Brand input file (PRIMARY source — read this FIRST): {bundle_path}/generated/brand-input.jsonl
  - Valid files (supplementary, ONLY if brand-input.jsonl is insufficient): {validFiles.context}
  - Supplementary files: generated/annotations-summary.jsonl (preferred), context/brand-clues.md and annotations/ui-copies*.md (fallback only if needed)
Execution:
  1. Read {bundle_path}/generated/brand-input.jsonl (primary structured JSONL input — each line is a JSON object with `_type` field)
  2. Optionally read {bundle_path}/generated/annotations-summary.jsonl if brand-input lacks sufficient copy or token-note signal
  3. Fallback to context/brand-clues.md only if JSON inputs lack sufficient signal
  4. Write complete analysis JSON to {tmp_dir}/phase2-brand-analyst.json
  5. Return compact summary
Report file format (`ReturnReportFileAbs`):
  - writtenFiles: ["{tmp_dir}/phase2-brand-analyst.json"]

Final response MUST NOT include JSON or paths. Use only: `已完成设计规范分析。`
  - summary: "Product: CRM dashboard (high confidence). Personality: professional, clean, data-rich. Language: en. Kit: dashboard. Prefix: electric-blue. Warnings: ..."
  - warnings: string[]
```
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall