antd▌
ant-design/ant-design-cli · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
You have access to @ant-design/cli — a local CLI tool with bundled antd metadata for v4/v5/v6. Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.
Ant Design CLI
You have access to @ant-design/cli — a local CLI tool with bundled antd metadata for v4/v5/v6. Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.
Setup
Before first use, check if the CLI is installed. If not, install it automatically:
which antd || npm install -g @ant-design/cli
After running any command, if the output contains an "Update available" notice, run npm install -g @ant-design/cli to update before continuing.
Always use --format json for structured output you can parse programmatically.
Scenarios
1. Writing antd component code
Before writing any antd component code, look up its API first — don't rely on memory.
# Check what props are available
antd info Button --format json
# Get a working demo as starting point
antd demo Button basic --format json
# Check semantic classNames/styles for custom styling
antd semantic Button --format json
# Check component-level design tokens for theming
antd token Button --format json
Workflow: antd info → understand props → antd demo → grab a working example → write code.
2. Looking up full documentation
When you need comprehensive component docs (not just props):
antd doc Table --format json # full markdown docs for Table
antd doc Table --lang zh # Chinese docs
3. Debugging antd issues
When code isn't working as expected or the user reports an antd bug:
# Collect full environment snapshot (system, deps, browsers, build tools)
antd env --format json
# Check if the prop exists for the user's antd version
antd info Select --version 5.12.0 --format json
# Check if the prop is deprecated
antd lint ./src/components/MyForm.tsx --format json
# Diagnose project-level configuration issues
antd doctor --format json
Workflow: antd env → capture full environment → antd doctor → check configuration → antd info --version X → verify API against the user's exact version → antd lint → find deprecated or incorrect usage.
4. Migrating between versions
When the user wants to upgrade antd (e.g., v4 → v5):
# Get full migration checklist
antd migrate 4 5 --format json
# Check migration for a specific component
antd migrate 4 5 --component Select --format json
# See what changed between two versions
antd changelog 4.24.0 5.0.0 --format json
# See changes for a specific component
antd changelog 4.24.0 5.0.0 Select --format json
Workflow: antd migrate → get full checklist → antd changelog <v1> <v2> → understand breaking changes → apply fixes → antd lint → verify no deprecated usage remains.
5. Analyzing project antd usage
When the user wants to understand how antd is used in their project:
# Scan component usage statistics
antd usage ./src --format json
# Filter to a specific component
antd usage ./src --filter Form --format json
# Lint for best practice violations
antd lint ./src --format json
# Check only specific rule categories
antd lint ./src --only deprecated --format json
antd lint ./src --only a11y --format json
antd lint ./src --only performance --format json
6. Checking changelogs and version history
When the user asks about what changed in a version:
# Specific version changelog
antd changelog 5.22.0 --format json
# Version range (both ends inclusive)
antd changelog 5.21.0..5.24.0 --format json
7. Exploring available components
When the user is choosing which component to use:
# List all components with categories
antd list --format json
# List components for a specific antd version
antd list --version 5.0.0 --format json
8. Collecting environment info
When you need to understand the project's antd setup, or prepare info for a bug report:
# Full environment snapshot (text — paste into GitHub Issues)
antd env
# Structured JSON for programmatic use
antd env --format json
# Scan a specific project directory
antd env ./my-project --format json
Collects: OS, Node, package managers (npm/pnpm/yarn/bun/utoo), npm registry, browsers, core deps (antd/react/dayjs), all @ant-design/* and rc-* packages, and build tools (umi/vite/webpack/typescript/etc.).
9. Reporting antd bugs
When you encounter a confirmed antd component bug that can't be resolved locally:
# Step 0: Collect environment info for reference (optional — antd bug already embeds basic env)
# Use the output to cross-check versions or attach extra details to the bug report
antd env --format json
# Step 1: Preview for user review
antd bug --title "DatePicker crashes when selecting date" \
--reproduction "https://codesandbox.io/s/xxx" \
--steps "1. Open DatePicker 2. Click a date" \
--expected "Date is selected" \
--actual "Component crashes with error" \
--format json
# Step 2: Show to user, ask for confirmation
# Step 3: Submit after user confirms
antd bug --title "DatePicker crashes when selecting date" \
--reproduction "https://codesandbox.io/s/xxx" \
--steps "1. Open DatePicker 2. Click a date" \
--expected "Date is selected" \
--actual "Component crashes with error" \
--submit
10. Auto-reporting CLI issues
IMPORTANT: Whenever you use any antd CLI command and notice something wrong, you should proactively initiate a bug report using antd bug-cli.
Trigger conditions — report a CLI bug when you observe any of these:
- A command crashes or exits with an unexpected error
- A command returns clearly incorrect data (e.g.
antd info Buttonshows wrong props, missing props, or props from the wrong version) - A command's output doesn't match its documented behavior (e.g.
--format jsonreturns non-JSON,--version Xis ignored) - A command returns empty or missing data when it shouldn't (e.g.
antd demo Buttonreturns no demos,antd token Buttonreturns no tokens for v5+) - Inconsistencies between commands (e.g.
antd listshows a component butantd infosays it doesn't exist)
Workflow:
- You notice something wrong while using the CLI
- Gather evidence: the exact command you ran, what was returned, and what you expected
- Preview the bug report for the user:
antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
--description "When querying Button props for version 5.12.0, the output includes props that don't exist in that version" \
--steps "1. Run: antd info Button --version 5.12.0 --format json" \
--expected "Props matching antd 5.12.0 Button API" \
--actual "Props include 'classNames' which was added in 5.16.0" \
--format json
- Show the report to the user: "I noticed an issue with the CLI while working. Here's a bug report — shall I submit it?"
- Submit after user confirms:
antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
--description "..." \
--steps "..." \
--expected "..." \
--actual "..." \
--submit
Key principle: You are a quality feedback loop for the CLI. Don't silently work around CLI issues — report them so they get fixed. Always confirm with the user before submitting.
11. Using as MCP server
If working in an IDE that supports MCP (Claude Desktop, Cursor, etc.), the CLI can also run as an MCP server, exposing all knowledge-query tools directly:
{
"mcpServers": {
"antd": {
"command": "antd",
"args": ["mcp", "--version", "5.20.0"]
}
}
}
This provides 7 tools (antd_list, antd_info, antd_doc, antd_demo, antd_token, antd_semantic, antd_changelog) and 2 prompts (antd-expert, antd-page-generator) via MCP protocol.
Global Flags
| Flag | Purpose |
|---|---|
--format json |
Structured output — always use this |
--version <v> |
Target a specific antd version (e.g. 5.20.0) |
--lang zh |
Chinese output (default: en) |
--detail |
Include extra fields (description, since, deprecated, FAQ) |
Key Rules
- Always query before writing — Don't guess antd APIs from memory. Run
antd infofirst. - Match the user's version — If the project uses antd 4.x, pass
--version 4.24.0. The CLI auto-detects fromnode_modulesif no flag is given. - Use
--format json— Every command supports it. Parse the JSON output rather than regex-matching text output. - Check before suggesting migration — Run
antd changelog <v1> <v2>andantd migratebefore advising on version upgrades. - Lint after changes — After writing or modifying antd code, run
antd linton the changed files to catch deprecated or problematic usage. - Report antd bugs — First run
antd envto capture the full environment, then useantd bugto report. Always preview first, get user confirmation, then submit. - Auto-report CLI issues — If any
antdcommand crashes, returns wrong data, or behaves inconsistently, proactively useantd bug-clito report it. You are the quality feedback loop for the CLI — don't silently work around issues.
How to use antd on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add antd
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches antd from GitHub repository ant-design/ant-design-cli and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate antd. Access the skill through slash commands (e.g., /antd) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★35 reviews- ★★★★★Liam Desai· Dec 28, 2024
Solid pick for teams standardizing on skills: antd is focused, and the summary matches what you get after install.
- ★★★★★Alexander Menon· Dec 16, 2024
We added antd from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Liam Kapoor· Dec 16, 2024
antd fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Dhruvi Jain· Dec 12, 2024
antd is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Liam Wang· Nov 19, 2024
antd has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aditi Chawla· Nov 7, 2024
Useful defaults in antd — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Daniel White· Nov 7, 2024
antd is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Oshnikdeep· Nov 3, 2024
antd fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Aditi Martin· Oct 26, 2024
Registry listing for antd matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Li Li· Oct 26, 2024
Solid pick for teams standardizing on skills: antd is focused, and the summary matches what you get after install.
showing 1-10 of 35