ontoly-software-graph
它能做什么
这项技能让 AI 智能体借助预先构建的代码地图,回答关于软件项目如何构建的问题。适合审查架构或规划修改的开发者。
适用场景
- ✓当你想了解一个软件项目的结构时。
- ✓当你需要追踪一个请求在代码中的流转路径时。
- ✓当你计划重构,想先看看可能影响哪些部分的时候。
技能链接
https://github.com/anbeime/skill/blob/main/skills/ontoly-software-graph/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用代码地图,在我重构支付模块之前,告诉我哪些服务依赖它。”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查是否已有 Ontoly 图谱,使用其工具回答问题并附上证据,只有在图谱无法提供帮助时才搜索源文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Ontoly Software Graph
Use this skill when a coding agent needs evidence-backed software understanding from an Ontoly graph before searching repository files directly.
When to Use
- Explaining a repository architecture
- Tracing a request, route, controller, service, or dependency path
- Finding owners of services, modules, routes, configuration, or environment variables
- Reviewing dependency impact before a refactor
- Auditing dead code, cycles, unresolved imports, graph quality, or semantic coverage
- Preparing documentation, onboarding notes, or architecture review from graph evidence
Required Workflow
Check whether an Ontoly graph already exists by looking for
.ontoly/,SoftwareGraph.json,diagnostics.json, validation reports, or an Ontoly MCP configuration.If no graph exists and the user permits local analysis, run:
ontoly build .Inspect graph health before answering: diagnostics, graph hash, semantic coverage, trust or quality score, framework detection, and generation timestamp.
Prefer Ontoly CLI or MCP capabilities for graph questions instead of scanning source files first.
Use repository search only when Ontoly cannot answer, the graph is stale, the graph is incomplete, or the user explicitly asks for source-level verification.
Always cite graph evidence in the answer: node IDs, edge types, file paths, source locations, diagnostics, or framework analyzer output.
State confidence from graph evidence. Do not guess confidence.
Useful Ontoly Capabilities
ExplainArchitecturefor repository and package topologyFindDependenciesfor dependency trees and direct consumersImpactAnalysisfor refactor blast radiusTraceExecutionfor request, route, and call-flow tracingFindConfigurationUsagefor configuration and environment variable usageFrameworkReportfor detected framework concepts such as modules, controllers, providers, and routesFindDeadCodefor unreachable or unused graph regions
Answer Shape
When answering, include:
- the direct answer
- graph evidence
- confidence
- diagnostics or caveats
- fallback source inspection only if needed
Example:
AuthController handles authentication.
Evidence:
- node: class:src/auth/auth.controller.ts:AuthController
- route edges: HANDLES POST /login, POST /logout
- dependency edges: USES AuthService, JwtService
Confidence: high, because the graph has controller, route, and dependency edges with source locations.
Fallback Rules
- If the graph is missing, build it first when allowed.
- If graph validation fails, report the failure and use source search only to verify the affected area.
- If multiple nodes match the same name, ask for disambiguation or show the candidates with package/module context.
- If the requested concept is not in the graph, return
NOT_FOUNDwith the closest graph evidence instead of inventing an answer.
常见问题
如果我还没有图谱怎么办?
如果你允许,这项技能可以使用 ontoly 命令在本地构建一个。
答案会指向真实的代码吗?
会。这项技能要求智能体引用图谱中的节点 ID、连接类型和文件路径。
它能找出未使用的代码吗?
能。它涵盖无用代码、依赖循环和未解析导入的审计。
详情
作者的原始描述
Use Ontoly's deterministic Software Graph and MCP capabilities for architecture review, request tracing, dependency analysis, configuration lookup, and impact analysis before falling back to source-file search.
repo: anbeime/skill
热度
- GitHub 星标
- 9.0k
- 排名
- #12314
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …