name: gen-context category: gen command: context description: 生成项目上下文文档 triggers:
生成项目的综合上下文文档,用于快速了解项目结构。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project |
string | 是 | 项目名称 |
--output |
string | 否 | 输出路径,默认输出到终端 |
--depth |
number | 否 | 目录深度,默认 3 |
{project}/CLAUDE.md{project}/architecture.canvastree -L {depth} {project}
# {project} 项目上下文
## 基本信息
| 属性 | 值 |
|------|-----|
| 名称 | {name} |
| 类型 | {type} |
| 技术栈 | {stack} |
## 项目结构
{tree_output}
## 子项目
| 子项目 | 类型 | 说明 |
|--------|------|------|
| {subproject} | {type} | {description} |
## 核心功能
- {feature1}
- {feature2}
## API 路由 (如适用)
| 方法 | 路由 | 说明 |
|------|------|------|
| GET | /api/xxx | xxx |
## 页面路由 (如适用)
| 路由 | 页面 | 说明 |
|------|------|------|
| /xxx | xxx | xxx |
---
生成时间: {timestamp}
# 生成上下文到终端
@gen/context tg-live-game
# 保存到文件
@gen/context tg-live-game --output ./context.md
# 更深的目录结构
@gen/context tg-live-game --depth 5