跳到正文
Skillpedia
通用编程9.0k · #12314

ontoly-software-graph

它能做什么

这项技能让 AI 智能体借助预先构建的代码地图,回答关于软件项目如何构建的问题。适合审查架构或规划修改的开发者。

适用场景

  • ✓当你想了解一个软件项目的结构时。
  • ✓当你需要追踪一个请求在代码中的流转路径时。
  • ✓当你计划重构,想先看看可能影响哪些部分的时候。

技能链接

https://github.com/anbeime/skill/blob/main/skills/ontoly-software-graph/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/anbeime/skill/blob/main/skills/ontoly-software-graph/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Check whether an Ontoly graph already exists by looking for .ontoly/, SoftwareGraph.json, diagnostics.json, validation reports, or an Ontoly MCP configuration.

  2. If no graph exists and the user permits local analysis, run:

    ontoly build .
    
  3. Inspect graph health before answering: diagnostics, graph hash, semantic coverage, trust or quality score, framework detection, and generation timestamp.

  4. Prefer Ontoly CLI or MCP capabilities for graph questions instead of scanning source files first.

  5. 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.

  6. Always cite graph evidence in the answer: node IDs, edge types, file paths, source locations, diagnostics, or framework analyzer output.

  7. State confidence from graph evidence. Do not guess confidence.

Useful Ontoly Capabilities

  • ExplainArchitecture for repository and package topology
  • FindDependencies for dependency trees and direct consumers
  • ImpactAnalysis for refactor blast radius
  • TraceExecution for request, route, and call-flow tracing
  • FindConfigurationUsage for configuration and environment variable usage
  • FrameworkReport for detected framework concepts such as modules, controllers, providers, and routes
  • FindDeadCode for 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_FOUND with 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能