21st-ui-explore — Claude Code skill: UI directions, install
This skill sketches several genuinely different UI directions from your project's design system plus 21st references. Handy when nobody knows yet what a new screen should look like.
npx skills add 21st-dev/skill --skill 21st-ui-explore -a claude-codeWhat 21st-ui-explore does
The workflow starts by reading .21st/design.json and the relevant product UI. No context? Run 21st init --design-context first. Then it searches 21st for references with 21st search "<interface and product context>" --context auto before generating anything.
You get three named directions. Each has to differ on at least two axes: hierarchy, information density, navigation model, content emphasis, interaction pattern, or composition. A recolored copy does not count. Shared constraints stay fixed throughout — real stack, tokens, brand assets, required content, accessibility, responsive behavior.
Hosted generation only kicks in when AI is explicitly on. The skill checks MCP get_usage.aiGenerationEnabled or reads the 21st AI generation line from 21st usage (CLI 1.17.1+ also takes 21st usage --json). With AI off, your own coding agent builds the previews from 21st search and 21st get. Calling generate or iterate_generation without AI access gets you nowhere, so don't suggest it. For plain implementation of an already-chosen direction, skip this skill.
What it helps with
- show three distinct interface directions before writing code
- compare options by hierarchy and density instead of color
- check a new screen against the project's design system
- record the chosen direction in
.21st/design.json - clean up abandoned local variants after picking one
Example prompts for the agent
- Show me three directions for the pricing page, grounded in our design system
- Explore alternatives for this screen and put the previews side by side
- Generate variants for the dashboard and save the decision to
.21st/design.json
How to install 21st-ui-explore
1Skills CLI (Vercel)
npx skills add 21st-dev/skill --skill 21st-ui-explore -a claude-code2Manually: put the files in place
~/.claude/skills/21st-ui-explore/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/21st-ui-explore/
1Skills CLI (Vercel)
npx skills add 21st-dev/skill --skill 21st-ui-explore -a codex2Manually: put the files in place
.agents/skills/21st-ui-explore/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add 21st-dev/skill --skill 21st-ui-explore -a cursor2Manually: put the files in place
.cursor/skills/21st-ui-explore/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install 21st-dev/skill 21st-ui-explore2Manually: put the files in place
.github/skills/21st-ui-explore/SKILL.md1Skills CLI (Vercel)
npx skills add 21st-dev/skill --skill 21st-ui-explore -a gemini-cli2Platform CLI
gemini skills install https://github.com/21st-dev/skill --path skills/21st-ui-exploreManually: put the files in place
.devin/skills/21st-ui-explore/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add 21st-dev/skill --skill 21st-ui-explore -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 21st-ui-explore
How do I install 21st-ui-explore in Claude?
Run npx skills add 21st-dev/skill --skill 21st-ui-explore -a claude-code. The skill lands at ~/.claude/skills/21st-ui-explore/SKILL.md.
What does 21st-ui-explore do?
It builds several meaningfully different UI directions from your project's design system and 21st references, then helps you compare them and pick one.
Do I need 21st AI generation access?
Only for hosted generation. The skill checks get_usage.aiGenerationEnabled or the 21st AI generation line in 21st usage, and without it your coding agent implements the previews instead.
Source text
SKILL.md · Apache-2.0
--- name: 21st-ui-explore description: Explore and compare multiple meaningfully different UI directions grounded in the current project's design system and 21st inspiration. Use when the user wants options, variants, concepts, a redesign direction, visual experimentation, or is unsure how a new interface should look. Trigger for requests such as "show me three directions", "explore alternatives", "what could this page look like", or "generate variants". Do not use for a straightforward implementation with an already-selected direction. --- # Explore grounded UI directions Create real choices without abandoning the project's visual identity. ## Workflow 1. Read `.21st/design.json` and the relevant product UI. If context is missing, run `21st init --design-context`. 2. Search 21st for multiple relevant references before generating: ```bash 21st search "<interface and product context>" --context auto ``` 3. Define three named directions. Each direction must differ on at least two meaningful axes such as hierarchy, information density, navigation model, content emphasis, interaction pattern, or composition. Color-only variants do not count. 4. Keep shared constraints fixed: real stack, tokens, brand assets, required content, accessibility, and responsive behavior. 5. Create comparable previews. Check MCP `get_usage.aiGenerationEnabled` or run `21st usage` and read the `21st AI generation` line. CLI 1.17.1+ also supports `21st usage --json`. Only when AI is explicitly enabled, use hosted generation with available AI credits: ```bash 21st generate "<goal plus fixed constraints>" --context auto --variants 3 ``` Otherwise, implement the previews with your own coding agent, grounded in `21st search` and `21st get` (MCP: `search` and `get_component`). Do not call or suggest hosted `generate` or `iterate_generation` without AI access. 6. Present the options together when the host supports a picker. Otherwise give each option a preview/deep link and a compact comparison. 7. Recommend one direction with concrete tradeoffs, but let the user choose. 8. After selection, remove abandoned local variants and record the decision in `.21st/design.json`. ## Direction contract For every direction provide: - a short, descriptive name; - the core idea and intended user effect; - the 21st/project references used; - what stays consistent with the project; - two or more meaningful differences; - accessibility or responsive risks; - the best-fit scenario. Do not generate random style mutations. Every difference must support a product or usability hypothesis that a user can evaluate.
© 21st-dev · Apache-2.0 · 21st-dev/skill