agentleFS
weg-9000weg-9000/Lime-design/skills/ds-push/SKILL.md

ds-push

Skill0 starsChanged 5 months agoMITView on GitHub

Publish the design system to Claude Design (claude.ai/design) as a tokens+guidelines bundle via the DesignSync tool, or build the bundle locally with --local-only. Fail-closed on /ds-gate BLOCK.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Run /ds-gate (tokens mode).

    line 30
  2. Very specific:

    Do not fabricate _ds_manifest.json, adherence configs, or version files — the app regenerates those server-side.

    line 59
  3. Distinctive:

    Follow the tool's required ordering — read → plan → write:

    line 67
  4. Very specific:

    Verify with list_files; pin the projectId to .ds-project.json in the Hub.

    line 79
  5. Very specific:

    Do not write _ds_sync.json — omitting the sync anchor is the honest choice for a hand-built bundle (the app simply re-verifies on open).

    line 81

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

Purpose

Bridge the token SSoT OUT to Claude Design, so its design agent generates UI constrained by your tokens. Claude Design consumes tokens as CSS custom properties reachable from the project's root styles.css @import closure — exactly what /ds-gen produces. A tokens-only design system (no React components) is a supported shape.

⚠️ The bundle layout below follows the observed /design-sync contract, which is not officially documented and may change. Prefer the built-in /design-sync skill when it is available in the session and the Hub has a React component package; use this skill's direct path for tokens-only pushes.

Step 1 — Gate (mandatory, fail-closed)

Run /ds-gate (tokens mode). Exit 2 (BLOCK) → stop; report findings; do not build or upload. Exit 1 (CONDITIONAL) → list the FIX findings and ask the user whether to proceed.

Also run /ds-gen --check — never upload a stale tokens.css.

Step 2 — Build the bundle → dist/claude-design/

python -X utf8 ${CLAUDE_PLUGIN_ROOT}/scripts/build_claude_bundle.py --hub . --out dist/claude-design --profile design.profile.yml

The builder is itself fail-closed: it BLOCKs (exit 2, nothing written) when DESIGN/tokens.css is missing or older than the SSoT. It produces:

dist/claude-design/
├── styles.css          # root stylesheet: @import "./tokens/tokens.css";
├── tokens/tokens.css   # verbatim copy of DESIGN/tokens.css
├── _ds_bundle.js       # empty-bodied bundle (tokens-only shape)
└── guidelines/         # DESIGN.md split into per-topic .md files
    ├── tokens.md       #   (Tokens + Accessibility sections)
    └── principles.md   #   (Principles, Do/Don't, Voice & Tone)
  • styles.css matters: rendered designs receive only its transitive @import closure — a token file not imported there is invisible to the design agent.
  • Review the builder's findings: unmatched DESIGN.md sections (INFO) and 4k-char truncations (FIX) are reported, not silently dropped.
  • Do not fabricate _ds_manifest.json, adherence configs, or version files — the app regenerates those server-side.

With --local-only (or when DesignSync is unavailable): stop here and tell the user the bundle is ready for manual import at claude.ai/design.

Step 3 — Upload via DesignSync (requires the DesignSync tool)

Follow the tool's required ordering — read → plan → write:

  1. list_projects → if the Hub's .ds-project.json pins a projectId, use it; else ask the user to pick or create_project.
  2. get_project → verify type: PROJECT_TYPE_DESIGN_SYSTEM (the type is immutable — pushing at a regular project never converts it).
  3. list_files → build a structural diff; on re-push, plan only changed paths.
  4. finalize_plan with the exact write paths (globs allowed), localDir = dist/claude-design/. The user reviews this plan — wait for it to succeed before any write.
  5. write_files with localPath entries, ≤256 files per call (tokens-only bundles are far smaller). On a 500, halve the chunk and retry.
  6. Verify with list_files; pin the projectId to .ds-project.json in the Hub.

Do not write _ds_sync.json — omitting the sync anchor is the honest choice for a hand-built bundle (the app simply re-verifies on open).

Step 4 — Report

Project URL (https://claude.ai/design/p/{projectId}), files uploaded, verdict that gated the push, and a reminder: after token changes, /ds-gen + /ds-push re-publishes.

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.