Browse Source

docs: add skill install instructions to upgrade FAQ

Users upgrading from older versions won't have the skill file,
so provide a curl command to download it from the latest template.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
pull/11801/head
afc163 6 days ago
parent
commit
f3db7eddf9
  1. 7
      docs/cheatsheet.en-US.md
  2. 7
      docs/cheatsheet.zh-CN.md

7
docs/cheatsheet.en-US.md

@ -493,7 +493,12 @@ Edit `colorPrimary` in `config/defaultSettings.ts`. Use SettingDrawer for live p
Create a file in `src/models/` exporting a custom Hook, then use `useModel('filename')` in components.
**Q: How to upgrade the project?**
Run `/pro-upgrade` in Claude Code at the project root — AI will auto-diff the latest Ant Design Pro template and upgrade your project (deps, config, code patterns, etc.). For other AI assistants, paste the content from `AGENTS.md`.
First, install the pro-upgrade skill into your project:
```bash
mkdir -p .claude/skills/pro-upgrade
curl -sL https://raw.githubusercontent.com/ant-design/ant-design-pro/master/.claude/skills/pro-upgrade/SKILL.md -o .claude/skills/pro-upgrade/SKILL.md
```
Then run `/pro-upgrade` in Claude Code at the project root — AI will auto-diff the latest template and upgrade your project (deps, config, code patterns, etc.). For other AI assistants, paste the content of `.claude/skills/pro-upgrade/SKILL.md` to them.
**Q: How to deploy?**
`npm run build` generates `dist/`. Deploy to any static file server. Set `publicPath` for non-root deployments. `npm run deploy` builds and publishes to GitHub Pages automatically (pushes to gh-pages branch).

7
docs/cheatsheet.zh-CN.md

@ -493,7 +493,12 @@ export default {
`src/models/` 下创建文件,导出自定义 Hook,组件中通过 `useModel('文件名')` 使用。
**Q: 如何升级项目?**
在项目根目录用 Claude Code 运行 `/pro-upgrade`,AI 会自动对比最新 Ant Design Pro 模板并完成升级(依赖、配置、代码模式等)。如使用其他 AI 助手,可将 `AGENTS.md` 中的内容提供给它。
先将 pro-upgrade skill 安装到项目中:
```bash
mkdir -p .claude/skills/pro-upgrade
curl -sL https://raw.githubusercontent.com/ant-design/ant-design-pro/master/.claude/skills/pro-upgrade/SKILL.md -o .claude/skills/pro-upgrade/SKILL.md
```
然后在项目根目录用 Claude Code 运行 `/pro-upgrade`,AI 会自动对比最新模板并完成升级(依赖、配置、代码模式等)。如使用其他 AI 助手,可将 `.claude/skills/pro-upgrade/SKILL.md` 中的内容提供给它。
**Q: 如何部署?**
`npm run build` 生成 `dist/` 目录,部署到任意静态服务器。配置 `publicPath` 处理非根目录部署。`npm run deploy` 会自动构建并发布到 GitHub Pages(推送到 gh-pages 分支)。

Loading…
Cancel
Save