buoy dock
Dock Buoy into your project. With no arguments, runs an interactive walkthrough that configures your project, sets up agents, and installs hooks. Use subcommands to set up individual pieces.
Usage
Commands
(default) Run interactive walkthrough (config → agents → hooks) config Create or update .buoy.yaml configuration agents Set up AI agent files (.claude/agents/) skills Install Buoy skills (.claude/skills/) context Generate CLAUDE.md with design system context hooks Set up pre-commit and CI hooks commands Manage Claude Code slash commands plugins Manage scanners and framework plugins tokens Generate, compare, and import design tokens graph Build and query the design system knowledge graph Options
-y, --yes Accept all defaults without prompting --json Output results as JSON -f, --force Overwrite existing files Examples
Interactive walkthrough
buoy dock config
buoy dock agents
buoy dock skills
buoy dock context
Scans your codebase for components and tokens, then generates CLAUDE.md with design system context so AI tools understand and follow your design system.
AI coding tools read these files to understand your design system. When you ask "Build a card component", the AI will:
- Check your existing Card component (if any)
- Use your color tokens instead of hardcoding
#3b82f6 - Follow your spacing scale instead of arbitrary values
- Match your naming conventions
buoy dock hooks
Non-interactive setup
Force overwrite
buoy dock commands
Install Buoy's slash commands to Claude Code. These commands give you quick access to design system workflows directly from Claude Code's command palette.
Subcommands
list List available Buoy slash commands and installation status install Install commands to ~/.claude/commands/ Options
--dry-run Show what would be installed without writing files --json Output result as JSON Available Commands
/contribution-loop
Autonomous workflow for finding repos with design drift and generating PRs to fix them. Runs through discovery, scanning, analysis, and PR generation phases.
Phases:
- Discovery — Find repos using design systems on GitHub
- Scanning — Run Buoy to detect drift
- Analysis — Use agents to assess fixability
- Triage — Classify as slam-dunk, review, or skip
- Generation — Create PR with full context
- Review — Human approval before submission
Example Output
Commands vs Skills
Commands are user-invocable — you type /contribution-loop
in Claude Code to trigger them. Skills are AI-invocable — Claude
automatically loads them when relevant.
Use buoy dock context to create skills, and buoy dock commands install
to install slash commands.
buoy dock plugins
Manage scanners and framework plugins. List built-in and installed plugins, or get suggestions based on your project's detected frameworks.
Subcommands
list List built-in scanners and installed plugins suggest Detect frameworks and recommend plugins List plugins
Suggest plugins
buoy dock tokens
Generate design tokens from values detected in your codebase. Outputs to CSS variables, JSON, Tailwind config, or AI-friendly context.
Options
-o, --output <path> Output file path (auto-detected if not specified) --format <format> Output format: css, json, tailwind, ai-context (auto-detected) --dry-run Preview without writing files --prefix <prefix> Prefix for CSS custom properties (e.g., "ds-") Examples
Generate CSS variables
Generate Tailwind extension
Generate AI context
Output Formats
- css - CSS custom properties (:root variables)
- json - Standard JSON token format
- tailwind - Tailwind CSS theme extension
- ai-context - Markdown with token intent and usage
Planning a design token migration?
Step-by-step playbook for migrating from hardcoded values to design tokens. Avoid the common pitfalls.
No spam. Unsubscribe anytime.
Compare token sources
Compare your codebase values against a design tokens file. Identifies which values in your code don't match any defined tokens.
<tokens-file> Path to design tokens file (JSON, CSS, or SCSS) required --json Output as JSON for scripting -v, --verbose Show per-file breakdown and usage frequency details --strict Fail if any unmatched values found Supported Token Formats
Design Tokens JSON (W3C format)
<div class="">{</div><div class=""> "color": {</div><div class=""> "primary": { "$value": "#3b82f6" },</div><div class=""> "secondary": { "$value": "#64748b" }</div><div class=""> },</div><div class=""> "spacing": {</div><div class=""> "sm": { "$value": "8px" },</div><div class=""> "md": { "$value": "16px" }</div><div class=""> }</div><div class="">}</div> Tokens Studio / Figma Export
<div class="">{</div><div class=""> "colors": {</div><div class=""> "blue-500": "#3b82f6",</div><div class=""> "gray-500": "#64748b"</div><div class=""> }</div><div class="">}</div> CSS Custom Properties
<div class="">:root {</div><div class=""> --color-primary: #3b82f6;</div><div class=""> --spacing-md: 16px;</div><div class="">}</div> Example Output
Import tokens
Import design tokens from external files. Supports JSON (DTCG, Tokens Studio, Style Dictionary) and CSS formats.
file Token file to import (JSON, CSS) required -o, --output <path> Output file path (default: design-tokens.css) -f, --format <format> Output format: css, json, scss (default: css) --dry-run Preview import without writing files buoy dock graph
Build and query a knowledge graph of your design system. Understand relationships between components, tokens, and patterns.
Commands
build Build the knowledge graph from the codebase (persists to .buoy/graph.json) learn Analyze drift history for repeat patterns and learnings query <question> Query the knowledge graph export Export the graph for visualization stats Show graph statistics Options
--incremental Only rebuild nodes for changed files (faster rebuilds) --json Output as JSON Examples
Build the graph
Query the graph
Learn from drift history
Analyze your drift history to surface repeat patterns. Shows which mistakes you keep making so you can address the root cause.
Generated Files
- .buoy.yaml — Main configuration file
- .claude/skills/ — Buoy skills for Claude Code
- .claude/agents/ — AI agent definitions
- .claude/commands/ — Slash commands for Claude Code
- CLAUDE.md — Design system context for AI tools
Related
- buoy show — View what's configured
- buoy drift — Detect and fix drift
- Claude Code — AI integration details
- AI Guardrails — Full guide