understand-dashboard
它能做什么
这个命令会打开一个交互式网页仪表盘,用来可视化你项目代码之间的关联。它会展示一张“知识图谱”,呈现代码各个部分之间的关系。
适用场景
- ✓当你想了解文件之间的依赖关系时。
- ✓当你需要查看函数或类之间如何相互关联时。
- ✓当你在探索一个全新或复杂的项目时。
技能链接
https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/skills/understand-dashboard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“打开仪表盘,帮我可视化当前项目的代码。”
每周 5 个新技能,1 分钟读完。
工作原理
它会先找到你的项目文件夹,并查找一个名为 'knowledge-graph.json' 的特殊文件。如果找到了,就会尝试打开网页查看器,展示代码之间的关联。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/understand-dashboard
Start the Understand Anything dashboard to visualize the knowledge graph for the current project.
Instructions
Determine the project directory and data directory:
- If
$ARGUMENTScontains a path, use that as the project directory - Otherwise, use the current working directory
- Prefer the legacy
.understand-anything/data directory when it exists, otherwise use.ua/
Use the Bash tool to resolve:
PROJECT_ARG="$ARGUMENTS" if [ -n "$PROJECT_ARG" ]; then PROJECT_DIR=$(cd "$PROJECT_ARG" 2>/dev/null && pwd -P) else PROJECT_DIR=$(pwd -P) fi if [ -z "$PROJECT_DIR" ] || [ ! -d "$PROJECT_DIR" ]; then echo "Error: Project directory not found: ${PROJECT_ARG:-$PWD}" exit 1 fi if [ -d "$PROJECT_DIR/.understand-anything" ]; then UA_DIR="$PROJECT_DIR/.understand-anything" else UA_DIR="$PROJECT_DIR/.ua" fi- If
Check that
$UA_DIR/knowledge-graph.jsonexists in the project directory. If not, tell the user:No knowledge graph found. Run /understand first to analyze this project.Use the Bash tool to check:
if [ ! -f "$UA_DIR/knowledge-graph.json" ]; then echo "No knowledge graph found. Run /understand first to analyze this project." exit 1 fiFind the dashboard code. The dashboard is at
packages/dashboard/relative to this plugin's root directory. Check these paths in order and use the first that exists:${CLAUDE_PLUGIN_ROOT}/packages/dashboard/(Claude Code runtime root, highest priority)~/.understand-anything-plugin/packages/dashboard/(universal symlink, all installs)- Two levels up from
~/.agents/skills/understand-dashboardreal path (self-relative fallback) - Two levels up from
~/.copilot/skills/understand-dashboardreal path (Copilot personal skills fallback) - Common clone-based install roots:
~/.codex/understand-anything/understand-anything-plugin/packages/dashboard/~/.opencode/understand-anything/understand-anything-plugin/packages/dashboard/~/.pi/understand-anything/understand-anything-plugin/packages/dashboard/~/understand-anything/understand-anything-plugin/packages/dashboard/
Use the Bash tool to resolve:
SKILL_REAL=$(realpath ~/.agents/skills/understand-dashboard 2>/dev/null || readlink -f ~/.agents/skills/understand-dashboard 2>/dev/null || echo "") SELF_RELATIVE=$([ -n "$SKILL_REAL" ] && cd "$SKILL_REAL/../.." 2>/dev/null && pwd || echo "") COPILOT_SKILL_REAL=$(realpath ~/.copilot/skills/understand-dashboard 2>/dev/null || readlink -f ~/.copilot/skills/understand-dashboard 2>/dev/null || echo "") COPILOT_SELF_RELATIVE=$([ -n "$COPILOT_SKILL_REAL" ] && cd "$COPILOT_SKILL_REAL/../.." 2>/dev/null && pwd || echo "") PLUGIN_ROOT="" for candidate in \ "${CLAUDE_PLUGIN_ROOT}" \ "$HOME/.understand-anything-plugin" \ "$SELF_RELATIVE" \ "$COPILOT_SELF_RELATIVE" \ "$HOME/.codex/understand-anything/understand-anything-plugin" \ "$HOME/.opencode/understand-anything/understand-anything-plugin" \ "$HOME/.pi/understand-anything/understand-anything-plugin" \ "$HOME/understand-anything/understand-anything-plugin"; do if [ -n "$candidate" ] && [ -d "$candidate/packages/dashboard" ]; then PLUGIN_ROOT="$candidate"; break fi done if [ -z "$PLUGIN_ROOT" ]; then echo "Error: Cannot find the understand-anything plugin root." echo "Checked:" echo " - ${CLAUDE_PLUGIN_ROOT:-<unset CLAUDE_PLUGIN_ROOT>}" echo " - $HOME/.understand-anything-plugin" echo " - ${SELF_RELATIVE:-<unresolved path derived from ~/.agents/skills/understand-dashboard>}" echo " - ${COPILOT_SELF_RELATIVE:-<unresolved path derived from ~/.copilot/skills/understand-dashboard>}" echo " - $HOME/.codex/understand-anything/understand-anything-plugin" echo " - $HOME/.opencode/understand-anything/understand-anything-plugin" echo " - $HOME/.pi/understand-anything/understand-anything-plugin" echo " - $HOME/understand-anything/understand-anything-plugin" echo "Make sure you followed the installation instructions for your platform." exit 1 fi DASHBOARD_DIR="$PLUGIN_ROOT/packages/dashboard"Fast path — try the prebuilt viewer first (no install, no build). Each release ships a self-contained viewer tarball; run it pinned to the installed plugin version:
…
常见问题
什么是“知识图谱”?
它是一种把代码各部分之间的关联和关系可视化的方式,这些部分包括文件、函数和类等。
我需要先安装什么东西吗?
这个命令会优先尝试使用预先构建好的查看器。如果失败,你的电脑可能需要安装一些额外的工具。
如果找不到 'knowledge-graph.json' 会怎样?
这说明还没有分析过项目代码。你需要先运行 `/understand` 命令来生成这个文件。
详情
作者的原始描述
Launch the interactive web dashboard to visualize a codebase's knowledge graph
热度
- GitHub 星标
- 87k
- 排名
- #1365
- 许可证
- MIT
- 更新时间
- 2026/10/12
评论
- …