一键导入
rustcodegraph
通过 `rustcodegraph` 命令行界面使用 RustCodeGraph 理解、导航或脚本化操作已索引代码库。当用户要求使用 RustCodeGraph、需要高性能搜索检索代码、需要符号/源码/调用流上下文、调用方/被调用方/影响分析或受影响测试选择时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
通过 `rustcodegraph` 命令行界面使用 RustCodeGraph 理解、导航或脚本化操作已索引代码库。当用户要求使用 RustCodeGraph、需要高性能搜索检索代码、需要符号/源码/调用流上下文、调用方/被调用方/影响分析或受影响测试选择时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
当需要在编码前创建或更新实施计划时使用,尤其适用于多步骤功能开发、重构、包含多个活动部件的缺陷修复,或需要拆分为可独立执行并跟踪进度的任务文件的请求。
在创建、精简或改写技能说明,且需要让技能更清晰、可发现、可执行时使用
当你有书面实现计划需要在单独会话中执行,并带有审查检查点时使用
Use when generating Rue components, hooks, pages, examples, migrations, or when comparing Rue with Vue 3 and React.
Use when migrating away from legacy compat helpers, checking for removed compat symbols, or validating Renderable-first cleanup work in Rue.
Use when diagnosing Rue runtime errors, decoding Vapor/Wasm trap stacks, or updating production error reference docs.
| name | rustcodegraph |
| description | 通过 `rustcodegraph` 命令行界面使用 RustCodeGraph 理解、导航或脚本化操作已索引代码库。当用户要求使用 RustCodeGraph、需要高性能搜索检索代码、需要符号/源码/调用流上下文、调用方/被调用方/影响分析或受影响测试选择时使用。 |
将 RustCodeGraph 作为预计算代码地图使用:符号搜索、源码片段、
调用边、影响半径和受影响测试都来自本地 .rustcodegraph/ 索引。
优先通过本技能调用 ~/.rustcodegraph/bin/rustcodegraph 命令行界面。
-p <project-root> / --path <project-root>。.rustcodegraph/ 存在,用 rustcodegraph status 检查新鲜度。.rustcodegraph/,不要自动初始化,除非用户要求启用/索引
RustCodeGraph。告诉用户命令是 rustcodegraph init -i,然后在本轮继续
使用普通工具。优先使用 rustcodegraph 命令完成搜索、导航和影响分析。
| 意图 | 命令 |
|---|---|
| 检查索引 | rustcodegraph status |
| 调研某个区域或回答“X 是如何工作的?” | rustcodegraph explore "<symbols or question>" |
| 展示单个符号的源码 | rustcodegraph node <symbol> |
| 按行号读取已索引文件 | rustcodegraph node --file <path> --offset <n> --limit <n> |
| 按名称搜索 | rustcodegraph query <name> --kind <kind> --limit 10 |
| 查找调用方/被调用方 | rustcodegraph callers <symbol> / rustcodegraph callees <symbol> |
| 估算重构影响 | rustcodegraph impact <symbol> --depth 3 |
| 列出已索引文件 | rustcodegraph files --filter <dir> |
大多数问题优先使用 explore。在查询中放入符号名、文件名,或用户的自然语言问题:
rustcodegraph explore "mutateElement renderStaticScene"
rustcodegraph explore "how does login reach the session middleware?"
只有在需要查找精确候选名称,或消除常见符号歧义时,才使用 query:
rustcodegraph query UserService --kind class --limit 10
rustcodegraph query handleRequest --json
当某个符号或文件需要更深入检查时,在 explore 之后使用 node:
rustcodegraph node AuthMiddleware
rustcodegraph node --file src/auth.ts --offset 80 --limit 120
在重构或行为变更前使用图命令:
rustcodegraph callers saveUser --limit 30
rustcodegraph callees handleRequest --limit 30
rustcodegraph impact AuthMiddleware --depth 3
在脚本或持续集成中使用 affected,根据已变更文件选择测试:
git diff --name-only | rustcodegraph affected --stdin --quiet
rustcodegraph affected src/auth.ts --filter "e2e/*"
当其他脚本或工具需要稳定的机器可读输出时,添加 --json。
rustcodegraph sync,
再依赖命令行界面的回答。status 显示没有文件,或某个命令提示项目未初始化,在用户选择索引之前,
停止为该项目使用 RustCodeGraph。explore 输出视为已经读过的源码上下文;不要立刻用 grep 或文件读取重复检查。rg/文件读取。node <symbol> 或
query <symbol>,而不是逐个读取候选文件。