define-component

define-component is a skill for Claude Code from bromso/metapowers. It costs 60 tokens per session (792 once invoked), scanned A, original, MIT.

A written component specification covering its typed inputs, variations, interaction states, design values, accessibility behavior, keyboard use, and support for different languages. It acts as a shared reference for design, implementation, and testing.

In plain words
What is it for?
Use it to define a component’s contract before exploring visual options or building it in Figma.
Why use it?
It makes the expected behavior explicit before work begins, reducing gaps between the design and the finished component.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the design plugin — 8 skills, 1 MCP server shipped together

Good fit Use it to define a component’s contract before exploring visual options or building it in Figma.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add bromso/metapowers
Claude Code
/plugin install design

Made for: Claude Code.

Or install design, the plugin that ships this one along with the rest of its 8 skills, 1 MCP server.

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 define-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/bromso/metapowers/define-component/github.svg)](https://agentmods.dev/skills/bromso/metapowers/define-component)
Your own site
<a href="https://agentmods.dev/skills/bromso/metapowers/define-component"><img src="https://agentmods.dev/badge/skills/bromso/metapowers/define-component/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 define-component

Your own site · 80×15
<a href="https://agentmods.dev/skills/bromso/metapowers/define-component"><img src="https://agentmods.dev/badge/skills/bromso/metapowers/define-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 792 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.00060 $0.00792
Opus 5.5 $0.00024 $0.00317
Sonnet 5.5 $0.00012 $0.00158
Haiku 4.5 $0.00006 $0.00079

Measured 3d ago against content hash c4f9685c7a46, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

define-component 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 3d 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.

plugins/design/skills/define-component/SKILL.md · 53 lines

How it starts

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

Define Component

Produce a complete component contract for "$ARGUMENTS" that serves as the single source of truth for prototyping, implementation, and testing.

Arguments. $ARGUMENTS may contain the project name and optional flags. Take the first token as <project> and treat --skip-checks as a flag; never include flags in file paths. All paths below use <project>. If --skip-checks is present, skip the prerequisite check and, before writing any artifact, append one line to .metapowers/design/<project>/skip-log.md: - <ISO timestamp> — <skill name> skipped prerequisite check for <artifact file> — reason: <reason or "none given">.

Prerequisites

Read .metapowers/design/<project>/01-empathize.md. If this file does not exist, tell the user:

Phase 1 (Empathize) has not been completed for "". Run /design:empathize <project> first, or use --skip-checks to bypass.

Process

  1. Read context files:

    • Read ${CLAUDE_PLUGIN_ROOT}/shared/component-contract-template.md for the output structure
    • Read ${CLAUDE_PLUGIN_ROOT}/shared/wcag-criteria.md for accessibility requirements
    • Read .metapowers/design/<project>/01-empathize.md for user needs and existing patterns (if exists)
  2. Read the design system via MCP tools figma_get_design_system and figma_get_variables:

    • Existing components that overlap with this one
    • Available design tokens (colors, spacing, typography, radii)
    • Established patterns and conventions
  3. Produce the component contract following the template structure. Every field must be filled — no placeholders, no TBDs. Specifically:

    • Props: Complete with TypeScript types. Every prop has a default value rationale.
    • Variant matrix: Enumerate all dimensions. Calculate total combinations. Flag any combinations that should be excluded and explain why.
    • States: All of: default, hover, focus, active, disabled, error, loading. For each state, specify visual changes (which tokens change) and ARIA updates.
    • Token references: Use only tokens from the design system. Never use raw color values, pixel values, or hardcoded strings. If a needed token doesn't exist, flag it as "MISSING TOKEN: [description]".
    • Accessibility: Map each WCAG criterion from the reference file. Specify keyboard interaction model, ARIA role, all ARIA attributes, focus management strategy.
    • i18n: Identify all translatable strings. Specify RTL behavior. State content expansion allowance (typically 30-50% for Western to CJK).

Read the full file on GitHub · 53 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. 3d ago First seen · 53 lines · 60 tokens per session scan A c4f9685c7a46

Subscribe to this mod's changes

define-component is a skill published in the GitHub repository bromso/metapowers (2 stars, last pushed 3d ago), licensed MIT. It adds 60 tokens to every session and 792 once invoked, about $0.0002 per session on Opus 5.5. 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-10-21.

Related

Other skills, from other repositories