跳到正文
Skillpedia
通用编程48k · #5373

ontoly-software-graph

它能做什么

这个工具可以帮你理解一个软件项目是如何组织的,以及各个部分之间是如何连接的。它会分析代码,生成一张详细的项目“地图”,也就是软件图谱(Software Graph)。

适用场景

  • ✓当你想了解一个项目的整体架构时。
  • ✓当你想了解修改某段代码会产生什么影响时。
  • ✓当你想追踪一个请求在系统各个部分之间是如何流转的时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ontoly-software-graph/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“解释一下这个项目的架构。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会先检查项目的“地图”是否已经存在。如果没有,它会通过分析代码来生成一张。然后,它会利用这张地图回答你关于项目的问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Ontoly Software Graph

Overview

Ontoly builds a deterministic Software Graph from a TypeScript repository and exposes it through CLI queries, MCP capabilities, and agent skills. Use this skill when a coding agent needs evidence-backed codebase understanding before searching files directly.

This skill is an operating guide for the public Ontoly project. It does not contain compiler logic; all software understanding should come from Ontoly's generated graph, semantic model, query engine, and MCP server.

When to Use This Skill

  • Use when the user asks for repository architecture, module ownership, or onboarding help.
  • Use when tracing a request, route, controller, service, provider, dependency, or call chain.
  • Use when estimating impact for removing, renaming, or refactoring a symbol, module, package, route, or service.
  • Use when reviewing dependency topology, circular imports, dead code, configuration usage, or environment variables.
  • Use when the user explicitly wants Ontoly, Software Graph, MCP, graph validation, semantic coverage, or agent skills.

How It Works

Step 1: Verify Ontoly Is Available

Check whether the repository already has Ontoly outputs such as .ontoly/, SoftwareGraph.json, validation reports, or documented Ontoly scripts. If the ontoly command is unavailable, ask the user whether to install or use the repository's documented package manager command.

Recommended local checks:

ontoly --help
find . -maxdepth 3 \( -name "SoftwareGraph.json" -o -name ".ontoly" \) -print

Step 2: Build or Refresh the Graph

Only run a graph build in the repository the user asked about. Tell the user that graph generation may create local Ontoly artifacts before running it.

ontoly build .

If the project documents a different command, prefer the documented command over guessing.

Step 3: Check Trust, Diagnostics, and Coverage

Before answering architectural questions, inspect Ontoly diagnostics, graph statistics, trust, and semantic coverage. Treat unresolved imports, low trust, missing framework detection, or graph validation failures as answer constraints.

Use the CLI or MCP capabilities exposed by the installed Ontoly version. Prefer structured graph queries over text search.

Step 4: Use Ontoly MCP Capabilities

Start or connect to the Ontoly MCP server when the host supports MCP:

ontoly mcp

Use capabilities such as architecture summaries, dependency analysis, request tracing, impact analysis, configuration lookup, framework reports, dead-code analysis, and graph validation when available.

Step 5: Answer With Evidence

Every answer should include:

  • The Ontoly capability or query used.
  • The node, edge, route, package, or diagnostic evidence that supports the answer.
  • A confidence statement derived from graph evidence.
  • Any known limitations caused by missing graph regions or diagnostics.

Step 6: Fall Back Gracefully

Only inspect repository files directly when Ontoly cannot answer, the graph is missing, diagnostics make the graph untrustworthy for the question, or the user asks for source-level verification. When falling back, explain which graph evidence was insufficient.

Examples

Architecture Review

User asks: "Explain this repository."

Workflow:

  1. Verify or build the Ontoly graph.
  2. Check graph trust, diagnostics, detected frameworks, packages, modules, services, routes, and largest dependency hubs.
  3. Use Ontoly's architecture summary or equivalent query.
  4. Report the architecture with graph evidence and confidence.

Request Tracing

User asks: "Trace the login flow."

Workflow:

  1. Search graph nodes for authentication routes and controllers.
  2. Trace route-to-controller-to-service-to-repository relationships.
  3. Include unresolved edges or missing relationships as limitations.
  4. Avoid opening source files unless the graph cannot identify the flow.

Impact Analysis

User asks: "What breaks if I remove UserRepository?"

Workflow:

  1. Locate the graph node for UserRepository.
  2. Query callers, consumers, dependency injection edges, modules, routes, and packages that reference it.
  3. Separate direct dependents from transitive impact.
  4. Include confidence based on explicit graph relationships.

Best Practices

  • Prefer Ontoly graph queries before grep, AST parsing, or broad file search.
  • Keep graph evidence separate from inference.
  • Treat diagnostics as part of the answer, not as noise.

…

常见问题

什么是“软件图谱”(Software Graph)?

它是一张关于项目代码的详细地图,展示了不同组成部分(比如文件、函数等)之间的关系和依赖。

需要安装什么东西吗?

这取决于项目是否已经在使用这个工具,可能需要安装或设置。工具会先自动检查这一点。

如果工具找不到需要的信息怎么办?

如果代码“地图”不完整或存在问题,工具会说明这些局限性;必要时,它也可能直接查看项目文件。

详情

作者的原始描述

Use Ontoly's deterministic Software Graph, MCP server, and agent skills for architecture review, request tracing, impact analysis, and dependency analysis.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5373
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能