/design-system-ops:ai-component-descriptionfrom design-system-ops
Generates six-section prose descriptions (purpose, props, anti-patterns, composition, accessibility, examples) for Figma components, optimized for LLM consumption via Figma MCP. Useful when writing component metadata for AI agents.
Ships in design-system-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A skill for generating structured component descriptions optimised for consumption by LLMs via Figma's MCP server. Output is a six-section description that gives an AI agent the information it needs to understand, compose, and generate from a component accurately — without relying on implicit knowledge, visual inference, or team context.
Confirm that every path in this skill's frontmatter references: exists relative to this SKILL.md. If any is missing, stop: the install is incomplete, usually because a flattening installer (for example npx skills install) dropped the repo-root knowledge-notes/ directory. Tell the user to reinstall by a method in 1-INSTALL.md and run verify-install.sh from the install root. Proceed without the references only if the user explicitly says to, and then say in the output that it was produced without the pack's reference material.
Most component descriptions are written for human designers discovering the component for the first time: "use this to show important information", "works great in cards". An LLM reading a description needs to know what the component is, what it takes, what it prohibits, how it relates to other components, and what failure modes look like. Human-readable descriptions skip most of this.
The six-section format came from watching AI agents misuse components that had perfectly fine human documentation. Each section addresses a specific class of LLM error.
If .ds-ops-config.yml exists, follow the configuration-and-recurring knowledge note (../../knowledge-notes/configuration-and-recurring.md) for loading, integration fallbacks and recurring runs. This skill reads:
integrations.figma, integrations.storybook, integrations.github and integrations.documentation — which sources Step 0 can read automaticallyUse every source that is available:
.ai/metadata/<Component>.metadata.json (from metadata-schema-generator), if present: the props and the accessibility contract, each with a provenance marker. This is the extraction; the description renders from it and carries the markers through. Don't re-derive what it holds.integrations.figma with a file_key): the component node, its variants, layer structure (for composition) and existing description. The official Figma MCP reads the current selection or a node URL, so if it returns nothing, ask the user to select the component or paste the node link.integrations.storybook): prop types, defaults and arg types from the story metadata.integrations.github): prop definitions from TypeScript interfaces or PropTypes, the rendered element, ARIA attributes, key handlers and focus calls. Where Figma, Storybook and source disagree on the API, say so rather than picking one silently.If a source is configured but fails (connection error, invalid node, nothing selected), note the error and carry on with what you have. Do not retry in a loop.
Provenance rule. Every prop, default, ARIA role, key binding and focus behaviour in the description comes from source, Storybook, Figma or the user. Anything you can't trace is left out or marked "unverified" in the text, the same way inferred anti-patterns are marked "anticipated" (Section 3). Never fill the Props or Accessibility sections from what components of this kind usually do. See "Every figure and fact needs a source" in the output-discipline knowledge note.
Existing description. If the description field has content (anything other than null, an empty string or whitespace), quote it to the user before doing anything else: "This component already has a description: [text]. Want me to rewrite it in the six-section format, improve what's there, or start fresh?" If it already follows the six-section format, offer a completeness review instead. Never claim there is no description when there is one, and never silently discard it. Treat it as a starting point, not a source of truth: it often holds institutional knowledge worth keeping, but being there doesn't make it accurate.
Confirm the following from the Step 0 sources, and ask the user only for what they didn't supply:
Write each section in plain prose. No bullet markers or nested lists inside the description itself: AI agents parse prose better than nested lists in this context, and Figma's plain-text field doesn't render them. Where a section holds parallel items (props, anti-patterns), put each on its own line. Each section should be dense but not padded.
One to two sentences. What does this component do, and when should it be used? Write this as a contract statement, not a marketing line.
Bad: "A flexible card component for displaying content in a visually appealing way." Good: "A surface container for grouping related content that belongs together but does not require its own page. Use when content needs visual separation from surrounding context without implying navigational hierarchy."
Document every configurable prop. For each:
Format: prop-name; type; default; description, one prop per line. Separate fields with semicolons, because union types already use |. Write "no default" when the source declares none, and "required" for required props.
Do not skip props because they seem obvious. LLMs cannot infer defaults, and neither can you: take each type and default from source, Storybook or Figma (Step 0), and mark any the user supplied without a source as "unverified".
Example (illustrative Button):
variant; "primary" | "secondary" | "ghost" | "destructive"; "primary"; Controls visual weight and colour treatment
size; "sm" | "md" | "lg"; "md"; Adjusts padding, font size, and min-touch-target
disabled; boolean; false; Prevents interaction and applies reduced-opacity treatment
loading; boolean; false; Replaces label with loading indicator and prevents further clicks
What should an AI agent NOT do with this component? List the three to five most common misuse patterns, each as a one-sentence prohibition with a brief reason.
These anti-patterns should be specific to this component, not generic design system guidance. Write them based on actual misuse patterns if known, or inferred from the component's structure and common analogues.
Example (illustrative Button, one prohibition per line):
Do not use the destructive variant for actions that are reversible. Destructive implies permanent data loss or deletion.
Do not use ghost variant as the primary action in a flow. Ghost is for secondary or tertiary actions that should not compete with a primary.
Do not place more than one primary variant button in the same visual context.
Do not use size lg in dense form layouts. It creates disproportionate vertical rhythm. (anticipated)
Where no observed misuse is available, infer at most three from the API (a destructive variant used for reversible actions, a size used in dense layouts, an icon-only variant without a label, an action prop used for navigation) and mark each "anticipated". They get upgraded to observed once the team confirms them.
How does this component relate to others? Document:
Be specific. "Can be used in cards" is not useful. "Can be placed inside Card as an action — always as the last child of Card.Footer, never inside Card.Body" is useful.
Document the accessibility contract for this component:
This is not a WCAG checklist. It is the specific accessibility behaviour of this specific component, so take it from what the source actually renders and handles (element, ARIA attributes, key handlers, focus calls) or from the user. Anything you expect but can't confirm is marked "unverified", as anti-patterns are marked "anticipated". An unverified keyboard contract is still useful to the team; one stated as fact is how an agent ships a broken component.
Why this section requires extra rigour. Accessibility is the one section an agent can't infer from a screenshot or a prop list: the element, the key handlers and the focus moves are invisible in both. The description has to be prescriptive enough that an agent generating from it produces the same element, keys and focus behaviour the component has.
Specific requirements:
<button>, say so — an LLM may default to a <div> with role="button" which loses native keyboard behaviour.disabled attribute and aria-disabled behaviour, and state which one the component uses and why.aria-label with a description of the action, not the icon name.Two to three examples of correct usage. Each gives the intent and the configuration. For interactive components, at least one example also gives the expected DOM output, which hands an AI agent a validation target rather than just a generation prompt. For non-interactive components the DOM output is optional.
Example format:
Intent: [What the user is trying to accomplish]
Configuration: [Exact props/values needed]
Expected DOM output (interactive components):
[The rendered HTML structure an AI agent should produce and can validate against]
Example (illustrative Button):
Intent: Confirm action in a destructive confirmation dialog.
Configuration: variant="destructive", size="md", label="Delete account"
Expected DOM output:
<button
type="button"
class="btn btn-destructive btn-md"
>
Delete account
</button>
Intent: Secondary cancel action paired with the primary action above.
Configuration: variant="secondary", size="md", label="Cancel"
Expected DOM output:
<button
type="button"
class="btn btn-secondary btn-md"
>
Cancel
</button>
Intent: Icon-only close button in a modal header.
Configuration: variant="ghost", size="sm", iconOnly=true, icon="close", ariaLabel="Close dialog"
Expected DOM output:
<button
type="button"
class="btn btn-ghost btn-sm btn-icon"
aria-label="Close dialog"
>
<svg aria-hidden="true" class="icon icon-close">...</svg>
</button>
The expected DOM output does not need to be exhaustive — it should include the elements, attributes, and structure an AI agent would need to validate correctness. Include: semantic HTML elements, ARIA attributes, class names (if predictable), and any accessibility-critical attributes. Omit: internal implementation details, event handlers, and styling properties.
Before formatting, review each section for redundancy. The six sections should be complementary, not overlapping. Apply these rules:
If any section exceeds 100 words and contains information duplicated elsewhere, trim it. The target is dense precision, not comprehensive coverage through repetition.
The final description should be written as a single continuous text block suitable for pasting into Figma's component description field. Structure it with uppercase section headers in plain text (PURPOSE, PROPS, ANTI-PATTERNS, COMPOSITION, ACCESSIBILITY, EXAMPLES) so an LLM scanning the description via MCP can locate sections without parsing markdown. Figma keeps both a plain description and a rich-text descriptionMarkdown; tools may return either, so the plain form has to stand on its own (see the ai-readiness note).
Total length: 300 to 600 words. Long enough to be comprehensive, short enough that the full description fits within a reasonable token budget when loaded alongside other components.
If JSON metadata is needed as well, hand off to metadata-schema-generator, which owns the machine-readable component files. This skill produces prose only.
Before delivering the description, run a mental test: if an LLM received only this description and nothing else, could it:
If the answer to any of these is no, revise the relevant section before delivering.
If a Figma MCP with write access is connected, offer to write the completed description into the Figma component's description field. Show the exact text first, say what it will replace (quote the existing description again if there is one), and write only after the user says yes. This closes the loop — the description goes from generation to Figma in a single session, visible in Dev Mode immediately.
How to write back:
figma_set_description): pass the component's nodeId and the full six-section text as description. For rich formatting in Dev Mode, also pass the markdown-formatted version as descriptionMarkdown.use_figma): set the component's description through use_figma. Its reads are selection-scoped, so confirm the selected node is the component (or component set) you described.When NOT to write back:
When no write-capable Figma MCP is connected: present the description in chat and tell the user to paste it into the component's description field. If they ask to write it to Figma, point them at the Figma Console MCP or the official MCP's use_figma (see the mcp-setup-guide knowledge note).
End with a short chat summary:
.ai/metadata/ exists, props and the accessibility contract came from it with their provenance markersWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (murphytrueman/design-system-ops) — no native marketplace selected
npx claudepluginhub p/murphytrueman-design-system-ops36 skills in this plugin
/accessibility-per-componentAudit one design system component's accessibility against WCAG 2.2 AA: keyboard, screen reader, contrast, focus, ARIA, target size. Trigger: a11y audit, is this accessible, WCAG check, screen reader support, keyboard navigation check. Not for page- or product-wide audits./adoption-reportAdoption report: coverage (what the system provides), reach (teams with access) and adoption (teams shipping with it), design vs engineering, trend and at-risk teams. Triggers: adoption report, usage metrics, which teams use the system. Not docs coverage — use docs-coverage./agent-instructionsWrite the AGENTS.md that tells coding agents how to use this design system: where things live, sourced rules, how to check work, what not to do; Claude, Cursor or Copilot pointers on request. Triggers: AGENTS.md for our system, make it AI-navigable, agent instructions. Inventory: codebase-index./backlog-generatorTurn existing audit findings into sprint-ready tickets with T-shirt estimates, acceptance criteria, dependencies and phases. Triggers: tickets from audit, backlog from findings, sprint planning from report. Not for the contribution process (contribution-workflow)./change-communicationWrite release notes, a migration guide and a team announcement for a design system change that is already decided, scaled to its impact. Triggers: release notes, announce this change, tell teams about a breaking change. Semver call: version-bump-advisor. Deprecation plan: deprecation-process./cicd-integrationGenerate CI pipeline files and check scripts (GitHub Actions, GitLab, CircleCI, Bitbucket) that automate design system checks: token validation, hardcoded values, a11y scans, visual regression, bundle size. Trigger: set up CI, quality gates, automate these checks. Not for running an audit.2 plugins ship this exact skill · first indexed Sep 25, 2026
Other plugins' skills for the same job