Agent skill

Component Anatomy

by Dinil-Thilakarathne in Dinil-Thilakarathne/sona-ui

Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments.

MITAuto-check passedFrontend & Design

Install Component Anatomy

skills CLI
$ npx skills add Dinil-Thilakarathne/sona-ui --skill component-anatomy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Dinil-Thilakarathne/sona-ui component-anatomy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Dinil-Thilakarathne/sona-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/component-anatomy .claude/skills/component-anatomy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
component-anatomy
GitHub stars
118
Token cost
~1.9k tokens
SKILL.md length
970 words
Files
2
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments.

  • Works in 2 steps: Map the anatomy → Build the Inspection Board
  • The user asks to map
  • SKILL.md covers Required input, Approval gate, Phase 1 — Map the anatomy and Phase 2 — Build the Inspection…, plus 1 more section
  • Calls rg

What it does

Component Anatomy is an agent skill from Dinil-Thilakarathne/sona-ui. Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments. Use when the user asks to map, label, explain, visualize, record, or show the anatomy, parts, states, dimensions, or motion behavior of a component. Audit and propose the anatomy first, wait for approval, then build a non-invasive overlay on an isolated prototype route without changing the production component by default.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Frontend & Design. The repository describes itself as: A modern UI component library built with React and TailwindCSS to help you build beautiful and accessible web applications faster. The licence is MIT.

When your agent uses it

  • The user asks to map
  • Show the anatomy
  • Motion behavior of a component

Example prompts

  • “/component-anatomy”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Map the anatomy
  2. Build the Inspection Board

What it can do on your machine

Read from SKILL.md and the folder at commit 9a72ffe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Component Anatomy loads about 1.9k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 970 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Dinil-Thilakarathne/sona-ui at commit 9a72ffe, republished under its MIT licence (© Dinil-Thilakarathne). 970 words, ~1,936 tokens.

Download SKILL.mdSave it as .claude/skills/component-anatomy/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
component-anatomy
description
Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments. Use when the user asks to map, label, explain, visualize, record, or show the anatomy, parts, states, dimensions, or motion behavior of a component. Audit and propose the anatomy first, wait for approval, then build a non-invasive overlay on an isolated prototype route without changing the production component by default.

Component Anatomy

Turn a real component into an inspectable explanation. Keep the component interactive and place measurements, boundaries, labels, and motion explanations in separate prototype code. Every annotation must trace to the public API, rendered DOM, source, or observed behavior.

Required input

Require a component name or source/demo path. Locate the real component, demos, documentation, registry entry, and local dependencies with rg --files before proposing annotations. Ask only for information that cannot be discovered from the repository.

Approval gate

Run the workflow in two phases:

  1. Complete the anatomy audit and present the proposed board as a read-only brief.
  2. Stop for explicit approval of its composition, labels, states, and motion story.
  3. Build only the approved board on an isolated prototype route.

Treat label vocabulary, component framing, callout placement, dimensions, state sequence, camera framing, interaction, and motion as material design decisions. Implementation details that preserve the approved board do not need another confirmation.

Phase 1 — Map the anatomy

Trace the component

Inspect the implementation rather than inferring structure from its appearance. Record:

  • public parts, props, callbacks, refs, defaults, and controlled state;
  • rendered roles, accessible names, states, data-* attributes, and stable element relationships;
  • internal visual parts that materially explain the component;
  • interactive states such as rest, hover, focus, pressed, active, open, disabled, drag, and completion;
  • dimensions or spacing that communicate an intentional constraint;
  • animation ownership, layoutId relationships, transitions, reduced-motion behavior, and interruption where applicable.

For animated or gesture-driven components, read and apply the repository-local apple-design and design-motion-principles skills. Describe motion as a relationship or state change, not merely a duration and easing value.

Classify annotations

Assign each proposed annotation one evidence class:

  • Public part — a documented export, compound component, prop, or slot.
  • DOM part — a stable rendered element, role, attribute, or state.
  • Visual part — an internal rendered surface worth explaining.
  • Relationship — ownership, shared layout, anchoring, containment, or state flow.
  • Measurement — a meaningful size, gap, radius, travel distance, or hit target.

Use source terminology when it is clear. Introduce a conceptual label only when it improves understanding, and mark it as conceptual rather than presenting it as an API name.

Choose the story

Use Inspection Board as the base composition: one live component on a quiet dark canvas, surrounded by restrained labels, leader lines, boundaries, and only meaningful measurements.

Choose one scope per board:

  • Structure — parts and their hierarchy.
  • States — the same component across a small set of meaningful states.
  • Motion — trigger, travel or transformation, settlement, and interruption.

Prefer one legible board over combining every available fact. A component may need a short series of boards when its structural and motion stories are independently valuable.

Present the anatomy brief

Report:

  • component and demo sources inspected;
  • board purpose and selected scope;
  • exact labels, their evidence classes, and their source targets;
  • states or motion phases to demonstrate;
  • meaningful measurements;
  • interaction required during capture;
  • proposed prototype files and route;
  • uncertainties or conceptual labels;
  • visual decisions requiring approval.

Completion criterion: every proposed annotation names its evidence and the user can approve the board without guessing what will be built. Stop and wait for approval.

Phase 2 — Build the Inspection Board

Preserve the production component

Render the real component through its existing public API. Keep all board code under:

text
src/app/prototypes/<component>-anatomy/
src/components/prototypes/component-anatomy/

Production component code remains unchanged by default. Compose public parts or wrap the demo when stable targets are needed. Resolve targets in this order:

  1. explicit wrappers owned by the anatomy demo;
  2. public roles, accessible states, or stable existing data-* attributes;
  3. selectors scoped to the board root;
  4. manually configured geometry for conceptual relationships.

If none can identify an essential target reliably, pause and explain the limitation. Propose a production marker only when it also improves the component's reusable semantics or tooling, and obtain explicit approval before editing production source.

Show full SKILL.md (345 more words)Show less
Keep overlays non-invasive
  • Place annotations in a sibling overlay so they do not alter component layout or pointer behavior.
  • Measure targets relative to one board root with getBoundingClientRect().
  • Recalculate after mount, resize, font load, and relevant state changes.
  • Use ResizeObserver when target geometry can change.
  • Keep labels readable and leader lines uncrossed at the approved capture size.
  • Keep inspection chrome out of the accessibility tree unless it provides an intentional textual explanation.
  • Respect reduced motion; labels and measurement chrome should appear immediately in that mode.
  • Keep the real component keyboard- and pointer-operable beneath the overlay.

Avoid fragile positional selectors such as broad nth-child queries. Do not add anatomy-only props to the public component API.

Build for capture

Make the first version screen-recordable rather than creating an export system. Provide only controls the story needs, such as reset, replay, pause, or step state. Keep controls outside the capture frame when practical.

For a motion board, ensure the initial frame communicates the component and the first interaction begins quickly. Prefer a short repeatable sequence suitable for a 5–15 second social clip.

Verify

Run focused formatting and type checks for changed files. Inspect every target mapping after relevant state changes and confirm:

  • labels remain attached at the intended capture viewport;
  • overlays do not block component interaction;
  • measurements update after geometry changes;
  • keyboard, focus, and reduced-motion behavior still work;
  • console and observer cleanup are clean;
  • no production source, public API, or registry contract changed without approval.

The user owns visual browser review for Sona UI unless they explicitly request browser verification. Report static checks and rendered verification separately.

Completion criterion: the approved board is reachable on its isolated route, every visible annotation still maps to its declared evidence, the real component remains interactive, and verification status is reported precisely.

Handoff

State the prototype route, capture interaction, annotation mapping, files added, checks run, and whether visual review remains. Stop after the social-ready prototype. Propose documentation integration only after the user has tried the anatomy format across multiple components; do not add it to production documentation as part of this workflow.

© Dinil-Thilakarathne, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/component-anatomy of Dinil-Thilakarathne/sona-ui.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 9a72ffe

Compare with similar skills

Component Anatomy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Component Anatomy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Component Anatomy this skillDinil-Thilakarathne/sona-ui118—~1.9kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
React Doctormakeplane/plane61k12 repos~657Automated safety check: PassAGPL-3.0
Impeccablebestofjs/bestofjs3.1k26 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Web Interface Guidelines Reviewervercel-labs/openreview1.7k97 repos~308Automated safety check: PassNone

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    61k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 26 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Web Interface Guidelines Reviewer

    vercel-labs/openreview

    Official

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my…

    1.7k GitHub starsUsed in 97 repos~308 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from Dinil-Thilakarathne/sona-ui

All 10 skills in this repo
  • Oklch Skill

    Dinil-Thilakarathne/sona-ui

    OKLCH color space for web projects. An agent skill from Dinil-Thilakarathne/sona-ui.

    118 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Sona UI

    Dinil-Thilakarathne/sona-ui

    Discover and integrate Sona UI registry components. An agent skill from Dinil-Thilakarathne/sona-ui.

    118 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • Smooth Shadow Ring

    Dinil-Thilakarathne/sona-ui

    A skill your agent uses when styling any elevated surface (card, dialog, popover, dropdown, menu, tooltip, sheet, toast) in a Tailwind project that has shadow-plugin installed.

    118 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Add Sona Component

    Dinil-Thilakarathne/sona-ui

    Integrate a new component into the Sona UI library end to end — the full per-component pipeline of writing the component, demo, docs, registry entry, nav link, playground controls, regenerating the…

    118 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Design Motion Principles

    Dinil-Thilakarathne/sona-ui

    Motion and interaction design expert based on Emil Kowalski, Jakub Krehel, and Jhey Tompkins' techniques.

    118 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Promote Portfolio Component

    Dinil-Thilakarathne/sona-ui

    Promote a finished Craft, experimental UI, or reusable React component from the user's portfolio into the Sona UI library through an approval-gated two-phase workflow.

    118 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed

Questions about Component Anatomy

What does Component Anatomy do?

Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments. Component Anatomy is an agent skill from Dinil-Thilakarathne/sona-ui. Create a source-backed Inspection Board around an existing Sona UI component for social demonstrations and later documentation experiments.

When should I use Component Anatomy?

Component Anatomy fits situations like: the user asks to map; show the anatomy; motion behavior of a component.

How do I install Component Anatomy in Claude Code?

Run `npx skills add Dinil-Thilakarathne/sona-ui --skill component-anatomy -a claude-code`. Or copy the skill folder (.agents/skills/component-anatomy in Dinil-Thilakarathne/sona-ui) into .claude/skills/component-anatomy in your project. Claude Code loads it when a task matches its description.

How do I install Component Anatomy in Codex?

Run `npx skills add Dinil-Thilakarathne/sona-ui --skill component-anatomy -a codex`. Or copy the skill folder (.agents/skills/component-anatomy in Dinil-Thilakarathne/sona-ui) into .agents/skills/component-anatomy in your project. Codex loads it when a task matches its description.

Can I use Component Anatomy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Dinil-Thilakarathne/sona-ui --skill component-anatomy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/component-anatomy, .gemini/skills/component-anatomy, .github/skills/component-anatomy and .opencode/skills/component-anatomy in your project.

What does Component Anatomy need to run?

Going by SKILL.md and its folder, Component Anatomy needs the command-line tools its instructions call (rg).

Does Component Anatomy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Component Anatomy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Component Anatomy use?

Component Anatomy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Component Anatomy use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Component Anatomy?

Skills that share tags, products or a category with Component Anatomy: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 61k stars), Impeccable (bestofjs/bestofjs, 3.1k stars) and Figma Design System Builder (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Component Anatomy?

Dinil-Thilakarathne (a GitHub user) maintains it in Dinil-Thilakarathne/sona-ui, which has 118 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: Dinil-Thilakarathne/sona-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.