Agents Markdown
安装
npx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/agents-markdownyarn dlx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/agents-markdownpnpx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/agents-markdownbunx shadcn@latest add https://ssp-ui-registry-staging.sh3.agoralab.co/r/agents-markdown文件说明
agents.md:为 Codex / Cursor 提供的统一工程规范,可根据任务选择 Lite / Standard / Advanced 版本说明。- 下载后将文件放置到仓库根目录(或代理要求的位置),必要时改名为
AGENTS.md。
在 shadcn CLI 中接入 @ssp-ui
- 打开项目根目录的
components.json,确保包含最新 shadcn schema:
{
"$schema": "https://ui.shadcn.com/schema/components.json",
"...": "..."
}- 在文件底部新增
registries配置,指向 SSP Registry:
{
"registries": [
{
"handle": "@ssp-ui",
"url": "https://ssp-ui-registry-staging.sh3.agoralab.co/r/registry.json"
}
]
}若已有其它自定义 registry,可继续追加到
registries数组中。handle决定后续npx shadcn add @ssp-ui/xxx的命名空间。
- 重新执行
npx shadcn@latest init(如需要)或直接运行:
npx shadcn@latest add @ssp-ui/agents-markdown如此即可像官方组件一样安装 @ssp-ui/biome, @ssp-ui/make-api-request, @ssp-ui/zustand 等能力模块。
最佳实践
- 选择版本
- Lite:仅做 UI/样式修复。
- Standard:常规功能开发,必须与
services/store/registry目录协同。 - Advanced:涉及 Recharts、Framer Motion 或对话式 API 的复杂场景。
- 复用 Registry 能力
@ssp-ui/biome:统一 Lint/Format。@ssp-ui/make-api-request:API 请求模板。@ssp-ui/zustand:全局状态管理。
- 交付检查
- 运行
bun lint(或bun run check)后再提交。 - 对 Codex/Cursor 说明目录结构、命名规则和禁用事项,确保执行一致。
- 运行