agentleFS
dmlguq456dmlguq456/hearting/skills/design-init/SKILL.md

design-init

Skill8 starsChanged 2 months agoMITView on GitHub

Use only when autopilot-design dispatches design environment and state initialization. Not for top-level user requests or primary capability routing.

  • Installs packages

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow an explicit artifact or audience language when provided.

    line 20
  2. Very specific:

    Look for design_state.yaml under $AGENT_ARTIFACT_OUTPUT_DIR/designs/<name>/ or $AGENT_ARTIFACT_OUTPUT_DIR/spec/design/.

    line 24
  3. Distinctive:

    If present, stop and report that initialization already exists.

    line 26
  4. Very specific:

    Use the explicit user input or the app name supplied by autopilot-spec.

    line 33
  5. Very specific:

    Prefer project-local or harness-local packages.

    line 39
  6. Very specific:

    When the Claude compatibility projection owns the run and its native design MCP is selected, preserve this bootstrap interface:

    line 41
  7. Very specific:

    After registration, acknowledge that native mcp__design__* tools may attach only in a new session.

    line 59
  8. Very specific:

    Run (cd ~/.claude/tools/design-mcp && npm run smoke) and require its 7/7 native smoke contract before recording design_mcp_smoke: pass: …

    line 60
  9. Very specific:

    Write the result to 00_init/asset_inventory.md.

    line 96
  10. Distinctive:

    When a required tool contract remains unavailable:

    line 145

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

design-init

Language Rule

Follow an explicit artifact or audience language when provided. Otherwise, write inventory, environment reports, and user-facing guidance in the conversation language according to <agent-home>/roles/response-policy.md. Preserve commands, paths, native tool IDs, package names, and state-schema values.

Pre-Check

Look for design_state.yaml under $AGENT_ARTIFACT_OUTPUT_DIR/designs/<name>/ or $AGENT_ARTIFACT_OUTPUT_DIR/spec/design/.

  • If present, stop and report that initialization already exists; recommend the owning new-cycle or resume path rather than deleting the folder automatically.
  • If absent, continue.

Procedure

Step 1: Resolve the Design Name

Use the explicit user input or the app name supplied by autopilot-spec. Ask one concise question only when the name materially affects artifact resolution and remains ambiguous.

Step 2: Bootstrap Rendered Verification

The components, tokens, and review stages require rendered evidence. Inspect the active adapter's visual harness and local renderers first, then provision only missing, in-scope dependencies. Do not abandon the design solely because one preferred harness is absent; use a proven static fallback when live preview cannot be attached. Stop only for an actual permission, network, safety, or tool-contract blocker.

Prefer project-local or harness-local packages. Before installing an OS-global package such as apt install librsvg2-bin, tell the user what will change. Follow the active runtime's approval and sandbox contract for every install.

When the Claude compatibility projection owns the run and its native design MCP is selected, preserve this bootstrap interface:

# 1) Node 18+
node -v

# 2) Design MCP installation
test -d "$HOME/.claude/tools/design-mcp/node_modules" && echo 'design-mcp:installed' || echo 'design-mcp:needs-install'

# 3) Native MCP registration
claude mcp list 2>/dev/null | grep -q '^design:' && echo 'design-mcp:registered' || echo 'design-mcp:unregistered'

Provision only missing pieces:

  • needs-install → (cd ~/.claude/tools/design-mcp && npm install); this installs the lockfile-pinned Playwright, sharp, and pptxgenjs dependencies.
  • Missing Chromium → npx playwright install chromium, only when the selected browser harness proves it is absent.
  • unregistered → claude mcp add design --scope user -- node ~/.claude/tools/design-mcp/server.js.
  • After registration, acknowledge that native mcp__design__* tools may attach only in a new session. Use sharp, rsvg, or mmdc static rendering for the current cycle when that limitation applies.
  • Run (cd ~/.claude/tools/design-mcp && npm run smoke) and require its 7/7 native smoke contract before recording design_mcp_smoke: pass: preview, screenshot, view_image, console capture, computed-style eval_js, and multi-step capture.

Other adapters must use their own verified visual-harness or browser-render contract instead of copying the Claude registration command. Record the exact harness and evidence in 00_init/environment_check.md.

Inspect optional scope-specific tools:

ToolUseFallback
Figma connector or MCPReferenced Figma files for UI, slides, or iconsSkip when no Figma source is requested
shadcn/ui CLI and components.jsonProject component installation for --artifact projectRecommend pnpm dlx shadcn@latest init when project integration requires it
Tailwind config or tokens.cssProject design tokensCreate during the token stage
Native image-generation capabilityLogos, illustrations, thumbnailsUse the image_slot scaffold when generation is unavailable or out of scope
sharp, rsvg, cairosvg, or inkscapeFast standalone SVG/diagram rasterizationPrefer a renderer already bundled with the harness
Mermaid CLI, native ID mmdcMermaid to PNGInstall npm i -g @mermaid-js/mermaid-cli only when Mermaid rendering is selected and the global install is authorized

Report exact permission or network blockers; do not guess that a missing tool was installed successfully.

Step 3: Check Optional Figma Access

For ui, slide, or icon, verify the active adapter's Figma connector only when a Figma file is part of the request. A Claude compatibility run may inspect its native registry with:

claude mcp list 2>/dev/null | grep -i figma

Record absence as MISSING; do not block a design that does not use Figma.

Step 4: Inventory Existing Assets

Inspect:

  • tokens.css or tailwind.config.ts
  • components/ui/ or the project-equivalent component directory
  • public/icons/ or another SVG asset directory
  • prior design cycles under $AGENT_ARTIFACT_OUTPUT_DIR/designs/* or design/

Write the result to 00_init/asset_inventory.md. Existing project assets take precedence over remembered cross-project preferences.

Step 5: Create design_state.yaml

Preserve this machine-readable schema and native IDs:

design_name: <name>
scope: <ui|slide|icon|diagram|mixed>
created: <YYYY-MM-DD>
output_dir: <full path>
environment:
  design_mcp: <registered|installed-unregistered|needs-install>
  design_mcp_smoke: <pass|fail|skipped>
  figma_mcp: <OK|MISSING|N/A>
  shadcn: <OK|MISSING|N/A>
  tailwind: <OK|MISSING|N/A>
  image_gen_mcp: <OK|MISSING|N/A>
  svg_renderer: <sharp|rsvg|cairosvg|inkscape|bundled>
  mermaid_cli: <OK|MISSING|N/A>
  visual_verify_ready: <true|false>
existing_assets:
  tokens_file: <path or null>
  components_dir: <path or null>
  icons_dir: <path or null>
phases:
  init: done
  refs: pending
  tokens: pending
  components: pending
  review: pending
  handoff: pending
last_updated: <timestamp>

Set visual_verify_ready: true only when the selected live harness is verified or a tested static-render path can satisfy the scope. Preserve design_mcp fields for cross-adapter artifact compatibility even when another adapter owns rendering; explain the selected alternative in environment_check.md.

Output

  • 00_init/environment_check.md
  • 00_init/asset_inventory.md
  • design_state.yaml

Return Format

<output_dir>/00_init/ -- ✅ init completed (scope: <scope>, K tools OK, M missing)

When a required tool contract remains unavailable:

<output_dir>/00_init/ -- ⚠️ init completed but K required tools missing — install before next phase

The acting agent may retain durable environment patterns when they would materially improve future setup. Do not make memory writes a completion requirement; current environment evidence and project configuration remain authoritative.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.