Skip to content

For scripts and agents

Every command accepts --json. When passed, the command writes a single JSON document to stdout with no other output and never prompts interactively (create behaves the same as when stdout is not a terminal).

Terminal window
xds list --json
xds create my-app --name orbit --targets web-react --dry-run --json
xds tokens color.text --json

Errors are written to stderr as a single JSON document:

{ "error": { "kind": "error", "message": "There is no theme \"nope\". Themes: forest, indigo, ocean, plum, sunset" } }

kind is error, usage (for invalid arguments), or cancelled. A failing check (doctor or contrast --min) is treated as a normal result rather than an error: it is written to stdout with "ok": false.

Code Meaning
0 The command succeeded
1 The command failed, or a check did not pass
2 Invalid command-line arguments
130 An interactive prompt was cancelled with Esc or Ctrl-C

This repository includes an AGENTS.md file that documents the design system rules for coding agents, along with a CLAUDE.md file that imports it. xds create writes both files into each generated project, tailoring AGENTS.md to list only the clients included in that project.

skills/xds provides a skill in the Agent Skills format. It shows coding agents how to use the CLI commands above and includes task-specific guides for scaffolding and themes, tokens, components, and verifying UI changes.

Terminal window
npx skills add kjmin-dev/xds

In Claude Code, this repository can also be added directly as a plugin marketplace:

/plugin install xds --marketplace kjmin-dev/xds

xds mcp exposes the CLI commands as MCP tools for agents that cannot run shell commands directly. It communicates over stdio and is built on rmcp, the official Rust SDK.

Terminal window
claude mcp add xds -- xds mcp
{ "mcpServers": { "xds": { "command": "xds", "args": ["mcp"] } } }
Tool Description
list Lists the available targets and themes
tokens Lists design tokens, optionally filtered by query and tier
components Lists all components
component Returns the details for a single component, including source code when code is true
contrast Computes the contrast ratio between two colors or color tokens
doctor Runs project health checks
create, add, theme Scaffolds a project, adds targets, or applies a theme

Each tool returns the same JSON payload as the corresponding CLI command with --json. create, add, and theme run in dry-run mode unless "write": true is passed. The read-only tools accept an optional project directory; when omitted, they inspect the server’s working directory, or fall back to the embedded template if the working directory is not a project.

Agents with shell access do not need the MCP server; running the CLI commands with --json produces identical output.