2b-usage-analysis

2b-usage-analysis is a command for Claude Code from vercel-labs/design-systems-to-agent-skills. It costs 0 tokens per session (2,499 once invoked), scanned A, original, MIT.

An optional step in a design-system documentation pipeline that examines how components are used in another codebase. A design system is a shared set of interface components such as buttons, forms, and menus.

In plain words
What is it for?
Use it to detect wrapper components, changed default settings, workaround comments, and code that transforms component data. It reports only patterns that can be verified in the consuming codebase.
Why use it?
Component source code does not show how developers actually wrap, customize, or work around those components. This step finds those real usage patterns when a consuming codebase is available.

Command for Claude Code ✓ vendor

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

Good fit Use it to detect wrapper components, changed default settings, workaround comments, and code that transforms component data. It reports only patterns that can be verified in the consuming codebase.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis
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 · 36 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 2b-usage-analysis

README.md
[![agentmods](https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis/github.svg)](https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis)
Your own site
<a href="https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis"><img src="https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis/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 2b-usage-analysis

Your own site · 80×15
<a href="https://agentmods.dev/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis"><img src="https://agentmods.dev/badge/commands/vercel-labs/design-systems-to-agent-skills/2b-usage-analysis.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 2,499 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.02499
Opus 5 $0.00000 $0.01249
Sonnet 5 $0.00000 $0.00500
Haiku 4.5 $0.00000 $0.00250

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

Security

Grade A, and why

2b-usage-analysis 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/2b-usage-analysis.md · 263 lines

How it starts

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

Stage 2b: Usage Analysis (Optional)

Required Capabilities

  • File read/write
  • Shell command execution (git, file existence checks, grep)
  • Sub-agent spawning (recommended for parallelism; can run serially without it)

Objective

Run Stage 2b of the design system skill generation pipeline: usage pattern analysis.

This stage analyzes how developers actually use DS components in a consuming codebase. It detects wrapper components, overridden defaults, workaround comments, and transform utilities — signals that only appear in usage, not in the DS source code.

Stage 2b is optional. It only runs when the user provides a consuming repo path. If no consuming repo is available, skip directly to Stage 3.

Critical: Report only patterns verifiable from the consuming codebase. Do not infer intent or generate from training data. If a pattern is unclear, flag it as [AMBIGUOUS].

Process

Step 1: Load inputs and validate

Read context/{ds}/01-decisions.md where {ds} is determined by scanning the context/ directory for available design systems.

Extract from decisions:

  • DS package name (for import detection)
  • Source repo path (for same-repo detection)
  • In-scope component list

Scan context/{ds}/02-verified-facts/components/ — list component names and read each file's ## Import section to extract import paths. These import paths are used to find DS component usage in the consuming repo.

Validate the consuming repo path (provided as argument):

  1. The path exists and is readable
  2. It contains source files (.tsx, .ts, .jsx, .js)
  3. It has DS package imports (grep for the package name in source files)

If context/{ds}/02-verified-facts/ is missing or empty:

Stage 2 verified facts not found. Run Stage 2 (extract) first.

If zero DS imports found in the consuming repo:

No {package} imports found in {consuming_repo_path}. This codebase does not appear to use {DS name}. Stage 2b requires a codebase that imports the design system.

Report and stop.

Read the full file on GitHub · 263 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 · 263 lines · 0 tokens per session scan A 16ef8384a2c0

Subscribe to this mod's changes

2b-usage-analysis is a command published in the GitHub repository vercel-labs/design-systems-to-agent-skills (36 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,499 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.