Appearance
安装与初始化
环境要求
| 依赖 | 说明 |
|---|---|
| AI 编程工具 | Claude Code / Cursor / Codex / OpenCode / OpenClaw 任选其一 |
| Git | 版本管理(推荐) |
一行命令安装
macOS / Linux
bash
curl -fsSL https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/init.sh | bashWindows(PowerShell)
powershell
powershell -c "irm https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/install.ps1 | iex"就这一行,装完就能用。
安装参数
macOS / Linux
bash
# 指定 AI 工具(默认自动检测)
curl -fsSL ... | bash -s -- --tool cursor
# 多项目工作区模式
curl -fsSL ... | bash -s -- --workspace
# 指定安装目录
curl -fsSL ... | bash -s -- --dir ./myapp
# 组合
curl -fsSL ... | bash -s -- --tool claude --tool cursor --workspaceWindows(PowerShell)
powershell
# 指定 AI 工具
powershell -c "irm https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/install.ps1 | iex; SillySpec-Install -Tool cursor"
# 工作区模式
powershell -c "irm https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/install.ps1 | iex; SillySpec-Install -Workspace"
# 指定安装目录
powershell -c "irm https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/install.ps1 | iex; SillySpec-Install -Dir D:\myproject"
# 组合
powershell -c "irm https://raw.githubusercontent.com/q512426816/sillyspec/main/scripts/install.ps1 | iex; SillySpec-Install -Tool claude -Tool cursor -Workspace"
# 查看帮助
SillySpec-Install -Help参数对照表
| 参数 | macOS/Linux | Windows | 说明 |
|---|---|---|---|
| 指定工具 | --tool <name> | -Tool <name> | claude / claude_skills / cursor / codex / opencode / openclaw |
| 工作区模式 | --workspace / -w | -Workspace | 前后端分离、多仓库场景 |
| 安装目录 | --dir <path> / -d <path> | -Dir <path> | 默认当前目录 |
| 帮助 | --help | -Help | 显示用法 |
支持的 AI 工具
安装脚本会自动检测你项目中用了哪个 AI 工具(扫描 .claude/、.cursor/ 等目录),只生成对应格式。什么都没检测到就默认装 Claude Code。
| 工具 | 参数 | 生成位置 | 触发方式 |
|---|---|---|---|
| Claude Code | claude(默认) | .claude/commands/sillyspec/ | /sillyspec:xxx |
| Claude Code Skills | claude_skills | .claude/skills/sillyspec-xxx/ | AI 自动触发 |
| Cursor | cursor | .cursor/commands/ | /sillyspec-xxx |
| Codex | codex | ~/.agents/skills/ | AI 自动触发 |
| OpenCode | opencode | .opencode/skills/ | AI 自动触发 |
| OpenClaw | openclaw | .openclaw/skills/ | AI 自动触发 |
更多工具支持正在开发中(Windsurf、Copilot、Cline)。详见多工具支持。
安装完的样子
普通模式:
your-project/
├── .claude/commands/sillyspec/ # 命令文件(Claude Code)
├── .sillyspec/ # 项目数据
│ ├── codebase/ # 扫描文档(棕地)
│ ├── specs/ # 设计文档
│ ├── plans/ # 实现计划
│ └── changes/ # 变更管理
└── ~/.sillyspec/templates/ # 全局模板库(规范复用)工作区模式(-Workspace):
your-project/
├── .claude/commands/sillyspec/
├── .sillyspec/
│ ├── config.yaml # 🔑 工作区配置(子项目声明)
│ ├── shared/ # 跨项目共享规范
│ └── workspace/ # 工作区汇总文档
├── frontend/ # 前端项目
│ └── .sillyspec/codebase/ # 各自的扫描文档
├── backend/ # 后端项目
│ └── .sillyspec/codebase/
└── ~/.sillyspec/templates/安装后用 /sillyspec:workspace add 添加子项目。
验证安装
装完后重新打开终端,启动你的 AI 工具:
- Claude Code:输入
/sillyspec:看自动补全 - Cursor:输入
/sillyspec-看自动补全 - 其他工具:直接说"扫描一下这个项目",AI 应该会自动触发
也可以直接检查文件:
bash
# macOS/Linux
ls .claude/commands/sillyspec/
# Windows PowerShell
ls .claude\commands\sillyspec\推荐启动方式
Claude Code 建议使用跳过权限模式,避免频繁批准:
bash
claude --dangerously-skip-permissions校验脚本
SillySpec 自带校验脚本,验证 AI 的输出质量:
| 脚本 | 校验内容 |
|---|---|
validate-scan.sh | 7 份扫描文档是否齐全 |
validate-proposal.sh | propose 阶段文件格式 |
validate-plan.sh | 计划完整性 |
validate-all.sh | 一键综合校验 |
bash
bash scripts/validate-all.sh