分析项目代码、配置、文档和基础设施文件,生成可交互探索的结构与依赖关系图。支持日语说明、文件排除,以及根据变更更新已有分析结果。
- 了解首次接触的项目结构
- 检查组成部分之间的依赖
- 用日语生成设计说明
利用记录代码组成及其关系的知识图谱,查找与问题有关的文件和函数,追踪调用与依赖关系,并结合架构分层具体解释项目的工作方式。
Use when you need to ask questions about a codebase or understand code using a knowledge graph
利用记录代码组成及其关系的知识图谱,回答有关项目的问题。它会搜索与问题相关的名称、摘要和标签,再沿着调用关系和依赖关系解释各部分如何连接。回答会指出具体文件和函数的位置,并说明它们属于哪些架构层,将项目中的概念与实际代码位置联系起来。
适合初次接触某个代码库、需要了解其工作方式,或查找某项功能涉及哪些处理的情况。它聚焦于相关部分,可以在逐一阅读整个项目之前提供线索。如果没有找到匹配条目,会明确说明,并给出相关搜索词。
需要事先使用 /understand 创建 knowledge-graph.json。文件保存在 .ua/ 中,现有环境也可能使用 .understand-anything/。回答前会检查 Git 的变更情况;如果图谱尚未反映这些变更,会先发出提醒。如果无法检查 Git 信息,也会附上提示并继续回答。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月21日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Answer questions about this codebase using the knowledge graph in the project's data directory (.ua/knowledge-graph.json, or the legacy .understand-anything/knowledge-graph.json when that directory is present).
The knowledge graph JSON has this structure:
project — {name, description, languages, frameworks, analyzedAt, gitCommitHash}nodes[] — each has {id, type, name, filePath?, summary, tags[], complexity, languageNotes?}
file:path, function:path:name, config:path, article:pathedges[] — each has {source, target, type, direction, weight}
layers[] — each has {id, name, description, nodeIds[]}tour[] — each has {order, title, description, nodeIds[]}Resolve the data directory $UA_DIR. Run UA_DIR=$([ -d .understand-anything ] && echo .understand-anything || echo .ua) — this is the legacy .understand-anything/ when it already exists, otherwise the new .ua/. Check that $UA_DIR/knowledge-graph.json exists in the current project root. If not, tell the user to run /understand first.
Check graph freshness before using graph-derived context:
project.gitCommitHash from the graph metadata as GRAPH_COMMIT_RAW. Resolve it as a commit before using it in any Git diff, then compare it with git rev-parse HEAD and inspect project-scoped committed and working-tree changes from the project root:
GRAPH_COMMIT=$(git rev-parse --verify --end-of-options "${GRAPH_COMMIT_RAW}^{commit}" 2>/dev/null)
git rev-parse HEAD
git diff --name-only "$GRAPH_COMMIT" HEAD -- .
git diff --cached --name-only -- .
git diff --name-only -- .
git ls-files --others --exclude-standard -- .
-- . pathspec is required: commits that only touch a sibling monorepo project must not make this graph stale. A hash mismatch alone is not stale when the project diff is empty..ua/ or legacy .understand-anything/) in every command's output because it contains generated graph artifacts, not project source drift./understand to refresh the graph.GRAPH_COMMIT_RAW resolves successfully. If the graph commit or Git metadata is missing, invalid, or unavailable, give a brief best-effort warning and continue instead of blocking.Read project metadata only — use Grep or Read with a line limit to extract just the "project" section from the top of the file for context (name, description, languages, frameworks).
Search for relevant nodes — use Grep to search the knowledge graph file for the user's query keywords: "$ARGUMENTS"
"name" fields: grep -i "query_keyword" in the graph file"summary" fields for semantic matches"tags" arrays for topic matchesid values of all matching nodesFind connected edges — for each matched node ID, Grep for that ID in the edges section to find:
Read layer context — Grep for "layers" to understand which architectural layers the matched nodes belong to.
Answer the query using only the relevant subgraph:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
分析项目代码、配置、文档和基础设施文件,生成可交互探索的结构与依赖关系图。支持日语说明、文件排除,以及根据变更更新已有分析结果。
启动交互式网页仪表板,以图形查看已分析代码库的结构和关系。可显示当前工作目录或指定项目的数据,并提供包含访问令牌的本地网址。
将 Git 差异或拉取请求与知识图谱对照,整理修改位置、周边影响、跨架构层关系及审查风险,并保存用于仪表板展示的数据。
从代码中提取业务领域、业务流程和具体步骤,生成可交互的横向流程图。既可利用现有知识图谱,也可通过轻量扫描收集分析材料。
结合现有知识图谱与实际源代码,详细解释指定文件、函数或模块的设计作用、调用关系、依赖及输入输出流程,帮助不熟悉该编程语言的读者理解代码。
分析 Figma 文件,将页面、界面、组件、实例及颜色等共享设计值之间的关系整理成图,并通过交互式仪表板查看整体设计结构。