graphify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Graphify

Graphify

Use this skill when the main question is "what graph mode should we trust, what artifact should we produce, and what should we read next?"
The job is not to dump every Graphify feature or pretend all repo-understanding work needs a graph. The job is to:
  1. classify the request into one graph packet,
  2. choose one honest execution mode,
  3. scope the corpus before runtime or token pain explodes,
  4. report artifacts and fallback truthfully,
  5. route search-only, wiki-only, or project-memory work to the right neighboring skill.
Read references/mode-packets-and-route-outs.md before handling an unfamiliar request. Read references/build-and-fallback-recipes.md when choosing between assistant-native install, local Python, incremental refresh, and structural fallback.
当核心问题是**“我们应采用哪种图谱模式、生成哪些产物,以及下一步应查阅什么内容?”**时,使用本技能。
本技能的任务并非罗列Graphify的所有功能,也不是假装所有仓库理解工作都需要图谱。其核心任务是:
  1. 将请求归类为一种图谱数据包(packet),
  2. 选择一种可靠的执行模式,
  3. 在运行时成本或Token消耗激增前划定语料范围,
  4. 如实报告产物与降级方案,
  5. 将仅需搜索、仅需维基或仅需项目记忆的工作路由至对应的关联技能。
处理不熟悉的请求前,请阅读references/mode-packets-and-route-outs.md。 选择助手原生安装、本地Python构建、增量刷新与结构化降级方案时,请阅读references/build-and-fallback-recipes.md

When to use this skill

何时使用本技能

  • The user explicitly wants
    GRAPH_REPORT.md
    ,
    graph.json
    ,
    graph.html
    , a codebase graph, or a persistent knowledge graph
  • The request is about repo/corpus structure, graph-backed relationship tracing, path queries, or architecture discovery that should survive the current session
  • The corpus mixes code, docs, PDFs, notes, screenshots, or other assets and the user wants one durable structure layer
  • The user wants to refresh, query, or explain an existing Graphify output instead of re-reading raw files from scratch
  • The user asks to install Graphify into Claude, Codex, Gemini, OpenCode, or another coding assistant for always-on graph access
  • 用户明确需要生成
    GRAPH_REPORT.md
    graph.json
    graph.html
    ,构建代码库图谱或持久化知识图谱
  • 请求涉及仓库/语料结构、基于图谱的关系追踪、路径查询,或需要跨会话留存的架构探索
  • 语料混合了代码、文档、PDF、笔记、截图或其他资源,且用户需要一个持久化的结构层
  • 用户希望刷新、查询或解释已有的Graphify输出,而非从头阅读原始文件
  • 用户请求将Graphify安装至Claude、Codex、Gemini、OpenCode或其他编码助手,以实现随时访问图谱的功能

When not to use this skill

何时不使用本技能

  • The user only needs to find a symbol, file owner, config location, or reference chain → use
    codebase-search
  • The user wants a persistent markdown knowledge base or filed research notes → use
    llm-wiki
  • The user wants project/repo memory, manifests, or cross-agent handoff packets → use
    opencontext
  • The user needs dependency-only JS/TS analysis or a quick repo tree diagram, not a durable graph memory layer
  • The request is generic GraphRAG / text-KG architecture without a concrete Graphify or durable structure ask
  • 用户仅需查找符号、文件所有者、配置位置或引用链 → 使用
    codebase-search
  • 用户需要持久化Markdown知识库或归档研究笔记 → 使用
    llm-wiki
  • 用户需要项目/仓库记忆、清单或跨Agent交接数据包 → 使用
    opencontext
  • 用户仅需依赖项分析的JS/TS专属工具或快速仓库树形图,而非持久化图谱记忆层
  • 请求为通用GraphRAG/文本KG架构,未明确要求使用Graphify或构建持久化结构

Instructions

操作步骤

Step 1: Start from the graph packet already in hand

步骤1:从已有的图谱数据包入手

Use references/mode-packets-and-route-outs.md.
Normalize the request into one of these packet shapes:
  • repo-structure-packet
    — map a codebase or subsystem before editing
  • relationship-trace-packet
    — answer a path/query/explain question from an existing or newly built graph
  • mixed-corpus-memory-packet
    — build durable structure across code + docs + assets + sources
  • assistant-install-packet
    — install Graphify into an assistant for always-on use
  • refresh-or-fallback-packet
    — update an existing graph, recover from empty/weak output, or switch to structural fallback
Capture the smallest useful frame:
markdown
Packet: repo-structure-packet
Scope: src/ + docs/architecture/
Need: GRAPH_REPORT.md + one path query
Graph state: no current outputs
Main risk: whole-repo graphing is too noisy
Rule: start from the packet the user already has. Do not force every request through a full feature tour.
参考references/mode-packets-and-route-outs.md
将请求标准化为以下数据包类型之一:
  • repo-structure-packet
    —— 在编辑前映射代码库或子系统
  • relationship-trace-packet
    —— 基于现有或新建图谱回答路径/查询/解释类问题
  • mixed-corpus-memory-packet
    —— 构建跨代码+文档+资源+数据源的持久化结构
  • assistant-install-packet
    —— 将Graphify安装至助手以实现随时使用
  • refresh-or-fallback-packet
    —— 更新现有图谱、从空/无效输出中恢复,或切换至结构化降级方案
捕获最小可用范围:
markdown
Packet: repo-structure-packet
Scope: src/ + docs/architecture/
Need: GRAPH_REPORT.md + one path query
Graph state: no current outputs
Main risk: whole-repo graphing is too noisy
规则:从用户已有的数据包开始,无需强制所有请求走完整功能流程。

Step 2: Choose one primary mode

步骤2:选择一种主模式

Pick exactly one primary mode:
  • assistant-native-install
    — install Graphify into Claude/Codex/Gemini/OpenCode because always-on
    /graphify
    access is the real goal
  • local-python-build
    — run the local Python/API workflow because the environment needs a truthful non-native path
  • incremental-refresh
    — update an existing graph on changed scope instead of rebuilding everything blindly
  • graph-query-followup
    — start from current artifacts and answer focused graph-backed questions
  • structural-fallback
    — produce a graphify-style structural graph when native extraction is unavailable, empty, or misleading for a markdown-heavy corpus
Optional: mention one fallback mode, but do not hand the user five equal options.
精确选择一种主模式:
  • assistant-native-install
    —— 将Graphify安装至Claude/Codex/Gemini/OpenCode,核心需求是实现随时可用的
    /graphify
    访问
  • local-python-build
    —— 运行本地Python/API工作流,因为环境需要非原生的可靠路径
  • incremental-refresh
    —— 更新现有图谱中已变更的范围,而非盲目重建全部内容
  • graph-query-followup
    —— 从现有产物出发,回答聚焦的基于图谱的问题
  • structural-fallback
    —— 当原生提取不可用、为空或对重度Markdown语料有误导时,生成Graphify风格的结构化图谱
可选:提及一种降级模式,但不要给用户提供五个同等选项。

Step 3: Scope the corpus before doing anything expensive

步骤3:在执行高成本操作前划定语料范围

Choose the smallest path that answers the question.
Good defaults:
  • repo root only when the user truly needs repo-wide architecture
  • src/
    ,
    app/
    ,
    packages/foo/
    , or one service directory for implementation work
  • raw/
    ,
    docs/
    , or a mixed research folder for corpus graphing
  • existing
    graphify-out/
    when the job is query/refresh rather than rebuild
Rules:
  • avoid blind whole-repo graphing on large repos
  • prefer
    .graphifyignore
    or smaller scope over hoping runtime cost behaves
  • if the graph request is really a locate/reference request, route to
    codebase-search
选择能回答问题的最小路径。
推荐默认范围:
  • 仅当用户确实需要全仓库架构时才选择仓库根目录
  • 实现类工作选择
    src/
    app/
    packages/foo/
    或单个服务目录
  • 语料图谱构建选择
    raw/
    docs/
    或混合研究文件夹
  • 当任务为查询/刷新而非重建时,选择已有的
    graphify-out/
规则:
  • 避免在大型仓库中盲目进行全仓库图谱构建
  • 优先使用
    .graphifyignore
    或更小范围,而非寄希望于运行时成本可控
  • 如果图谱请求本质是定位/参考请求,路由至
    codebase-search

Step 4: Tell the truth about install and runtime shape

步骤4:如实说明安装与运行形态

Use references/build-and-fallback-recipes.md.
Core facts to preserve:
  • official PyPI package name:
    graphifyy
  • CLI command:
    graphify
  • Python 3.10+
  • assistant-native installs exist for Claude / Codex / Gemini / OpenCode and related tools
  • local automation may need a Python/API path or structural fallback rather than assuming assistant-native
    /graphify
    is available
Never blur these cases:
  • always-on assistant install
  • local one-shot graph build / refresh
  • querying an existing graph
  • structural fallback because native extraction is not the honest answer
参考references/build-and-fallback-recipes.md
需保留的核心信息:
  • 官方PyPI包名称:
    graphifyy
  • CLI命令:
    graphify
  • 要求Python 3.10+
  • 支持为Claude / Codex / Gemini / OpenCode及相关工具进行助手原生安装
  • 本地自动化可能需要Python/API路径或结构化降级方案,而非默认假设助手原生
    /graphify
    可用
绝不能混淆以下场景:
  • 随时可用的助手安装
  • 本地一次性图谱构建/刷新
  • 查询现有图谱
  • 因原生提取不是可靠方案而采用的结构化降级

Step 5: Run the chosen mode with the narrowest recipe

步骤5:使用最精简的方案执行所选模式

Keep commands or steps minimal and mode-specific.
Typical recipes:
  • assistant-native-install
    → install / verify the assistant-specific Graphify integration
  • local-python-build
    → install
    graphifyy
    , verify runtime, run the Python pipeline or tested local workflow, and export
    GRAPH_REPORT.md
    ,
    graph.json
    , and
    graph.html
  • incremental-refresh
    → reuse existing artifacts and refresh only the changed scope when practical
  • graph-query-followup
    → read
    GRAPH_REPORT.md
    first, then run
    query
    ,
    path
    , or
    explain
  • structural-fallback
    → build the smallest truthful graph from filesystem structure, frontmatter, support files, and explicit mentions instead of pretending native semantic extraction succeeded
If the corpus is markdown-heavy and native extraction returns a 0-node or misleading graph, switch modes instead of retrying the same failing path.
保持命令或步骤最小化且贴合所选模式。
典型方案:
  • assistant-native-install
    → 安装/验证助手专属的Graphify集成
  • local-python-build
    → 安装
    graphifyy
    ,验证运行环境,执行Python流水线或经过测试的本地工作流,导出
    GRAPH_REPORT.md
    graph.json
    graph.html
  • incremental-refresh
    → 复用现有产物,仅在可行时刷新已变更的范围
  • graph-query-followup
    → 先读取
    GRAPH_REPORT.md
    ,再执行
    query
    path
    explain
    操作
  • structural-fallback
    → 从文件系统结构、前置元数据、支持文件和明确提及的内容构建最小化的可靠图谱,而非假装原生语义提取已成功
如果语料以Markdown为主,且原生提取返回0节点或误导性图谱,请切换模式而非重复尝试失败路径。

Step 6: Read artifacts in the right order

步骤6:按正确顺序读取产物

Always prefer:
  1. graphify-out/GRAPH_REPORT.md
  2. graphify-out/graph.html
  3. graphify-out/graph.json
Do not dump raw
graph.json
into a prompt if the report or a focused query is enough.
始终优先选择:
  1. graphify-out/GRAPH_REPORT.md
  2. graphify-out/graph.html
  3. graphify-out/graph.json
如果报告或聚焦查询已足够,请勿将原始
graph.json
直接放入提示词中。

Step 7: Route adjacent work outward

步骤7:将关联工作路由至外部

This skill owns durable graph mode choice and graph-backed follow-up, not every repo/corpus task.
Typical route-outs:
  • codebase-search
    — exact text, symbol, config/content ownership, and impact mapping before graphing
  • llm-wiki
    — narrative synthesis, wiki pages, source filing, long-lived markdown knowledge bases
  • opencontext
    — searchable decisions, manifests, stable links, and project-memory handoff
  • survey
    — broader landscape scans when the real question is tool/platform comparison before choosing Graphify
If the user asks “build or query the graph,” stay here. If they ask “find the file/symbol fast,” “file this as a wiki note,” or “store this as project memory,” route out.
本技能负责持久化图谱模式选择和基于图谱的后续操作,而非所有仓库/语料任务。
典型路由目标:
  • codebase-search
    —— 图谱构建前的精确文本、符号、配置/内容归属及影响映射
  • llm-wiki
    —— 叙事性合成、维基页面、源文件归档、长期Markdown知识库
  • opencontext
    —— 可搜索的决策记录、清单、稳定链接及项目记忆交接
  • survey
    —— 当核心问题是在选择Graphify前进行工具/平台对比时,进行更广泛的全景扫描
如果用户要求“构建或查询图谱”,则留在本技能处理。 如果用户要求“快速查找文件/符号”、“将此归档为维基笔记”或“将此存储为项目记忆”,则路由至对应技能。

Step 8: Return one concise graph brief

步骤8:返回一份简洁的图谱简报

Always return a short operator-style brief with:
  • packet
  • primary mode
  • scope
  • output directory / artifacts
  • whether the result was native Graphify or structural fallback
  • 1–3 next steps or queries
  • one route-out if neighboring work now owns the next step
始终返回一份简短的操作风格简报,包含:
  • 数据包类型
  • 主模式
  • 范围
  • 输出目录/产物
  • 结果是原生Graphify还是结构化降级方案
  • 1-3个下一步操作或查询方向
  • 若后续工作需由关联技能处理,需指明一个路由目标

Output format

输出格式

Always return a graph build brief, graph refresh brief, graph query brief, or Graphify install brief.
Required qualities:
  • identify the packet already in hand
  • choose one primary mode
  • name the scope explicitly
  • state which artifacts exist or were created
  • label fallback mode honestly when native extraction was not used
  • read from
    GRAPH_REPORT.md
    before over-focusing on raw graph JSON
  • route search-only, wiki-only, or project-memory work outward
始终返回图谱构建简报图谱刷新简报图谱查询简报Graphify安装简报
必备要素:
  • 识别已有的数据包
  • 选择一种主模式
  • 明确标注范围
  • 说明已存在或已生成的产物
  • 当未使用原生提取时,如实标注降级模式
  • 在过度关注原始图谱JSON前,先读取
    GRAPH_REPORT.md
  • 将仅需搜索、仅需维基或仅需项目记忆的工作路由至外部

Examples

示例

Example 1: understand a repo before editing

示例1:编辑前理解仓库

Input
Map this repo with Graphify so I can understand the architecture before touching code.
Good output direction
  • repo-structure-packet
  • local-python-build
    or
    assistant-native-install
    depending on environment
  • scopes the repo honestly
  • reports
    GRAPH_REPORT.md
    ,
    graph.json
    ,
    graph.html
输入
使用Graphify映射此仓库,以便我在修改代码前理解其架构。
推荐输出方向
  • repo-structure-packet
  • 根据环境选择
    local-python-build
    assistant-native-install
  • 如实划定仓库范围
  • 报告生成
    GRAPH_REPORT.md
    graph.json
    graph.html

Example 2: trace a relationship from an existing graph

示例2:从现有图谱追踪关系

Input
We already have graphify-out. What connects the auth controller to billing?
Good output direction
  • relationship-trace-packet
  • graph-query-followup
  • reads
    GRAPH_REPORT.md
    first, then uses
    query
    /
    path
  • avoids unnecessary rebuilds
输入
我们已经有graphify-out了。认证控制器和计费模块之间有什么关联?
推荐输出方向
  • relationship-trace-packet
  • graph-query-followup
  • 先读取
    GRAPH_REPORT.md
    ,再执行
    query
    /
    path
    操作
  • 避免不必要的重建

Example 3: mixed corpus with markdown-heavy sources

示例3:包含重度Markdown源的混合语料

Input
Turn this docs + screenshots + notes folder into a persistent graph we can reuse next week.
Good output direction
  • mixed-corpus-memory-packet
  • chooses
    local-python-build
    or
    structural-fallback
  • explains whether the result is native Graphify or graphify-style structural fallback
输入
将此包含文档+截图+笔记的文件夹转换为可在下周复用的持久化图谱。
推荐输出方向
  • mixed-corpus-memory-packet
  • 选择
    local-python-build
    structural-fallback
  • 说明结果是原生Graphify还是Graphify风格的结构化降级方案

Example 4: request is really search, not graphing

示例4:请求本质是搜索而非图谱构建

Input
I just need to find where this config is defined and who references it.
Good output direction
  • routes to
    codebase-search
  • does not force Graphify where search is the bottleneck
输入
我只需要找到这个配置的定义位置以及引用它的对象。
推荐输出方向
  • 路由至
    codebase-search
  • 无需在搜索更高效的场景下强制使用Graphify

Best practices

最佳实践

  1. Use the smallest scope that answers the question.
  2. Keep assistant-native install, local build, refresh, query, and fallback as distinct modes.
  3. Prefer
    GRAPH_REPORT.md
    before raw graph JSON.
  4. Treat structural fallback as a first-class honest mode, not a hidden failure.
  5. Route search-first work to
    codebase-search
    instead of overselling graphing.
  6. Route narrative memory to
    llm-wiki
    and project memory to
    opencontext
    .
  7. Refresh compact and discovery surfaces whenever the front-door wording changes materially.
  8. If a graph build is machine-specific or path-leaky, say so instead of presenting it as portable truth.
  1. 使用能回答问题的最小范围。
  2. 将助手原生安装、本地构建、刷新、查询和降级方案作为独立模式区分对待。
  3. 优先使用
    GRAPH_REPORT.md
    而非原始图谱JSON。
  4. 将结构化降级视为一等可靠模式,而非隐藏的失败。
  5. 将优先搜索的工作路由至
    codebase-search
    ,而非过度推销图谱构建。
  6. 将叙事性记忆路由至
    llm-wiki
    ,将项目记忆路由至
    opencontext
  7. 当核心表述发生实质性变化时,及时更新精简的探索界面。
  8. 如果图谱构建依赖特定机器或路径,如实说明,而非将其呈现为可移植的通用方案。

References

参考资料