21st-ai

A tool for sketching user-interface designs with 21st AI, an AI service for generating web-interface drafts, then refining and importing the chosen code.

In plain words
What is it for?
Use it to draft UI concepts, preview variants in a browser, change a selected variant with plain-language instructions, and bring its code into a project.
Why use it?
It gives you several rough design options to preview and edit before rebuilding the selected design in the project’s actual technology stack.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/21st-dev/claude-code-plugin/21st-ai
Any agent
npx skills add 21st-dev/claude-code-plugin --skill 21st-ai
Clone the repo
git clone --depth 1 https://github.com/21st-dev/claude-code-plugin

Made for: Claude Code, Codex.

Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,112 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00195 $0.01112
Opus 5 $0.00097 $0.00556
Sonnet 5 $0.00039 $0.00222
Haiku 4.5 $0.00019 $0.00111

Measured 2d ago against content hash bc928af4cd81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

21st-ai 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 2d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • 21st-ai — 100% identical, 0 lines differ
  • 21st-ai — 100% identical, 0 lines differ
plugins/21st/skills/21st-ai/SKILL.md · 90 lines

How it starts

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

21st AI — sketch, iterate & grab code from the terminal

21st AI is a fast UI-drafting board. Mental model: draft it here, then finish it — sketch a few variants from a prompt, preview them, refine the one you like with plain-English edits, and pull its code into the repo. The whole loop runs from the 21st CLI (or the matching MCP tools), so you never leave the editor.

Sketch mode produces self-contained HTML + Tailwind drafts (fast, no build). The recommended handoff is the copy-prompt: a spec that tells you to rebuild the design in the target project's real stack — not paste raw HTML verbatim.

Auth

Same credential as the rest of the CLI: 21st login (saved token) or a 21st_sk_ key via --api-key / TWENTYFIRST_TOKEN. 21st usage shows tier + remaining quota. (See the 21st-cli-use skill for the full auth notes.)

The loop

# 1) Sketch — generate variants ("takes") from a prompt. Opens the preview in
#    the browser and prints the projectId.
21st generate "a pricing section with 3 tiers and a monthly/annual toggle"

# 2) List the takes (1-based numbers + whether each has rendered yet).
21st generation <projectId>

# 3) Edit ONE take in place with a natural-language change (PAID — see Metering).
21st iterate <projectId> "make it enterprise-flavored, add an annual toggle" --take 3

# 4) Grab the code to bring into the project (FREE).
21st take <projectId> --take 3            # paste-ready copy-prompt (recommended)
21st take <projectId> --take 3 --code     # raw self-contained HTML instead

Open the preview URL (printed by generate, and returned by iterate) in the editor's built-in browser to watch the variants render and update in place.

When to use which

  • generate — start fresh from a prompt. Returns a preview URL + projectId.
  • generation — list the takes so you know which --take N to act on.
  • iterate — refine an EXISTING take (edited in place; a new version is appended, so you can step back in the workspace). Use this to change something already generated instead of starting over.
  • take — pull a take's code. Default prints the copy-prompt (adapt-to-my- stack spec); --code prints the raw HTML. Both FREE and unlimited.

Read the full file on GitHub · 90 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. 2d ago First seen · 90 lines · 195 tokens per session scan A bc928af4cd81

Subscribe to this mod's changes

21st-ai is a skill published in the GitHub repository 21st-dev/claude-code-plugin (7 stars, last pushed 7d ago), licensed Apache-2.0. It adds 195 tokens to every session and 1,112 once invoked, about $0.0010 per session on Opus 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-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens