agentleFS
sponge-b0bsponge-b0b/Polaris/.agents/skills/codegraph/SKILL.md

codegraph

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Trace implicit runtime paths, event loops, framework decorators, and decoupled execution targets with CodeGraph. Use for Python routing, emit/on loops, callbacks, string-keyed handlers, or abstract dispatch—not ordinary static symbol, dependency, or blast-radius analysis.

16 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

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

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 4

    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. Distinctive:

    Edge Resolution Invariant: Only trust edges that resolve completely from end to end.

    line 20
  2. Distinctive:

    Blind-Spot Rule: If a trace yields a partial or broken path matching an interface boundary, log it explicitly as a "CodeGraph blind spot." …

    line 21
  3. Distinctive:

    When investigating runtime call paths, decoupled handlers, or asynchronous routing flows, run the CodeGraph tools based on your …

    line 26
  4. Distinctive:

    Before initializing dynamic code exploration, verify that the local repository background daemon is healthy and connected:

    line 29
  5. Very specific:

    Run: codegraph status to validate the state of the active tracking databases.

    line 30
  6. Very specific:

    Run: codegraph_explore(query="<symbol_name>") via the native MCP tool connector.

    line 34

“Common” is measured: kept by at least 6 in 10 of the 13 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

CodeGraph Analysis Skill

Objective

Expose the dynamic edge-synthesizer engine to trace implicit Python execution flows, runtime framework routing configurations, asynchronous event loops, and string-keyed callbacks that static AST tools or raw grep queries miss.

Routing Boundary

Select CodeGraph only when the material path depends on implicit or decoupled runtime dispatch. Do not select it merely because Python is changing or for ordinary symbol lookup, imports, direct call graphs, static dependencies, or diff impact; use $codebase-memory-mcp for those. Use $repowise for behavioral location and repository risk/history, $graphify for broad corpus/community exploration, and rg or direct reads for literals and non-code authority.

Context Inputs

  • Authoritative Edge Registry: .codegraph/ (Driven by a native, always-on SQLite backend).
  • Live File Watcher: The underlying MCP background daemon runs an active background filesystem watcher. It automatically captures file saves and incrementally syncs the graph under a second—manual index rebuilds are completely unnecessary.

Guardrail Constraints

  • Edge Resolution Invariant: Only trust edges that resolve completely from end to end.
  • Blind-Spot Rule: If a trace yields a partial or broken path matching an interface boundary, log it explicitly as a "CodeGraph blind spot." Stop digging through files along that specific trajectory to avoid generating unnecessary file-read overhead.
  • Staleness Detection (Debounce Window): If you make a rapid succession of edits, CodeGraph might display a minor staleness banner (⚠️) for a few milliseconds while the quiet window processes. If you see this banner, read the modified target file directly instead of over-relying on the graph query.

Execution Steps

When investigating runtime call paths, decoupled handlers, or asynchronous routing flows, run the CodeGraph tools based on your investigative intent:

1. Verification of System Pathing & Readiness

Before initializing dynamic code exploration, verify that the local repository background daemon is healthy and connected:

  • Run: codegraph status to validate the state of the active tracking databases.

2. High-Efficiency Single-Pass Single Symbol Exploration

Gather the implicit callers, callees, routing decorators, and dispatch context for a specific function, class, event, callback, or route target in one command without manual sweeps:

  • Run: codegraph_explore(query="<symbol_name>") via the native MCP tool connector.

Examples

Example 1: Checking Local Index Health & Registration State

User: "Is CodeGraph running properly on our project?" Agent Response: "I am using the codegraph skill to check the tracking health and validation metadata of our dynamic edge registry."

codegraph status

Example 2: Tracing Framework Decorators & Route Mapping

User: "Find what triggers or handles requests directed at the portfolio update endpoint." Agent Response: "I am using the codegraph skill to resolve the runtime routing decorators and map out the relevant execution paths."

codegraph_explore(query="/portfolio/update")

Example 3: Locating Async Event Loops & String-Keyed Emitters

User: "Trace how the portfolio_liquidated event is dispatched to downstream handlers." Agent Response: "I am using the codegraph skill to isolate string-keyed event emitters and track the call paths across decoupled async loops."

codegraph_explore(query="portfolio_liquidated")

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.