---
name: devflow:graph
description: 查看项目模块图谱 — 架构分层、文件分组、依赖可视化
required_mcp_tools:
  - get_dependency_graph
---

<HARD-GATE>
收到 devflow:graph 时，必须先调用以下 MCP 工具之一：
get_dependency_graph
</HARD-GATE>

## MANDATORY FIRST STEP - Skill Registration

> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**

```bash
mkdir -p ~/.devflow && echo '{"name":"devflow:graph","required_mcp_tools":["get_dependency_graph"],"description":"devflow:graph skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
```

After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
- `mcp__devflow__get_dependency_graph`

**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.

When the skill execution is complete, clean up:
```bash
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
```

# /devflow:graph

## 执行

调用 `get_dependency_graph` MCP 工具：

```
target = "all"   (默认，拉取完整图谱)
depth = 2        (默认，可调整 1-5)
```

DevFlow 的依赖图谱是预索引的结构化数据（节点类型、边的方向、架构分层），原生工具无法提供同等质量的架构分析。
