21st-ai

21st-ai is a skill for Claude Code, Codex from 21st-dev/codex-plugin. It costs 195 tokens per session (1,348 once invoked), scanned A, a copy of 21st-ai, Apache-2.0.

A terminal-based UI drafting tool creates web interface ideas from prompts, lets you preview and edit versions, and brings the chosen code into your project.

In plain words
What is it for?
It is for sketching UI variants, previewing them in a browser, refining one with plain-language changes, and retrieving its code.
Why use it?
It gives you a quick way to explore interface designs before rebuilding the final version in your project's actual technology stack.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It is for sketching UI variants, previewing them in a browser, refining one with plain-language changes, and retrieving its code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/21st-dev/codex-plugin/21st-ai
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.

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

Made for: Claude Code, Codex.

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 21st-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/21st-dev/codex-plugin/21st-ai/github.svg)](https://agentmods.dev/skills/21st-dev/codex-plugin/21st-ai)
Your own site
<a href="https://agentmods.dev/skills/21st-dev/codex-plugin/21st-ai"><img src="https://agentmods.dev/badge/skills/21st-dev/codex-plugin/21st-ai/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 21st-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/21st-dev/codex-plugin/21st-ai"><img src="https://agentmods.dev/badge/skills/21st-dev/codex-plugin/21st-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,348 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 100% copy Near-identical to another mod 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.00195 $0.01348
Opus 5.5 $0.00078 $0.00539
Sonnet 5.5 $0.00039 $0.00270
Haiku 4.5 $0.00019 $0.00135

Measured 1mo ago against content hash 229119802d83, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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

This is a copy

100% identical to 21st-ai — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/21st-ai/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 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 (MCP: get_usage) shows the account tier, aiGenerationEnabled, and remaining free daily component-code retrieval quota. It does not report the AI credit balance. (See the 21st-cli-use skill for the full auth notes.)

Before generating or iterating, check MCP get_usage.aiGenerationEnabled or the 21st AI generation line from 21st usage. CLI 1.17.1 also supports 21st usage --json. Proceed only when AI is explicitly enabled; missing or unknown status does not grant access. A base Builder subscription does not enable AI. When it is false, use search → get_component and adapt the code with the user's own agent. Do not attempt generate or iterate_generation, including through the CLI as a fallback.

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

Read the full file on GitHub · 107 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. 1mo ago Changed · +17 lines 229119802d83
  2. 1mo 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/codex-plugin (10 stars, last pushed 10d ago), licensed Apache-2.0. It adds 195 tokens to every session and 1,348 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to 21st-ai, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

glance-canonical-layouts

Use this skill to create home screen widgets using Jetpack Glance Canonical Layouts from the Android Platform Samples project, or when asked to implement standard widget layout patterns (including Check List, Image Grid, Snap Scrolling, and Standard Toolbar).

android/skills · 56 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens