agentleFS
BAKUGOS1BAKUGOS1/SkilledAgents-Toolkit/skills/codex/manage-design-system/SKILL.md

stitch::manage-design-system

Skill0 starsChanged 5 months agoMITView on GitHub

Manage design systems in Stitch using MCP tools. Includes retrieval of assets, creating/updating design systems in Stitch, and applying them to screens.

  • Reads credentials

2 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 2 are distinctive, and 13 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.

  • 13

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a "source of truth" for your project's design language to ensure consistency across all future screens.

    line 16
  2. Very specific:

    Project lookup: Use list_projects to find the target projectId.

    line 29
  3. Very specific:

    Screen lookup: Use list_screens for that projectId to find representative screens (e.g., "Home", "Main Dashboard").

    line 30
  4. Very specific:

    Metadata fetch: Call get_screen for the target screen to get screenshot.downloadUrl and htmlCode.downloadUrl.

    line 32
  5. Very specific:

    Asset download: Use read_url_content to fetch the HTML code.

    line 34
  6. Very specific:

    If you need to extract a design system from existing screens, use the design-md skill (in the stitch-utilities plugin).

    line 38
  7. Distinctive:

    If there are no existing screens (new project), or the user provides a direct description (e.g., "dark theme, blue and purple, rounded, …

    line 40
  8. Very specific:

    After generating .stitch/DESIGN.md, make sure to also create or update the design system in Stitch.

    line 53
  9. Very specific:

    Option A (Recommended - Uploader Script): Use the modified upload-to-stitch Python script which natively handles .md files.

    line 66
  10. Very specific:

    Option B (Direct MCP Tool): If the DESIGN.md is small (under ~5KB), you can call the upload_design_md MCP tool directly, passing the …

    line 74
  11. Very specific:

    Create Design System: Call the create_design_system_from_design_md tool immediately after the upload, passing the projectId and the …

    line 75
  12. Very specific:

    Use apply_design_system to apply a design system to existing screens.

    line 83
  13. Very specific:

    Call get_project to retrieve screenInstances — each has an id and sourceScreen.

    line 105
  14. Very specific:

    Call list_design_systems to retrieve the design system name (format: assets/{assetId}) — use the part after assets/ as the assetId.

    line 107
  15. Very specific:

    After writing .stitch/DESIGN.md, also create or update .stitch/metadata.json to track the projectId, title, all known screens, and design …

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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-System

Create a "source of truth" for your project's design language to ensure consistency across all future screens.

[!NOTE] Refer to your system prompt for instruction on handling MCP tool prefixes for all tools mentioned in this skill (e.g., get_screen, create_design_system_from_design_md, apply_design_system).

📥 Retrieval

To analyze a Stitch project, you must retrieve metadata and assets using the Stitch MCP tools:

  1. Project lookup: Use list_projects to find the target projectId.
  2. Screen lookup: Use list_screens for that projectId to find representative screens (e.g., "Home", "Main Dashboard").
  3. Metadata fetch: Call get_screen for the target screen to get screenshot.downloadUrl and htmlCode.downloadUrl.
  4. Asset download: Use read_url_content to fetch the HTML code.

🧠 Synthesis from Description

If you need to extract a design system from existing screens, use the design-md skill (in the stitch-utilities plugin).

If there are no existing screens (new project), or the user provides a direct description (e.g., "dark theme, blue and purple, rounded, Inter font"):

  1. Map the user's vague terms to precise values using the design mappings (see design-md skill in stitch-utilities or generate-design skill).
  2. Select concrete hex codes, font families, and roundness values.
  3. Generate the DESIGN.md file (refer to the design-md skill in stitch-utilities for structure).
  4. Proceed to the "Create or Update Design System in Stitch" step below.

📝 Output Structure

The DESIGN.md file should follow the structure defined in the design-md skill (in the stitch-utilities plugin).

🚀 Create or Update Design System in Stitch

After generating .stitch/DESIGN.md, make sure to also create or update the design system in Stitch.

Two-step design system creation:

[!WARNING] Checkpoint — User Confirmation Required. Before uploading, you MUST pause and ask the user for confirmation. Present a summary of the design system you are about to create (display name, key colors, fonts, and roundness) and wait for explicit approval before proceeding. Do NOT upload until the user confirms.

  1. Upload DESIGN.md:
    • Option A (Recommended - Uploader Script): Use the modified upload-to-stitch Python script which natively handles .md files. It base64-encodes the markdown file in-process and sends it to the /v1/projects/{projectId}/screens:batchCreate endpoint, bypassing output token limits.
      python3 stitch-skills/plugins/stitch-design/skills/upload-to-stitch/scripts/upload_to_stitch.py \
        --project-id <PROJECT_ID> \
        --file-path /path/to/DESIGN.md \
        --api-key <API_KEY>
      This returns the sourceScreen ID and the screenInstance ID.
    • Option B (Direct MCP Tool): If the DESIGN.md is small (under ~5KB), you can call the upload_design_md MCP tool directly, passing the base64-encoded design markdown content as designMdBase64.
  2. Create Design System: Call the create_design_system_from_design_md tool immediately after the upload, passing the projectId and the selectedScreenInstance (containing the id and sourceScreen returned from the upload step).

Once the upload script and create_design_system_from_design_md have both completed, Stitch holds the design tokens at the project level — you do NOT need to repeat them in generation prompts.

🎨 Apply Design System to Screens

Use apply_design_system to apply a design system to existing screens.

[!IMPORTANT] selectedScreenInstances must contain only id and sourceScreen — do NOT include position/dimension fields (x, y, width, height) or the request will fail with "invalid argument". Get the screen instance IDs from get_project.

{
  "projectId": "...",
  "assetId": "...",
  "selectedScreenInstances": [
    {
      "id": "...",
      "sourceScreen": "projects/.../screens/..."
    }
  ]
}

How to get the required IDs:

  1. Call get_project to retrieve screenInstances — each has an id and sourceScreen.
  2. Call list_design_systems to retrieve the design system name (format: assets/{assetId}) — use the part after assets/ as the assetId.
  3. Filter out any instances with type: "DESIGN_SYSTEM_INSTANCE" — only pass real screens.

📋 Update Project Metadata

After writing .stitch/DESIGN.md, also create or update .stitch/metadata.json to track the projectId, title, all known screens, and design system summary. See examples/metadata.json for the format.

Schema Reference

See reference/tool-schema.md for the full designSystem object schema with all available options.

💡 Best Practices

Refer to the design-md skill (in the stitch-utilities plugin) for best practices on describing design elements.

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.