Skill library

Agent skill Frontend

Antd

Build or refine reusable components for a web interface.

  • UI components

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add ant-design/antd-skill --skill antd --agent claude-code --yes

Check this file in your project.claude/skills/antd/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add ant-design/antd-skill --skill antd

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use an existing React Ant Design project and project-local `@ant-design/cli`. Read your current and intended major. The target-major modal fixture used `antd` 5.29.3. Both Ant Design Skill sources share the installed name `antd`, so verify the active publisher path.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
antd
Scenario
Migrate a v4 modal visibility prop to v5
Deliverable
One scoped migration, target-version evidence and a verified modal open and close journey.
Skill name
antd

Define a component task with an observable result

A request with an unclear outcome

Upgrade every Modal call and assume the close handler still works.

Controlled state props, static calls and close paths may need different treatment.

A workflow with observable results

  1. Read just the Modal migration steps
  2. Migrate the controlled visibility prop
  3. Verify opening, dismissal and focus return

Ant Design operation manual

Use versioned migration evidence to update one controlled modal and preserve its interaction contract.

Replace the bracketed details with your own project and target.

  1. Read just the Modal migration steps

    Use a component filter and verify the exact target package.

    Prompt · Step 1
    Use the `antd` skill from ant-design/antd-skill to inspect [legacy Modal]. Confirm the actual current and intended versions. For a v4-to-v5 change, run the project-local `antd migrate 4 5 --component Modal --format json` and read the Modal changelog for the exact version range. Separate the controlled prop change from any manual handling for static calls.
  2. Migrate the controlled visibility prop

    Connect the new prop to the same state and close handlers.

    Prompt · Step 2
    Use the ant-design/antd-skill `antd` skill to migrate [approved Modal]. Follow the `visible` to `open` result for this version path, map the existing state and cancel handler without changing the task, and inspect any adjacent static modal separately. List the changed call site and any source that is outside the current migration.
  3. Verify opening, dismissal and focus return

    Run the target build and use a real local keyboard path.

    • The migration evidence refers to the same source and target majors.
    • Open, dismiss and focus return are recorded in the local route.
    Prompt · Step 3
    Use the ant-design/antd-skill `antd` skill to validate [migrated Modal] with the project's target build. Open from [trigger], confirm content and modal title, and wait for focus to enter the opened modal. Then dismiss with Escape or the existing cancel action and inspect focus return. Attach the exact package and CLI checks plus any residual migration tasks.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

The modal stops responding to its stateReference
Command or reference
SKILL.md · Migrating between versions
Examples
Look up `visible` and `open` for the active migration pair.
A static confirmation sits beside the controlled modalReference
Command or reference
Ant Design CLI · migrate
Examples
Review the static call guidance as its own migration item.

Ant Design troubleshooting

Does the filtered command edit my React files?

The tested `migrate 4 5 --component Modal --format json` returns a change checklist. Apply and test the selected change in the project's own migration scope.