[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BV9R3QESHZZTXR0ZCPXET":3,"skill-same:01M75BV9R3QESHZZTXR0ZCPXET":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M75BV9R3QESHZZTXR0ZCPXET","codebase-analyzer",null,"Investigate an unfamiliar project or codebase and explain its purpose, architecture, and implementation in a structured Chinese report.","RollRollRoll\u002Fagent-toolkit","RollRollRoll","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15213243?v=4","01M75BTX9MEYV2TFZ65FRKG3H7","kgfan","01M75BTXAE7M0DQ4EPDF12BZHN",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: codebase-analyzer\ndescription: Investigate an unfamiliar project or codebase and explain its purpose, architecture, and implementation in a structured Chinese report.\n---\n\n# Codebase Analyzer: Project Investigation\n\n## Goal\n\nInvestigate the software project the user names (or the one in the current working directory) and produce a **structured investigation report written in Chinese**. The target reader is\nan engineer who \"doesn't know the project but needs to build a complete mental model quickly\". The report must answer two questions:\n\n1. **What it does**: project positioning, core features, users, and value.\n2. **How it is implemented**: architecture, tech stack, key paths, how it runs.\n\n**Pick the report's level of detail from \"Output depth\" below**; do not apply the full template in every case.\n\n## Output depth (pick a tier first, then investigate)\n\nDifferent requests need different report depths. Pick the right tier before starting, so a request for a quick look does not get a long report.\n**Read only the one output template that matches the tier** (the shared investigation-checklist \u002F project-type-checklists are still read as needed):\n\n- **Quick overview (light)**: half a screen to one screen: a one-sentence definition + tech stack + directory map + a short description of one core flow.\n  Fits \"take a quick look \u002F brief intro \u002F roughly what is it\". Template: [template-quick.md](references\u002Ftemplate-quick.md)\n- **Standard investigation (default)**: builds a complete mental model without padding: 9 main sections; conditional sections that don't apply get one line.\n  Template: [template-standard.md](references\u002Ftemplate-standard.md)\n- **Deep report (heavy)**: strictly and fully covers all 10 chapters + appendix, nothing skipped. Fits \"full report \u002F detailed investigation \u002F comprehensive analysis \u002F deliverable document\".\n  Template: [template-deep.md](references\u002Ftemplate-deep.md)\n\n**Tier rules**:\n\n- The user explicitly wants a \"full \u002F detailed \u002F comprehensive\" report → deep report; says \"quick \u002F brief \u002F roughly \u002F skim\" → quick overview.\n- **When nothing is stated, default to standard investigation**: neither shallow nor overloaded.\n- When unsure, produce the standard investigation first, and end with one sentence telling the user \"需要更深可展开为深度报告，需要更轻可只看快速概览\" (it can be expanded into a deep report, or cut down to the quick overview).\n\n> Project size and output depth are **independent**: a large project can still get just a quick overview. The \"Workflow\" below is described for **standard investigation \u002F deep report**;\n> when quick overview is chosen, just do the step 1 collection + output per template-quick, and trim steps 2-3 as needed.\n\n## Investigation principles\n\nThese four apply to every step, not to any single step:\n\n1. **Conclusions need source-code evidence that can be checked**: tie every important conclusion to a **specific source path (with line number)** where possible,\n   e.g. \"this is the entry point\" or \"this path writes to the database\" followed by `path:line`, so the user can jump to the source and verify.\n   **Never assert a feature from the project name or README**: for a capability the README claims, find its implementation in the source before confirming it;\n   if you cannot find it, treat it as \"声称但未在源码验证\" (claimed but not verified in source). A conclusion without evidence must say explicitly \"不确定 \u002F 未在源码确认\" (uncertain \u002F not confirmed in source).\n2. **\"Not applicable\" ≠ \"not figured out\"**: a simple CLI with no authentication is \"不适用（原因：本项目不涉及用户身份）\" (not applicable, reason: the project has no user identity),\n   not \"didn't figure out where auth is\". The first is a firm conclusion, the second is a blind spot; mixing them misleads the reader.\n   Put all blind spots in the `未搞清楚的部分 \u002F 假设 \u002F 已知问题` section (unclear parts \u002F assumptions \u002F known issues: chapter 9 in the standard tier, chapter 10 in the deep tier; the quick tier has no such section, so one line \"未搞清楚 X\" is enough); do not fill unknowns with plausible guesses. When a conditional section doesn't apply, write one line\n   \"不适用（原因）\" (not applicable, with reason); no need for forced subheadings and placeholder content.\n3. **Top-down, not file-by-file**: grasp the big picture first (README \u002F entry point \u002F config \u002F dependencies \u002F directories), then go into the implementation.\n   **Skipped by default and not scanned**: `.git`, `node_modules`, `.venv` \u002F `venv`, `dist`, `build`, `out`, `target`,\n   `coverage`, `__pycache__`, `.next` \u002F `.nuxt` and other build output, plus code-generation directories (`generated\u002F`, `*.pb.go`,\n   `*_pb2.py`). Large lock \u002F bundle files (`package-lock.json`, `yarn.lock`, `*.min.js`) are **not read by default**;\n   look at the relevant entries only when you need to confirm a dependency version.\n4. **Read sensitive config minimally; the report must not leak credentials**: by default **do not read the contents of real environment files or suspected credential files**:\n   `.env`, `.env.*` (except `.env.example` \u002F `.env.sample`), `secrets.*`, `credentials.*`, `.npmrc`,\n   `.pypirc`, `.netrc`, `*.key`, `*.pem`, and cloud provider credential files; also do not run commands that dump the environment, such as `env` \u002F `printenv`.\n   When you need to judge whether something was committed by mistake, check only the file name, tracking status, and ignore rules. For config, read only example files and the config-loading code;\n   even in an example file, if you hit what looks like a real token \u002F password \u002F key, stop expanding it and mark it sensitive. When reporting environment variables, write only\n   **variable name, purpose, whether required, and where it is loaded**; do not copy values from the running environment. Write every credential default as `[已脱敏]` (redacted).\n   This rule also applies to subagent briefs, intermediate progress, code snippets, and the final report written to disk.\n\n## Workflow\n\n### Step 0: Confirm the target and the output-depth tier\n\nFirst confirm the directory path to investigate. If the user did not give one, default to the current working directory. If the current directory is empty or clearly not a code project,\nstop and ask the user. Also **settle the tier** per \"Output depth\"; this decides which template file step 4 reads. If the user didn't say, default to **standard investigation**.\n\n### Step 1: Top-down information gathering\n\nSkim quickly in this order:\n\n| Order | What to look at | What it tells you |\n|---|---|---|\n| ① | Root `ls`, `README*`, `docs\u002F`, `CHANGELOG*` | What the project is, who it is for, how to use it |\n| ② | Dependency manifests: `package.json` \u002F `pyproject.toml` \u002F `requirements*.txt` \u002F `go.mod` \u002F `pom.xml` \u002F `Cargo.toml` \u002F `build.gradle` \u002F `composer.json` etc. | Language, framework, key third-party libraries |\n| ③ | Config \u002F deployment: `.env.example` \u002F `.env.sample`, `config.example.*`, config-loading code, `Dockerfile*`, `docker-compose*`, `Makefile`, `.github\u002F`, `k8s\u002F`, `helm\u002F`, `terraform\u002F` | Variable names and where they load from, deployment method, CI\u002FCD; skip the contents of real `.env` and suspected credential files |\n| ④ | Program entry: `main.*`, `index.*`, `app.*`, `cmd\u002F`, `bin\u002F`, `manage.py`, framework-convention entry points (e.g. Spring's `@SpringBootApplication`, Next.js `pages\u002F` `app\u002F`) | Where execution starts |\n| ⑤ | Top-level directory structure | Module breakdown |\n| ⑥ | Data models: `models\u002F`, `entities\u002F`, `schema.*`, `migrations\u002F`, ORM definitions | Core entities and relationships |\n| ⑦ | External interfaces: route tables, controllers, API definition files (OpenAPI \u002F proto \u002F GraphQL schema) | Exposed capabilities |\n| ⑧ | Test directories, CI config | Engineering practice |\n\nFor most modules, **looking at the entry point, directory index, and key class names** is enough; read source in depth only when tracing an end-to-end flow.\n\n### Step 2: Identify the project type and add type-specific analysis\n\nJudge the project type from the dependencies, entry points, and directory structure gathered in step 1 (**go by evidence, not by names**), and add the analysis from the matching section of\n[project-type-checklists.md](references\u002Fproject-type-checklists.md). Common types:\n**CLI project**, **Web service**, **Library \u002F SDK**, **Agent project**, **MCP Server**, **DevTool \u002F Workflow tool**,\n**Agent coding tool plugin \u002F extension (Claude Code \u002F Codex)**.\n\n- A project can match several types at once (e.g. \"Web service + ops CLI\"). Do a separate type-specific analysis for each match, and give the evidence for each.\n- If no clear type fits, write \"未匹配到专项类型\" (no specific type matched) and do only the general investigation; do not force a fit.\n\n### Step 3: Pick 1-2 end-to-end flows and trace them fully\n\nPick the flows that best represent the project's core value (a typical HTTP request, the most central CLI command, one run of a scheduled job, one message-consumption pipeline).\n**Trace representative flows, not all of them**; mention minor flows in one sentence. Start at the **entry point** and follow the call chain to the **final output \u002F side effect**\n(response, database write, file write, message sent), recording each hop: which file \u002F function it passes (with path), key transformations \u002F decision points,\nhow the data shape changes, and at which step external dependencies are called.\n\nThis is the **most information-dense** section of the report; from it alone the reader should understand how the project's main logic runs.\n\n### Step 4: Organize output with the template for the chosen tier\n\n**Read and fill the template for the tier chosen in step 0**. The three templates are independent; do not mix them:\n\n- **Quick overview** → [template-quick.md](references\u002Ftemplate-quick.md): half a screen to one screen.\n- **Standard investigation (default)** → [template-standard.md](references\u002Ftemplate-standard.md): 9 main sections;\n  conditional sections that don't apply get one line, no padding to fill them.\n- **Deep report** → [template-deep.md](references\u002Ftemplate-deep.md): strictly cover all 10 chapters + appendix.\n  Keep every chapter heading; when a chapter has no content write \"未搞清楚 \u002F 不适用（原因）\" (not figured out \u002F not applicable, with reason); skip nothing.\n\nAll three tiers follow the same investigation discipline; they differ only in **coverage and level of detail**. For the specific questions to ask when investigating each section, see\n[investigation-checklist.md](references\u002Finvestigation-checklist.md). Write the type-specific analysis from step 2 into the template's\n\"项目类型专项分析\" (project-type analysis) section (the quick overview tier can omit it).\n\n### Large projects: phases and parallelism (enable as needed)\n\nRough indicators of \"large\": more than 500 source files, more than 10 top-level modules, or a report too long to write in one output.\nWhen any of these holds **and the user wants the standard or deep tier** (for a quick overview, just produce it; no phases needed):\n\n1. **First output only \"global overview + directory map\"**, and tell the user \"项目较大，我先给出全局概览和目录地图，\n   然后按模块逐个深入，你可以在任何时候打断或调整顺序\" (the project is large; I'll give the overview and directory map first, then go module by module, and you can interrupt or reorder at any time). This interim overview is **not bound by any template's completeness rules**.\n2. **Investigate modules in parallel**: when the environment provides a subagent tool (Claude Code: `Agent` + `subagent_type=Explore`;\n   Codex: a read-only `explorer` or equivalent agent thread), send \"investigate module X\" out as a separate task.\n   **If the tool is not available, fall back to sequential investigation and state \"未启用并行\" (parallelism not enabled) in the report.**\n3. **Aggregate**: after the subagents return, assemble everything yourself per the template, removing conflicts \u002F duplication \u002F inconsistencies between modules; the level of detail follows the chosen tier.\n   The deep tier can also **draft report chapters in parallel** (descriptive chapters go to subagents, the core-logic chapters the main agent writes itself) to cut wall-clock writing time.\n\nSplitting rules, task-brief template, output pacing, and two variants are in [parallel-strategy.md](references\u002Fparallel-strategy.md).\n\n### Step 5: Self-check\n\nBefore output, check \"common items + items for the chosen tier\". Use only the current tier's list, so a quick overview is not expanded to deep-report standards,\nand does not grow into an unnecessarily long report.\n\n**Common items (all three tiers)**:\n\n- [ ] Is the tier right? (Default standard investigation; deep report only when the user wants \"full\", overview when they want \"quick\")\n- [ ] Are all four investigation principles kept? (Conclusions carry `path:line`; no guessing from names \u002F README; \"not applicable\" vs \"not figured out\" kept apart;\n      no real `.env` or credential files read; no real values \u002F tokens \u002F passwords \u002F keys in the report or intermediate output)\n- [ ] Is the whole report in Chinese?\n- [ ] Did you ask about the destination before output? (terminal \u002F file \u002F both) When \"file \u002F both\" was chosen, did you handle an existing file with the same name?\n\n**🟢 Quick overview tier**:\n\n- [ ] Is it kept to half a screen to one screen? Did it accidentally grow into a standard report?\n- [ ] Are the one-sentence definition + tech stack + trimmed directory map + **a short description of one core flow** all there?\n      (A short description, not hop by hop; type-specific analysis and overall assessment are **not needed**)\n\n**🟡 Standard investigation tier**:\n\n- [ ] Can the reader grasp the big picture from a glance at the one-page overview?\n- [ ] Is there a \"## 目录\" table of contents at the start of the report (before the one-page overview)? Do its entries match the real ## section headings one to one, and do the links jump?\n      (This is the TOC, not the same thing as the \"directory map\" in chapter 4)\n- [ ] Does the directory map \"highlight what matters\" rather than list everything?\n- [ ] Are there 1-2 end-to-end flows, with a file path for each hop?\n- [ ] Was the project type identified and type-specific analysis done? (Write \"未匹配\" if none matched.) Is the overall assessment (including project highlights) given?\n- [ ] Are uncertain points listed separately in the \"not figured out\" section, and kept apart from \"not applicable\"?\n\n**🔴 Deep report tier**:\n\n- [ ] Are all template chapters present with no headings dropped? Do empty chapters say \"未搞清楚 \u002F 不适用（原因）\"?\n- [ ] Are all standard-tier checks also met? (The deep tier is a superset of the standard tier)\n- [ ] Are the deep-tier-only chapters (config \u002F environment variables, observability, security) filled in or marked not applicable?\n- [ ] Does the overall assessment chapter (chapter 9) give **project highlights**, each tied to `path:line` (not a generic \"clear architecture\")?\n- [ ] If it matches **DevTool \u002F Workflow tool**: did you **exhaustively cover all work scenarios** as \"intent → entry point → flow\"?\n- [ ] If it matches **Agent coding tool plugin \u002F extension**: did you separate Claude Code \u002F Codex signals, **profile each item, and draw an overall assembly diagram**?\n      With many items, did you use parallelism (or note it was not enabled)?\n- [ ] If **parallel drafting by report chapter** was used: did you aggregate chapter by chapter \u002F unify terms \u002F **check consistency across chapters**?\n      Did the one-page overview come out first, and were chapters pushed as they became ready? With no subagent tool or a small project, did you fall back to serial and note it?\n\n### Step 6: Ask for the output destination\n\nAfter the report is produced in the conversation and the step 5 self-check passes, **do not paste the full text yet**; ask the user where they want the report.\nBy default **do not write to disk automatically**; act on the user's choice.\n\n- **How to ask**: when the environment provides an interactive choice tool, use it (e.g. Claude Code's AskUserQuestion or the user-input capability\n  exposed by the current Codex session); if not available, ask in plain text and have the user reply with one option.\n  - **Terminal**: output the full report in the conversation, do not write a file.\n  - **File**: write it to a file; in the conversation only state the saved path and include the report's one-page overview, without repeating the full text.\n  - **Both**: output the full report in the conversation, **and** write it to a file.\n- **Where the one-page overview comes from** (the part left in the terminal when \"file\" is chosen): for the standard \u002F deep tiers, take the report's `## 一页纸概览` section directly;\n  the quick overview tier has no such section, so take the two or three lines of its `## 一句话定义` (one-sentence definition) and `## 核心价值` (core value) sections.\n- **Write details when \"file\" or \"both\" is chosen**: write the **original text** of the report just produced (Chinese, Markdown) to the file.\n  - **Default location**: the root of the investigated project.\n  - **Default file name**: `\u003C项目名>-调研报告-\u003CYYYYMMDD>.md` (`\u003C项目名>` is the project name, taken from the investigated directory name),\n    e.g. `codebase-analyzer-调研报告-20260603.md`. If the user gives a path \u002F file name, use theirs.\n  - If **a file with the same name already exists** before writing, ask the user to confirm overwrite or rename; do not overwrite silently.\n  - Write exactly the report from the conversation; do not trim or expand it for the file.\n- **No second question after the choice**: \"terminal\" means output in the conversation only, no file; a user who wants both a file and the full text in the terminal should choose \"both\" up front.\n- **When a large project is produced in phases**: ask about the destination only after all modules \u002F chapters are aggregated into the complete report; what gets saved is the final complete version,\n  not the interim overview. During streaming, push only progress + summaries to the terminal; do not paste each interim draft to the terminal.\n\n## Output format rules\n\n- **The whole report must be in Chinese** (including comments in code snippets; original code stays unchanged).\n- Section order **follows the chosen tier's template**; the interim overview in phase 1 of a large project is not bound by the template.\n- Wrap file paths in backticks, e.g. `src\u002Fserver\u002Frouter.ts:42`.\n- Use fenced code blocks with a language tag for code snippets.\n- **Use tables** for structured comparison data (module responsibilities, environment variables, external interfaces, external systems, etc.): this multi-column data that needs alignment\n  is what tables are for. Do **not** put narrative text, long explanations, or connected reasoning in tables; lists or paragraphs read better.\n- The environment variable table lists only variable name, purpose, whether required, and where it is loaded; do not read or copy real values to fill it.\n- Use **bold** for emphasis; avoid long stretches of italics.\n- **No ornamental prose**: when a plain statement exists, use it; do not replace statements with metaphors or flowery wording.\n  Write \"一个值得调整的参数\", not \"一个值得转动的旋钮\"; write \"这一点依然重要\", not \"这一点依然有一席之地\".\n  Such sentences show off the writer instead of conveying a point; metaphors also bring associations the writer didn't choose and can't control, and the reader has to work harder to decode them.\n\n## Common mistakes\n\n- \"这个项目大概是一个 web 应用，应该用了 Express。\": guessing without looking at the dependency files.\n- Reading every file before starting to write the report: wastes context and likely loses the big picture.\n- \"认证相关的逻辑在 auth 模块里。\": no path given, so the reader cannot check it.\n- The end-to-end flow only says \"request comes in, gets processed, returns\": not traced to specific files \u002F functions.\n- Writing a firm conclusion like \"本项目不涉及用户身份\" as \"没搞清楚认证在哪\": treating not-applicable as a blind spot.\n- Outputting a giant report directly without giving an overview first.\n- Writing in English, or mixing Chinese and English.\n- \"认证模块是整个系统的心脏。\": a metaphor instead of a statement; write \"所有请求都先经过认证模块\".\n- Reading real `.env` \u002F private keys \u002F credential files to complete the config section, or writing tokens, passwords, keys, or sensitive defaults into the report.\n- Flooding the terminal with the whole report without asking about the destination, or writing the report into the project directory without permission.\n","# Codebase Analyzer: Project Investigation\n\n## Goal\n\nInvestigate the software project the user names (or the one in the current working directory) and produce a **structured investigation report written in Chinese**. The target reader is\nan engineer who \"doesn't know the project but needs to build a complete mental model quickly\". The report must answer two questions:\n\n1. **What it does**: project positioning, core features, users, and value.\n2. **How it is implemented**: architecture, tech stack, key paths, how it runs.\n\n**Pick the report's level of detail from \"Output depth\" below**; do not apply the full template in every case.\n\n## Output depth (pick a tier first, then investigate)\n\nDifferent requests need different report depths. Pick the right tier before starting, so a request for a quick look does not get a long report.\n**Read only the one output template that matches the tier** (the shared investigation-checklist \u002F project-type-checklists are still read as needed):\n\n- **Quick overview (light)**: half a screen to one screen: a one-sentence definition + tech stack + directory map + a short description of one core flow.\n  Fits \"take a quick look \u002F brief intro \u002F roughly what is it\". Template: [template-quick.md](references\u002Ftemplate-quick.md)\n- **Standard investigation (default)**: builds a complete mental model without padding: 9 main sections; conditional sections that don't apply get one line.\n  Template: [template-standard.md](references\u002Ftemplate-standard.md)\n- **Deep report (heavy)**: strictly and fully covers all 10 chapters + appendix, nothing skipped. Fits \"full report \u002F detailed investigation \u002F comprehensive analysis \u002F deliverable document\".\n  Template: [template-deep.md](references\u002Ftemplate-deep.md)\n\n**Tier rules**:\n\n- The user explicitly wants a \"full \u002F detailed \u002F comprehensive\" report → deep report; says \"quick \u002F brief \u002F roughly \u002F skim\" → quick overview.\n- **When nothing is stated, default to standard investigation**: neither shallow nor overloaded.\n- When unsure, produce the standard investigation first, and end with one sentence telling the user \"需要更深可展开为深度报告，需要更轻可只看快速概览\" (it can be expanded into a deep report, or cut down to the quick overview).\n\n> Project size and output depth are **independent**: a large project can still get just a quick overview. The \"Workflow\" below is described for **standard investigation \u002F deep report**;\n> when quick overview is chosen, just do the step 1 collection + output per template-quick, and trim steps 2-3 as needed.\n\n## Investigation principles\n\nThese four apply to every step, not to any single step:\n\n1. **Conclusions need source-code evidence that can be checked**: tie every important conclusion to a **specific source path (with line number)** where possible,\n   e.g. \"this is the entry point\" or \"this path writes to the database\" followed by `path:line`, so the user can jump to the source and verify.\n   **Never assert a feature from the project name or README**: for a capability the README claims, find its implementation in the source before confirming it;\n   if you cannot find it, treat it as \"声称但未在源码验证\" (claimed but not verified in source). A conclusion without evidence must say explicitly \"不确定 \u002F 未在源码确认\" (uncertain \u002F not confirmed in source).\n2. **\"Not applicable\" ≠ \"not figured out\"**: a simple CLI with no authentication is \"不适用（原因：本项目不涉及用户身份）\" (not applicable, reason: the project has no user identity),\n   not \"didn't figure out where auth is\". The first is a firm conclusion, the second is a blind spot; mixing them misleads the reader.\n   Put all blind spots in the `未搞清楚的部分 \u002F 假设 \u002F 已知问题` section (unclear parts \u002F assumptions \u002F known issues: chapter 9 in the standard tier, chapter 10 in the deep tier; the quick tier has no such section, so one line \"未搞清楚 X\" is enough); do not fill unknowns with plausible guesses. When a conditional section doesn't apply, write one line\n   \"不适用（原因）\" (not applicable, with reason); no need for forced subheadings and placeholder content.\n3. **Top-down, not file-by-file**: grasp the big picture first (README \u002F entry point \u002F config \u002F dependencies \u002F directories), then go into the implementation.\n   **Skipped by default and not scanned**: `.git`, `node_modules`, `.venv` \u002F `venv`, `dist`, `build`, `out`, `target`,\n   `coverage`, `__pycache__`, `.next` \u002F `.nuxt` and other build output, plus code-generation directories (`generated\u002F`, `*.pb.go`,\n   `*_pb2.py`). Large lock \u002F bundle files (`package-lock.json`, `yarn.lock`, `*.min.js`) are **not read by default**;\n   look at the relevant entries only when you need to confirm a dependency version.\n4. **Read sensitive config minimally; the report must not leak credentials**: by default **do not read the contents of real environment files or suspected credential files**:\n   `.env`, `.env.*` (except `.env.example` \u002F `.env.sample`), `secrets.*`, `credentials.*`, `.npmrc`,\n   `.pypirc`, `.netrc`, `*.key`, `*.pem`, and cloud provider credential files; also do not run commands that dump the environment, such as `env` \u002F `printenv`.\n   When you need to judge whether something was committed by mistake, check only the file name, tracking status, and ignore rules. For config, read only example files and the config-loading code;\n   even in an example file, if you hit what looks like a real token \u002F password \u002F key, stop expanding it and mark it sensitive. When reporting environment variables, write only\n   **variable name, purpose, whether required, and where it is loaded**; do not copy values from the running environment. Write every credential default as `[已脱敏]` (redacted).\n   This rule also applies to subagent briefs, intermediate progress, code snippets, and the final report written to disk.\n\n## Workflow\n\n### Step 0: Confirm the target and the output-depth tier\n\nFirst confirm the directory path to investigate. If the user did not give one, default to the current working directory. If the current directory is empty or clearly not a code project,\nstop and ask the user. Also **settle the tier** per \"Output depth\"; this decides which template file step 4 reads. If the user didn't say, default to **standard investigation**.\n\n### Step 1: Top-down information gathering\n\nSkim quickly in this order:\n\n| Order | What to look at | What it tells you |\n|---|---|---|\n| ① | Root `ls`, `README*`, `docs\u002F`, `CHANGELOG*` | What the project is, who it is for, how to use it |\n| ② | Dependency manifests: `package.json` \u002F `pyproject.toml` \u002F `requirements*.txt` \u002F `go.mod` \u002F `pom.xml` \u002F `Cargo.toml` \u002F `build.gradle` \u002F `composer.json` etc. | Language, framework, key third-party libraries |\n| ③ | Config \u002F deployment: `.env.example` \u002F `.env.sample`, `config.example.*`, config-loading code, `Dockerfile*`, `docker-compose*`, `Makefile`, `.github\u002F`, `k8s\u002F`, `helm\u002F`, `terraform\u002F` | Variable names and where they load from, deployment method, CI\u002FCD; skip the contents of real `.env` and suspected credential files |\n| ④ | Program entry: `main.*`, `index.*`, `app.*`, `cmd\u002F`, `bin\u002F`, `manage.py`, framework-convention entry points (e.g. Spring's `@SpringBootApplication`, Next.js `pages\u002F` `app\u002F`) | Where execution starts |\n| ⑤ | Top-level directory structure | Module breakdown |\n| ⑥ | Data models: `models\u002F`, `entities\u002F`, `schema.*`, `migrations\u002F`, ORM definitions | Core entities and relationships |\n| ⑦ | External interfaces: route tables, controllers, API definition files (OpenAPI \u002F proto \u002F GraphQL schema) | Exposed capabilities |\n| ⑧ | Test directories, CI config | Engineering practice |\n\nFor most modules, **looking at the entry point, directory index, and key class names** is enough; read source in depth only when tracing an end-to-end flow.\n\n### Step 2: Identify the project type and add type-specific analysis\n\nJudge the project type from the dependencies, entry points, and directory structure gathered in step 1 (**go by evidence, not by names**), and add the analysis from the matching section of\n[project-type-checklists.md](references\u002Fproject-type-checklists.md). Common types:\n**CLI project**, **Web service**, **Library \u002F SDK**, **Agent project**, **MCP Server**, **DevTool \u002F Workflow tool**,\n**Agent coding tool plugin \u002F extension (Claude Code \u002F Codex)**.\n\n- A project can match several types at once (e.g. \"Web service + ops CLI\"). Do a separate type-specific analysis for each match, and give the evidence for each.\n- If no clear type fits, write \"未匹配到专项类型\" (no specific type matched) and do only the general investigation; do not force a fit.\n\n### Step 3: Pick 1-2 end-to-end flows and trace them fully\n\nPick the flows that best represent the project's core value (a typical HTTP request, the most central CLI command, one run of a scheduled job, one message-consumption pipeline).\n**Trace representative flows, not all of them**; mention minor flows in one sentence. Start at the **entry point** and follow the call chain to the **final output \u002F side effect**\n(response, database write, file write, message sent), recording each hop: which file \u002F function it passes (with path), key transformations \u002F decision points,\nhow the data shape changes, and at which step external dependencies are called.\n\nThis is the **most information-dense** section of the report; from it alone the reader should understand how the project's main logic runs.\n\n### Step 4: Organize output with the template for the chosen tier\n\n**Read and fill the template for the tier chosen in step 0**. The three templates are independent; do not mix them:\n\n- **Quick overview** → [template-quick.md](references\u002Ftemplate-quick.md): half a screen to one screen.\n- **Standard investigation (default)** → [template-standard.md](references\u002Ftemplate-standard.md): 9 main sections;\n  conditional sections that don't apply get one line, no padding to fill them.\n- **Deep report** → [template-deep.md](references\u002Ftemplate-deep.md): strictly cover all 10 chapters + appendix.\n  Keep every chapter heading; when a chapter has no content write \"未搞清楚 \u002F 不适用（原因）\" (not figured out \u002F not applicable, with reason); skip nothing.\n\nAll three tiers follow the same investigation discipline; they differ only in **coverage and level of detail**. For the specific questions to ask when investigating each section, see\n[investigation-checklist.md](references\u002Finvestigation-checklist.md). Write the type-specific analysis from step 2 into the template's\n\"项目类型专项分析\" (project-type analysis) section (the quick overview tier can omit it).\n\n### Large projects: phases and parallelism (enable as needed)\n\nRough indicators of \"large\": more than 500 source files, more than 10 top-level modules, or a report too long to write in one output.\nWhen any of these holds **and the user wants the standard or deep tier** (for a quick overview, just produce it; no phases needed):\n\n1. **First output only \"global overview + directory map\"**, and tell the user \"项目较大，我先给出全局概览和目录地图，\n   然后按模块逐个深入，你可以在任何时候打断或调整顺序\" (the project is large; I'll give the overview and directory map first, then go module by module, and you can interrupt or reorder at any time). This interim overview is **not bound by any template's completeness rules**.\n2. **Investigate modules in parallel**: when the environment provides a subagent tool (Claude Code: `Agent` + `subagent_type=Explore`;\n   Codex: a read-only `explorer` or equivalent agent thread), send \"investigate module X\" out as a separate task.\n   **If the tool is not available, fall back to sequential investigation and state \"未启用并行\" (parallelism not enabled) in the report.**\n3. **Aggregate**: after the subagents return, assemble everything yourself per the template, removing conflicts \u002F duplication \u002F inconsistencies between modules; the level of detail follows the chosen tier.\n   The deep tier can also **draft report chapters in parallel** (descriptive chapters go to subagents, the core-logic chapters the main agent writes itself) to cut wall-clock writing time.\n\nSplitting rules, task-brief template, output pacing, and two variants are in [parallel-strategy.md](references\u002Fparallel-strategy.md).\n\n### Step 5: Self-check\n\nBefore output, check \"common items + items for the chosen tier\". Use only the current tier's list, so a quick overview is not expanded to deep-report standards,\nand does not grow into an unnecessarily long report.\n\n**Common items (all three tiers)**:\n\n- [ ] Is the tier right? (Default standard investigation; deep report only when the user wants \"full\", overview when they want \"quick\")\n- [ ] Are all four investigation principles kept? (Conclusions carry `path:line`; no guessing from names \u002F README; \"not applicable\" vs \"not figured out\" kept apart;\n      no real `.env` or credential files read; no real values \u002F tokens \u002F passwords \u002F keys in the report or intermediate output)\n- [ ] Is the whole report in Chinese?\n- [ ] Did you ask about the destination before output? (terminal \u002F file \u002F both) When \"file \u002F both\" was chosen, did you handle an existing file with the same name?\n\n**🟢 Quick overview tier**:\n\n- [ ] Is it kept to half a screen to one screen? Did it accidentally grow into a standard report?\n- [ ] Are the one-sentence definition + tech stack + trimmed directory map + **a short description of one core flow** all there?\n      (A short description, not hop by hop; type-specific analysis and overall assessment are **not needed**)\n\n**🟡 Standard investigation tier**:\n\n- [ ] Can the reader grasp the big picture from a glance at the one-page overview?\n- [ ] Is there a \"## 目录\" table of contents at the start of the report (before the one-page overview)? Do its entries match the real ## section headings one to one, and do the links jump?\n      (This is the TOC, not the same thing as the \"directory map\" in chapter 4)\n- [ ] Does the directory map \"highlight what matters\" rather than list everything?\n- [ ] Are there 1-2 end-to-end flows, with a file path for each hop?\n- [ ] Was the project type identified and type-specific analysis done? (Write \"未匹配\" if none matched.) Is the overall assessment (including project highlights) given?\n- [ ] Are uncertain points listed separately in the \"not figured out\" section, and kept apart from \"not applicable\"?\n\n**🔴 Deep report tier**:\n\n- [ ] Are all template chapters present with no headings dropped? Do empty chapters say \"未搞清楚 \u002F 不适用（原因）\"?\n- [ ] Are all standard-tier checks also met? (The deep tier is a superset of the standard tier)\n- [ ] Are the deep-tier-only chapters (config \u002F environment variables, observability, security) filled in or marked not applicable?\n- [ ] Does the overall assessment chapter (chapter 9) give **project highlights**, each tied to `path:line` (not a generic \"clear architecture\")?\n- [ ] If it matches **DevTool \u002F Workflow tool**: did you **exhaustively cover all work scenarios** as \"intent → entry point → flow\"?\n- [ ] If it matches **Agent coding tool plugin \u002F extension**: did you separate Claude Code \u002F Codex signals, **profile each item, and draw an overall assembly diagram**?\n      With many items, did you use parallelism (or note it was not enabled)?\n- [ ] If **parallel drafting by report chapter** was used: did you aggregate chapter by chapter \u002F unify terms \u002F **check consistency across chapters**?\n      Did the one-page overview come out first, and were chapters pushed as they became ready? With no subagent tool or a small project, did you fall back to serial and note it?\n\n### Step 6: Ask for the output destination\n\nAfter the report is produced in the conversation and the step 5 self-check passes, **do not paste the full text yet**; ask the user where they want the report.\nBy default **do not write to disk automatically**; act on the user's choice.\n\n- **How to ask**: when the environment provides an interactive choice tool, use it (e.g. Claude Code's AskUserQuestion or the user-input capability\n  exposed by the current Codex session); if not available, ask in plain text and have the user reply with one option.\n  - **Terminal**: output the full report in the conversation, do not write a file.\n  - **File**: write it to a file; in the conversation only state the saved path and include the report's one-page overview, without repeating the full text.\n  - **Both**: output the full report in the conversation, **and** write it to a file.\n- **Where the one-page overview comes from** (the part left in the terminal when \"file\" is chosen): for the standard \u002F deep tiers, take the report's `## 一页纸概览` section directly;\n  the quick overview tier has no such section, so take the two or three lines of its `## 一句话定义` (one-sentence definition) and `## 核心价值` (core value) sections.\n- **Write details when \"file\" or \"both\" is chosen**: write the **original text** of the report just produced (Chinese, Markdown) to the file.\n  - **Default location**: the root of the investigated project.\n  - **Default file name**: `\u003C项目名>-调研报告-\u003CYYYYMMDD>.md` (`\u003C项目名>` is the project name, taken from the investigated directory name),\n    e.g. `codebase-analyzer-调研报告-20260603.md`. If the user gives a path \u002F file name, use theirs.\n  - If **a file with the same name already exists** before writing, ask the user to confirm overwrite or rename; do not overwrite silently.\n  - Write exactly the report from the conversation; do not trim or expand it for the file.\n- **No second question after the choice**: \"terminal\" means output in the conversation only, no file; a user who wants both a file and the full text in the terminal should choose \"both\" up front.\n- **When a large project is produced in phases**: ask about the destination only after all modules \u002F chapters are aggregated into the complete report; what gets saved is the final complete version,\n  not the interim overview. During streaming, push only progress + summaries to the terminal; do not paste each interim draft to the terminal.\n\n## Output format rules\n\n- **The whole report must be in Chinese** (including comments in code snippets; original code stays unchanged).\n- Section order **follows the chosen tier's template**; the interim overview in phase 1 of a large project is not bound by the template.\n- Wrap file paths in backticks, e.g. `src\u002Fserver\u002Frouter.ts:42`.\n- Use fenced code blocks with a language tag for code snippets.\n- **Use tables** for structured comparison data (module responsibilities, environment variables, external interfaces, external systems, etc.): this multi-column data that needs alignment\n  is what tables are for. Do **not** put narrative text, long explanations, or connected reasoning in tables; lists or paragraphs read better.\n- The environment variable table lists only variable name, purpose, whether required, and where it is loaded; do not read or copy real values to fill it.\n- Use **bold** for emphasis; avoid long stretches of italics.\n- **No ornamental prose**: when a plain statement exists, use it; do not replace statements with metaphors or flowery wording.\n  Write \"一个值得调整的参数\", not \"一个值得转动的旋钮\"; write \"这一点依然重要\", not \"这一点依然有一席之地\".\n  Such sentences show off the writer instead of conveying a point; metaphors also bring associations the writer didn't choose and can't control, and the reader has to work harder to decode them.\n\n## Common mistakes\n\n- \"这个项目大概是一个 web 应用，应该用了 Express。\": guessing without looking at the dependency files.\n- Reading every file before starting to write the report: wastes context and likely loses the big picture.\n- \"认证相关的逻辑在 auth 模块里。\": no path given, so the reader cannot check it.\n- The end-to-end flow only says \"request comes in, gets processed, returns\": not traced to specific files \u002F functions.\n- Writing a firm conclusion like \"本项目不涉及用户身份\" as \"没搞清楚认证在哪\": treating not-applicable as a blind spot.\n- Outputting a giant report directly without giving an overview first.\n- Writing in English, or mixing Chinese and English.\n- \"认证模块是整个系统的心脏。\": a metaphor instead of a statement; write \"所有请求都先经过认证模块\".\n- Reading real `.env` \u002F private keys \u002F credential files to complete the config section, or writing tokens, passwords, keys, or sensitive defaults into the report.\n- Flooding the terminal with the whole report without asking about the destination, or writing the report into the project directory without permission.\n",{"name":5,"description":7},"main","7d691099ecfe5a86d66b627266b7ff2998f8a63f","skills\u002Fdevelopment\u002Fcodebase-analyzer","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit","https:\u002F\u002Fgithub.com\u002FRollRollRoll","Do Do Do !","2026-11-03 16:20:15",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add RollRollRoll\u002Fagent-toolkit --skill codebase-analyzer",{"tool":37,"command":38},"bunx","bunx skills add RollRollRoll\u002Fagent-toolkit --skill codebase-analyzer",{"tool":40,"command":41},"pnpm","pnpm dlx skills add RollRollRoll\u002Fagent-toolkit --skill codebase-analyzer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002FSKILL.md",true,[45,51,55,59,63,67,71],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",275,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Finvestigation-checklist.md",13956,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Finvestigation-checklist.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fparallel-strategy.md",16063,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Fparallel-strategy.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fproject-type-checklists.md",10319,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Fproject-type-checklists.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Ftemplate-deep.md",21257,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Ftemplate-deep.md",{"path":68,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Ftemplate-quick.md",2930,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Ftemplate-quick.md",{"path":72,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Ftemplate-standard.md",8603,"https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fcodebase-analyzer\u002Freferences\u002Ftemplate-standard.md",[76,85,92,100,108,116],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M75BYT7NM9FZW238XWS3GPXA","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","MIT","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fwriting-for-agents\u002FLICENSE.upstream","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M75BYHZGRVHR4GEY5MAHY5XV","test-skill","Blind-test a target skill in an isolated sandbox, collect evidence through headless runs, and produce a step-by-step traceable retrospective report in Chinese.","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Ftest-skill\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M75BYETS35KTJZ5W3EBNF7GS","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fteach\u002FLICENSE.upstream","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fteach\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M75BYC50PVV26NS2S1CGHGFH","retro","Conduct a retrospective on a coding session.","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fretro\u002FLICENSE.upstream","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fretro\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M75BY9Q6BN1DZPTNKTDAV9PN","re-explain","Re-explain earlier content in simple, clear Chinese, filling in the context needed to follow it.","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fre-explain\u002FLICENSE.upstream","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fre-explain\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M75BY6XMK229A7QB20FP7F34","notify-test","Send a test Telegram notification through the agent-notify hooks and report whether the token and chat_id work. Use when the user asks to test or verify agent notifications.","https:\u002F\u002Fgithub.com\u002FRollRollRoll\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fsupport\u002Fnotify-test\u002FSKILL.md",[],[]]