跳到正文
cccskills
免费在 GitHub 公开中文介绍

understand-chat

利用记录代码组成及其关系的知识图谱,查找与问题有关的文件和函数,追踪调用与依赖关系,并结合架构分层具体解释项目的工作方式。

原文查看原文说明

Use when you need to ask questions about a codebase or understand code using a knowledge graph

AI 评分100分/ 100查看安装方法

适用场景

  • 了解功能的工作方式
  • 查找调用方和依赖项
  • 探索与某个概念相关的代码
  • 了解项目的架构分层

中文介绍

功能

利用记录代码组成及其关系的知识图谱,回答有关项目的问题。它会搜索与问题相关的名称、摘要和标签,再沿着调用关系和依赖关系解释各部分如何连接。回答会指出具体文件和函数的位置,并说明它们属于哪些架构层,将项目中的概念与实际代码位置联系起来。

适用场景

适合初次接触某个代码库、需要了解其工作方式,或查找某项功能涉及哪些处理的情况。它聚焦于相关部分,可以在逐一阅读整个项目之前提供线索。如果没有找到匹配条目,会明确说明,并给出相关搜索词。

使用示例

  • “请说明登录功能涉及哪些文件和函数。”
  • “请告诉我哪些地方调用这个模块,以及它依赖哪些部分。”

注意事项

需要事先使用 /understand 创建 knowledge-graph.json。文件保存在 .ua/ 中,现有环境也可能使用 .understand-anything/。回答前会检查 Git 的变更情况;如果图谱尚未反映这些变更,会先发出提醒。如果无法检查 Git 信息,也会附上提示并继续回答。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确说明从知识图谱查找相关组成部分和关系,以回答代码库问题。
步骤具体性步骤、输入输出和示例是否具体
A良好指定了名称、摘要和标签的搜索方法、连接与分层检查及回答内容。
安全性发送数据、删除文件、执行命令等是否有说明
A良好操作以读取图谱和检查 Git 为主,并要求在比较变更前验证提交。
安装难易度所需工具和 API 密钥是否少且有说明
A良好明确给出所需 knowledge-graph.json 的位置,并说明缺失时使用 /understand。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月21日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md4.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

/understand-chat

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).

Graph Structure Reference

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?}
    • Code node types: file, function, class, module, concept
    • Non-code node types: config, document, service, table, endpoint, pipeline, schema, resource
    • Domain/knowledge node types: domain, flow, step, article, entity, topic, claim, source
    • IDs use the node type as prefix, e.g. file:path, function:path:name, config:path, article:path
  • edges[] — each has {source, target, type, direction, weight}
    • Key types: imports, contains, calls, depends_on, configures, documents, deploys, triggers, contains_flow, flow_step, related, cites
  • layers[] — each has {id, name, description, nodeIds[]}
  • tour[] — each has {order, title, description, nodeIds[]}

How to Read Efficiently

  1. Use Grep to search within the JSON for relevant entries BEFORE reading the full file
  2. Only read sections you need — don't dump the entire graph into context
  3. Node names and summaries are the most useful fields for understanding
  4. Edges tell you how components connect — follow imports and calls for dependency chains

Instructions

  1. 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.

  2. Check graph freshness before using graph-derived context:

    • Read 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 -- .
      
    • The -- . 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.
    • Ignore the selected data directory (.ua/ or legacy .understand-anything/) in every command's output because it contains generated graph artifacts, not project source drift.
    • If the committed diff or any working-tree command reports project files, warn before answering that graph-derived context may omit those changes. Suggest: Run /understand to refresh the graph.
    • Run the commit diff only when 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.
  3. 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).

  4. Search for relevant nodes — use Grep to search the knowledge graph file for the user's query keywords: "$ARGUMENTS"

    • Search "name" fields: grep -i "query_keyword" in the graph file
    • Search "summary" fields for semantic matches
    • Search "tags" arrays for topic matches
    • Note the id values of all matching nodes
  5. Find connected edges — for each matched node ID, Grep for that ID in the edges section to find:

    • What it imports or depends on (downstream)
    • What calls or imports it (upstream)
    • This gives you the 1-hop subgraph around the query
  6. Read layer context — Grep for "layers" to understand which architectural layers the matched nodes belong to.

  7. Answer the query using only the relevant subgraph:

    • Reference specific files, functions, and relationships from the graph
    • Explain which layer(s) are relevant and why
    • Be concise but thorough — link concepts to actual code locations
    • If the query doesn't match any nodes, say so and suggest related terms from the graph

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

understand

免费有简介AI 评分 80分

分析项目代码、配置、文档和基础设施文件,生成可交互探索的结构与依赖关系图。支持日语说明、文件排除,以及根据变更更新已有分析结果。

  • 了解首次接触的项目结构
  • 检查组成部分之间的依赖
  • 用日语生成设计说明
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

understand-dashboard

免费有简介AI 评分 90分

启动交互式网页仪表板,以图形查看已分析代码库的结构和关系。可显示当前工作目录或指定项目的数据,并提供包含访问令牌的本地网址。

  • 以图形查看已分析的代码库
  • 打开当前项目的结构关系图
  • 查看其他项目的分析结果
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

understand-diff

免费有简介AI 评分 90分

将 Git 差异或拉取请求与知识图谱对照,整理修改位置、周边影响、跨架构层关系及审查风险,并保存用于仪表板展示的数据。

  • 准备审查拉取请求
  • 检查未提交变更的影响
  • 检查跨架构层的变更
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

understand-domain

免费有简介AI 评分 70分

从代码中提取业务领域、业务流程和具体步骤,生成可交互的横向流程图。既可利用现有知识图谱,也可通过轻量扫描收集分析材料。

  • 了解代码中实现的业务流程
  • 展示业务领域与步骤的联系
  • 从业务角度梳理现有知识图谱
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

understand-explain

免费有简介AI 评分 100分

结合现有知识图谱与实际源代码,详细解释指定文件、函数或模块的设计作用、调用关系、依赖及输入输出流程,帮助不熟悉该编程语言的读者理解代码。

  • 了解指定文件的作用
  • 查找函数的调用方和依赖
  • 追踪从输入到输出的数据流程
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

understand-figma

免费有简介AI 评分 80分

分析 Figma 文件,将页面、界面、组件、实例及颜色等共享设计值之间的关系整理成图,并通过交互式仪表板查看整体设计结构。

  • 了解 Figma 文件的整体结构
  • 查看组件及其实例所在位置的关系
  • 检查共享设计值的使用情况
Egonex-AI/Understand-Anything8.8万2026年10月12日 更新

查看 Egonex-AI 的全部技能

报告此技能的问题