# Create AI component metadata

Generates AI-ready metadata for design system components. Analyzes structure and produces structured metadata so AI knows when and how to use each component correctly.

Curated by The Design Project. Adapted from the original skills repo.

## How TDP uses it

When maintaining a design system that I want AI to consume intelligently. I run it on a component file and get back metadata that tells the AI when/where to use that component — critical for AI-driven UI generation against a real DS.

Activation and available tools depend on the host and installed version.

## Your first task

Bring: Component source, props, variants, states, and existing usage examples.

Task: Document purpose and selection rules alongside actual API behavior and accessibility requirements.

Check: Verify each prop and example against implementation; mark undocumented behavior instead of inventing it.

## When to use this workflow

Use component metadata to make selection rules and implementation behavior discoverable together. A prop list explains configurable inputs, while the contract explains purpose, composition, supported states, and alternatives. Agents and people need both to choose a component correctly.

## A worked example

For a button exercise, inspect the implementation and existing design reference before drafting metadata. Record the public import, variants, default size, icon rules, and interaction behavior. Add examples for a form action group and a destructive flow, then explain which choices belong to the component and which belong to the surrounding product.

## Decisions and common mistakes

When Figma, code, and documentation disagree, show the conflict and its sources. Do not let a plausible recommendation become an approved requirement. The TDP Figma-to-Storybook demonstration uses this audit to surface differences before implementation, including missing states and unclear usage guidance.

## What to hand off

Keep the contract beside the implementation and link it from the design-system entry point. Verify examples against actual code and runnable stories. When a supported behavior changes, update all three in the same review so consumers do not inherit contradictory instructions.

## Step-by-step setup

1. Choose one task, provide the relevant files or brief, and define the expected output.
2. Review the source and prerequisites; install the skill or open the original resource.
3. Apply it with current project context.
4. Review the result against the actual requirements.
5. Save approved outputs and record limitations.

```bash
npx skills add thedesignproject/agent-skills -s ai-component-metadata
```

[Full skill source](https://github.com/thedesignproject/agent-skills/tree/main/skills/ai-component-metadata)

## Starter request

Create metadata for this component: purpose, props, variants, states, accessibility expectations, examples, and when not to use it. Flag undocumented behavior.

## How to Build an AI-managed Design System With Claude Code Skills

See how Claude Code skills fit into an AI-managed design system. Review the linked skill instructions for the exact setup supported by your agent host.

[Watch the TDP walkthrough](https://www.youtube.com/watch?v=Z-CKUQSS8AY)

## Use it in a workflow

### Tokens and component context

Starting a new project, rebranding, or making an existing DS usable by AI agents.

1. [Extract a design system](https://designproject.io/resources/skills/extract-design-system/) — Point it at a reference site — your own, a competitor, or one you admire — to extract color, typography, and spacing tokens
2. [Create AI component metadata](https://designproject.io/resources/skills/ai-component-metadata/) — Generate AI-consumable metadata for each component so an agent knows when and how to use it

[Browse all agent skills](https://designproject.io/resources/skills/)

[Original TDP skills repo](https://designproject.io/skills-repo/)

Canonical: https://designproject.io/resources/skills/ai-component-metadata/

## Keep learning

- [Extract a design system](https://designproject.io/resources/skills/extract-design-system/)
- [Context OS principles](https://designproject.io/resources/skills/context-principles/)
- [How to write a design.md file: a step-by-step guide](https://designproject.io/resources/guides/write-design-md/)
