4-generate

4-generate is a command for Claude Code from vercel-labs/design-systems-to-agent-skills. It costs 0 tokens per session (3,251 once invoked), scanned A, original, MIT.

A command that creates the skill files for a design system from an approved product requirements document and recorded decisions. It generates files in parallel, using separate batches of helper agents.

In plain words
What is it for?
Use it after the earlier design-system planning stages to generate the final component skill files from either one PRD file or a PRD folder.
Why use it?
It removes the need to create every design-system skill file manually and keeps the work organized across fresh sessions with progress saved on disk.

Command for Claude Code ✓ vendor

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions subagents.

Good fit Use it after the earlier design-system planning stages to generate the final component skill files from either one PRD file or a PRD folder.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vercel-labs/design-systems-to-agent-skills/4-generate
About the project

DS Skills Pipeline is a command-line workflow that turns a design system's source code into structured skills for coding agents. It extracts verified tokens, components, icons, assets, usage patterns, and import paths, then generates and verifies reference files that agents can use when working with the design system.

vercel-labs/design-systems-to-agent-skills · 37 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/vercel-labs/design-systems-to-agent-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 4-generate

README.md
[![agentmods](https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/4-generate/github.svg)](https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/4-generate)
Your own site
<a href="https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/4-generate"><img src="https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/4-generate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 4-generate

Your own site · 80×15
<a href="https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/4-generate"><img src="https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/4-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,251 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03251
Opus 5 $0.00000 $0.01625
Sonnet 5 $0.00000 $0.00650
Haiku 4.5 $0.00000 $0.00325

Measured 11d ago against content hash 05413eb61fcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

4-generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/4-generate.md · 328 lines

How it starts

The opening of the file, as written. The whole thing — 328 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stage 4: Parallel Skill File Generation

Required Capabilities

  • File read/write
  • Shell command execution (git, directory creation)
  • Sub-agent spawning (recommended for parallelism; can dispatch serially without it)

Objective

Run Stage 4 of the design system skill generation pipeline: parallel skill file generation.

This should run in a fresh agent session. If this session has significant conversation history from Stages 1-3, start a new session first.

Read the closed PRD, decisions, and verified facts from disk. Generate all skill files using parallel sub-agents in batches of 8. Each component batch runs in its own fresh session to avoid context accumulation — the progress file on disk provides continuity between sessions.

The PRD may be either a single file (03-closed-prd.md) or a directory of 5 files (03-closed-prd/). Both formats are supported — detect which is present and load accordingly.

Process

Step 0: Session check

Check if this session has existing conversation history beyond loading this command.

If yes, warn:

This session has existing context. Stage 4 is the heaviest stage — it generates all skill files and needs maximum context budget.

Recommended: Start a fresh agent session and run Stage 4 again.

Continue anyway? (The mandatory pauses and progress file will help manage context, but fresh is better.)

Step 1: Load context from disk

Identify the design system by scanning context/ for available directories.

PRD format detection

Check which PRD format is present:

  • Directory format (context/{ds}/03-closed-prd/ exists): Multi-file mode. Load files selectively based on the current phase (see table below).
  • Single-file format (context/{ds}/03-closed-prd.md exists): Legacy mode. Load the full file.

Selective PRD loading (directory format only):

Phase PRD files loaded
Wave 1 (infrastructure) 01-file-manifest.md + 02-content-structure.md + 03-wave-plan.md
Wave 2 (guides) 02-content-structure.md + 03-wave-plan.md
Wave 3+ (component batches) 05-subagent-template.md + 03-wave-plan.md

Read the full file on GitHub · 328 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 328 lines · 0 tokens per session scan A 05413eb61fcd

Subscribe to this mod's changes

4-generate is a command published in the GitHub repository vercel-labs/design-systems-to-agent-skills (37 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,251 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.