agentleFS
yugasunyugasun/aiops/skills/code-graph/SKILL.md

code-graph

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Build and query a persistent code graph for the target project. Uses graphify (Tree-sitter + Louvain clustering) for deterministic structural extraction, then the model adds semantic annotations. Use when the user says build graph, code graph, dependency graph, impact analysis, or when other skills need structured code understanding before proceeding.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not copy graph.json into .scratch/.

    line 35
  2. Very specific:

    Prefer update over build when graph exists

    line 49

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Graph

Build, query, and incrementally update a persistent knowledge graph for the target project. Infrastructure — other skills consume it via query; Flow Conductor checks freshness on session start.

Two-tier extraction

TierToolRole
StructuralgraphifyAST nodes, edges, communities, confidence — deterministic
SemanticModelPurpose, depth, impact — contextual

graphify parses; the model annotates. Never replace graphify structural data with grep guesses.

Prerequisites

prerequisites.md — install graphifyy via uv/pipx/pip. Non-blocking if user declines.

Storage

PathSourcePurpose
graphify-out/graph.jsongraphifyStructural graph
.scratch/graph/annotations.jsonModelSemantic layer

Do not copy graph.json into .scratch/. Schema: graph-schema.md.

Operations

Detailed steps: build-steps.md.

  • /code-graph build — full scan + semantic annotation
  • /code-graph query <subcommand> — read-only; patterns in query-patterns.md
  • /code-graph update — incremental via graphify cache

Constraints

  • graphify is the structural backbone — no grep-based dependency guessing
  • Model adds semantic layer only; never override graphify edges
  • Prefer update over build when graph exists
  • Non-blocking on graphify failure — warn and continue
  • Confidence-aware: EXTRACTED (1.0) vs INFERRED (0.5) vs AMBIGUOUS (0.2)

Flow Conductor

aiops-graph.js hook suggests /code-graph build when stale. Architecture health runs graph_build phase first (phases.py) — build when missing/stale, skip when fresh, user may decline (organic fallback in /improve-codebase-architecture).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.