Leverages knowledge graphs to provide compressed context and task orchestration for complex edits.

Install

mkdir -p .claude/skills/graphflow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18944" && unzip -o skill.zip -d .claude/skills/graphflow && rm skill.zip

Installs to .claude/skills/graphflow

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Graph-based code context compression, task planning, and knowledge graph orchestration (10 MCP tools). Invoke before ANY code question, bug fix, debugging, file reading, Chinese/CJK query, refactor, or multi-step edit — ALWAYS call graphflow_context MCP first when GraphFlow is connected.
288 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Compress code context for token efficiency
  • Plan multi-step tasks using a knowledge graph
  • Orchestrate knowledge graph operations
  • Index workspace changes incrementally or fully
  • Export and import graph artifacts for team sharing

How it works

The skill uses a persistent MCP server to index the codebase into a knowledge graph, enabling context compression, task planning, and orchestration. It provides tools for querying context, planning tasks, managing the graph, and gaining insights.

Inputs & outputs

You give it
Code question, bug fix, refactor, or multi-step edit
You get back
Compressed context, task decomposition, or graph insights

When to use graphflow

  • Refactoring complex modules
  • Planning multi-step edits
  • Querying codebase knowledge

About this skill

GraphFlow Skill

GraphFlow is a graph-based context and planning service backed by a persistent MCP server. It turns codebases into queryable knowledge graphs, delivering token-efficient compressed context, task planning, and orchestration.

Architecture

┌─────────────────────────────────────────────────┐
│  GraphFlow Skill (this file)                     │
│  - Quick entry points & workflows                │
│  - Tool selection logic                          │
│  - Output interpretation guides                  │
└──────────────────┬──────────────────────────────┘
                   │
                   ▼
┌─────────────────────────────────────────────────┐
│  GraphFlow MCP Server (persistent backend)      │
│  10 tools: context, plan, index, insight, run,  │
│  report_outcome, skill_insights, diagnose,      │
│  artifact, skill_guide                          │
└──────────────────┬──────────────────────────────┘
                   │
                   ▼
┌─────────────────────────────────────────────────┐
│  GraphFlow Core Engine                          │
│  - Graph index & context compression            │
│  - Task planning & DAG                          │
│  - Skill learning flywheel                      │
│  - Artifact import/export                       │
└─────────────────────────────────────────────────┘

When to Use

ALWAYS invoke this skill BEFORE:

  • Multi-step edits, refactors, or architecture changes
  • Large codebase-wide questions or exploration
  • Debugging across multiple files
  • Any task where you would otherwise read many files
  • Token budget is a concern
  • You need structured task planning

DO NOT:

  • Scan the whole repository recursively before trying GraphFlow
  • Read large files before checking GraphFlow anchors
  • Skip GraphFlow for complex tasks
  • Use grep for codebase exploration before graphflow_context

Trae / Trae CN setup (Rules + Skill + MCP)

Trae loads Rules every turn and Skills on demand. GraphFlow install writes:

PathRole
.trae/rules/graphflow.mdalwaysApply: truemust call graphflow_context first
.trae/skills/graphflow/SKILL.mdFull workflows; trigger with #graphflow
User/mcp.jsonGraphFlow MCP server

If Rules are missing, type #graphflow at the start of a chat. Pass rootDir = current project absolute path on every context call.

Antigravity IDE setup (Rules + Skill + MCP)

PathRole
~/.gemini/antigravity/mcp_config.jsonGlobal MCP (mcpServers.graphflow)
~/.gemini/antigravity/skills/graphflow/SKILL.mdGlobal Skill
.agent/rules/graphflow.mdProject rules (always loaded in workspace)
.agent/skills/graphflow/SKILL.mdProject Skill
GEMINI.md (project root)Managed token-first block

Run npx @roarpeng/graphflow install from the project root. Do not hardcode GRAPHFLOW_WORKSPACE_ROOT in MCP env.

Gemini CLI setup

PathRole
~/.gemini/settings.jsonMCP (mcpServers.graphflow)
~/.gemini/GEMINI.mdGlobal managed instruction block
GEMINI.md (project root)Project managed block (with install --scope all)

GitHub Copilot (VS Code) setup

PathRole
~/.config/Code/User/mcp.jsonUser MCP (servers.graphflow)
.vscode/mcp.jsonProject MCP (optional, team-shared)
.github/copilot-instructions.mdRepo-level Copilot instructions

Kimi Code CLI setup

PathRole
~/.kimi-code/mcp.json (or $KIMI_CODE_HOME/mcp.json)User MCP (mcpServers.graphflow)
~/.kimi-code/skills/graphflow/SKILL.mdUser Skill (/skill:graphflow)
~/.kimi-code/AGENTS.mdGlobal token-first instruction block

Run npx @roarpeng/graphflow install. Kimi Code does not expand ${workspaceFolder}; GraphFlow omits that env placeholder. Tools appear as mcp__graphflow__graphflow_*. HostAdapter id: kimi-code.

DeepSeek Harness(dsh)插件:用法与能力

GraphFlow 是 DeepSeek Harness 的 dsh-plugin。装入后模型看到的工具名带前缀 mcp__graphflow__

能力

能力工具(dsh 名)
压缩上下文(先调用)mcp__graphflow__graphflow_context
任务规划 DAGmcp__graphflow__graphflow_plan
桥接执行包mcp__graphflow__graphflow_run
回填飞轮mcp__graphflow__graphflow_report_outcome
ATP insightmcp__graphflow__graphflow_insight
增量/全量建图mcp__graphflow__graphflow_index
技能洞察mcp__graphflow__graphflow_skill_insights
诊断mcp__graphflow__graphflow_diagnose
图谱产物mcp__graphflow__graphflow_artifact
技能指南mcp__graphflow__graphflow_skill_guide

安装

dsh plugin --profile web add @roarpeng/graphflow
npx @deepseek-ai/dsh web
# 或已有 ~/.dsh 时写 home overlay + skill 文件:
npx @roarpeng/graphflow install
路径作用
包内 cordis.patch.ymldsh plugin add 插入的 bundle 层:MCP(cwd: process.cwd())+ @roarpeng/graphflow/dsh glue
$DSH_HOME/cordis.patch.yml(默认 ~/.dshgraphflow install 写的 home overlay
$DSH_HOME/skills/graphflow/SKILL.md本 Skill(install 复制);glue 也会在运行时 ctx.skills.register

用法: 第一轮先 mcp__graphflow__graphflow_contextrootDir = 仓库绝对路径)。不要在 patch 里写死 GRAPHFLOW_WORKSPACE_ROOT。走了 graphflow_run 后必须 graphflow_report_outcome。会话结束时 glue 会 best-effort 关闭 pending episode(GRAPHFLOW_AUTO_CAPTURE=0 可关)。VS Code 图谱面板 / Workbench Tree 不在 dsh 上。


Tool Inventory (10 MCP Tools)

Core Context Tools (Highest Frequency)

ToolPurposeCall Frequency
graphflow_contextPreview compressed context (query) or expand anchor (anchorId)Highest - default first step

Planning Tools (High Frequency)

ToolPurposeCall Frequency
graphflow_planMulti-step task decomposition & DAG (mode='simple' or 'insight')High - before complex work
graphflow_runPlan + context package (bridge mode)Medium - full task packaging
graphflow_report_outcomeReport bridge-mode execution outcome backMedium - close the learning loop
graphflow_insightSubmit or merge agent insightsMedium - no external LLM API

Graph Management Tools (Medium Frequency)

ToolPurposeCall Frequency
graphflow_indexIncremental workspace re-index, single-file, or full rebuildMedium - after file changes

Collaboration & Insights Tools (Low Frequency)

ToolPurposeCall Frequency
graphflow_artifactExport or import graph artifactLow - team sharing
graphflow_skill_insightsLearned skill patternsLow - leverage prior learning
graphflow_skill_guideSkill usage guide for connected agentsLow - onboarding
graphflow_diagnoseProvider health, graph stats, and token savingsLow - ROI tracking / config issues

Standard Workflows

Workflow 1: Context First (90% of tasks)

Use when: Answering code questions, exploring codebase, understanding modules

Step 1: graphflow_context(query: "<your question>")
Step 2: Read summary + anchors as primary context
Step 3: Expand specific anchors with graphflow_context(anchorId: "...") when needed
Step 4: Read full files only when exact edits required
Step 5: After answering the user, call graphflow_context({ assistantReply: "<original answer>" })
        (query optional). This fills the pending turn/topic. Store original text, not an extracted abstract.

Complex tasks: graphflow_plan seeds a workbench of topic containers (function nodes on the canvas). Pass topicId to refine a node or return to the mainline. Drift auto-forks an isolated side node; messages stay inside the topic — the canvas is not one-turn-one-node. Without a workbench, previews still record as dialogue-turn nodes (resumeFromTurnId). Workbench titles/Path labels are display only; next-turn context is Goal + path titles + local original Q/A.

Input - context (preview):

{
  query?: string;          // User question (Chinese OK). Omit when only filling assistantReply.
  englishQuery?: string;   // Agent-translated English code search terms (recommended for CJK)
  topicId?: string;        // Click a workbench function node to refine / return to mainline
  sessionId?: string;      // Dialogue session name (default "main")
  resumeFromTurnId?: string; // Continue from a clicked dialogue-turn node (legacy, no workbench)
  assistantReply?: string; // Original assistant answer to store on the pending turn/topic
  configPath?: string;
  rootDir?: string;
}

Input - context (expand):

{
  anchorId: string;        // Required for expand - anchor id from preview
  configPath?: string;
  rootDir?: string;
}

Output structure (preview):

{
  summary: string[];
  anchors: Array<{ id: string; type: string; layer: "L1" | "L2" | "L3" }>;
  tokenBudget: {
    maxContextTokens: number;
    estimatedRawTokens: number;
    compressedTokens: number;
    estimatedSavingsPercent: number;
    budgetUsedPercent: number;
  };
  agentWorkItems?: Array<{ id: string; kind: string; prompt: string }>; // CJK low-match delegation
  englishQuery?: string;
}

Always report to user: token savings %, anchor count, key summary findings

Workflow 1b: Chinese / CJK queries (agent translates → English search)

Use when: User asks in Chinese but the codebase uses English symbols

GraphFlow tokenizes CJK and expands workspace path hints. When that is not enough, YOU must translate to English code keywords.

Preferred (proactive):

Step 1: Translate user intent to English file/symbol terms with YOUR model
Step 2: graphflow_context({ query: "<Chinese>", englishQuery: "PoseDetectionPage avatarMode BattlePage shieldEffect", rootDir })
Step 3: Use summary + anchors

Use exact file/class/component names (PascalCase stems). Avoi


Content truncated.

When not to use it

  • When the task is simple and does not require extensive context
  • When the user prefers to scan the whole repository recursively

Limitations

  • The skill requires `graphflow_context` MCP to be called first when GraphFlow is connected.
  • It does not support scanning the whole repository recursively before trying GraphFlow.
  • It does not support reading large files before checking GraphFlow anchors.

How it compares

This skill provides a graph-based approach to context management and task planning, offering token-efficient context and structured task decomposition that differs from manually navigating or searching a codebase.

Compared to similar skills

graphflow side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
graphflow (this skill)02moNo flagsAdvanced
nx-generate17moReviewBeginner
agent-sync-coordinator17moReviewAdvanced
aiox-master05moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry