/t-tools:t-doc [项目或模块名]from t-tools
Generates human-readable project documentation (tutorials, guides, architecture overviews, API references) by scanning the codebase for real facts. Integrates into existing docs-web sites or falls back to docs/tutorials/.
Ships in t-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
扫描代码库,提取架构、API、配置、部署等信息,写给新人能读懂的项目教程。文档要像工程师写的,不像自动生成的 API 文档。
/t-doc [名称]不要用于 PRD、技术设计、纯 API schema 自动生成,或只改某个文档小段落的任务。
命令格式:
/t-doc [项目或模块名]
名称 必填,1-50 字符,只允许英文、数字、连字符、下划线。不合法就终止,并提示:
请提供合法的名称。例如:/t-doc my-project
输出语言跟随用户输入;用户没明确指定时默认中文。
写作前先在项目根目录判定教程目标,后续扫描、已有文档检查、写入和验证都使用同一个目标:
docs-web/,优先把教程集成到该文档站点中,不再写入 docs/tutorials/。docs-web/README.md、package.json、站点配置、内容源配置、路由和已有页面,识别真实的内容目录、文件格式、语言结构与导航方式。例如内容可能位于 docs-web/content/docs/,但不要只凭目录名硬编码。.md 或 .mdx,放进现有教程分组或文档内容层级;多语言站点按现有语言目录组织;同步更新 meta.json、sidebar、nav、索引页等导航入口,确保教程能通过 Web 页面访问和发现。docs-web/ 存在但无法从配置和现有内容确认内容源或路由规则时,列出已识别的候选位置并询问用户,不要静默回退到 docs/tutorials/。docs-web/ 时,才使用 docs/tutorials/ 和下面的 Markdown 默认结构。目标确定后检查其中是否已有对应教程。若存在,先告诉用户已有内容,询问覆盖还是增量更新。
动笔前先扫描项目。优先看这些来源:
| 来源 | 关注点 |
|---|---|
README.md | 项目定位、技术栈、运行方式 |
package.json, Cargo.toml, pyproject.toml | 依赖和版本 |
src/, app/, lib/ 入口文件 | 模块结构、路由、核心抽象 |
docs/, guides/, protocols/ | 现有文档和规范 |
docs-web/ 的配置、内容与导航文件 | 文档站内容源、格式、语言、路由和导航约定 |
docker-compose.yml, Dockerfile | 部署方式 |
.github/workflows/, .gitlab-ci.yml, Jenkinsfile | CI/CD |
.env.example, config/ | 配置项 |
| 数据库 migration 文件 | 数据模型 |
Glob 搜索要避开依赖目录。优先用明确路径,例如 .github/workflows/*.yml、Dockerfile、根目录下的 compose 文件;必须用 ** 时,用 path 限定范围,避免扫到 node_modules、vendor、.venv。
按项目规模选择扫描深度:
扫完先给用户摘要:项目一句话、关键模块、还缺什么信息。连入口文件都找不到时,先问用户再继续。
不存在 docs-web/ 时,默认写到:
docs/tutorials/
├── index.md
├── getting-started.md
├── architecture.md
├── api-reference.md
├── configuration.md
└── deployment.md
按项目实际裁剪。没有 API 层就不写 api-reference.md;部署只是 git push 的话,放在 getting-started.md 末尾即可。
存在 docs-web/ 时,章节目标相同,但输出路径、扩展名和层级跟随站点已有约定。不要强制创建 tutorials/ 子目录或 index.md;如果站点用元数据生成教程入口和顺序,就更新对应元数据。如果站点有多语言结构,只生成用户要求的语言;用户未指定且站点已有多语言版本时,先在大纲中说明准备生成哪些语言。
具体章节骨架见 references/doc-templates.md。
写作前读取 references/writing-style.md。每章写完后按其中的修订流程和自检清单检查;文件读取、事实保护、修订边界及覆盖范围报告也以该参考为准。
核心要求:
docs-web/ 的实际内容源或 docs/tutorials/。docs-web/ 时同时确认页面格式、路由、导航和验证命令。docs-web/ 时运行站点已有的类型检查或构建命令,确认页面可生成且导航可达。不要跳过大纲确认。先确认再写,避免整套文档返工。
推荐顺序:
index.mdgetting-started.mdarchitecture.mdapi-reference.md(如果需要)configuration.md(如果需要)deployment.md(如果需要)可以用 subagent 分章写;具体调用按 ${CLAUDE_PLUGIN_ROOT}/protocols/subagent-dispatch.md 执行。每个 subagent 必须拿到:
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (timzaak/web-dev-skills) — no native marketplace selected
npx claudepluginhub p/timzaak-t-tools34 skills in this plugin
/t-decisionDecide whether a feature should enter the t-tools workflow before tech research or PRD./t-designGenerate technical design documents including API design, database schema, and implementation details for a feature./t-design-checkEvaluate technical design documents for implementability, completeness, and consistency with a quantitative 100-point score./t-dreamOrganize and realign published PRDs, user stories, implementation facts, and project structure so the target project keeps a clean current context instead of accumulating stale or misleading information. Audits published docs and code only; never reads the temporary .ai/ workflow directory. Use when asked to audit documentation drift, structure drift, traceability gaps, whether PRD/code/test/demo directory organization and module boundaries are reasonable, or to get PRD governance recommendations (merge/archive/rewrite/reference fixes) as read-only report output. Use --phase <phase> to check published PRD/story versus implementation-or-demo consistency for one delivery phase at phase wrap-up./t-extension-demo-accept独立验收 Chrome 扩展真实加载后的 Playwright 用户故事演示并汇总报告;普通 Web 页面演示使用 t-web-demo-accept。/t-extension-demo-run运行单个 Chrome 扩展 Playwright 用户故事演示,诊断并修复真实加载后的集成失败;普通 Web 页面演示使用 t-web-demo-run。Other plugins' skills for the same job