定制 Slash 命令
命令文件格式和存放位置
| 平台 | 位置 | 命名规则 |
|---|---|---|
| Claude Code | .claude/commands/trellis/{name}.md | 调用方式: /{name} |
| Cursor | .cursor/commands/{name}.md | 调用方式: /{name} |
使用 /create-command 生成命令
- 命令名称
- 命令目的
- 需要读取的文件
- 执行步骤
命令设计最佳实践
好的命令结构:Analyze [AI]
Describe what to analyze…
Report
Output format…Verify [AI]
Check these items:
- All tests pass
- No TODO comments in production code
- Environment variables are set
- Database migrations are up to date
- API endpoints are documented