Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    astermesh code graph

    0

    Deterministic AST graph navigation and blast-radius analysis for Python and JavaScript codebases.

    $4

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    astermesh code graph

    astermesh code graph

    Example session with this skill installed

    I need to refactor _resolve_symbol in GraphBuilder to improve alias disambiguation when multiple modules export identical function names. Analyze its blast radius, inspect current 1-hop and transitive callers across the codebase, and provide an impact assessment with a safe migration plan.

    • Read your context and instructions
    • Compiled the astermesh code graph

    Summary of Findings

    Completed deterministic dependency audit for src.astermesh.graph.builder.GraphBuilder._resolve_symbol using the in-memory AST knowledge graph.

    • Total tokens consumed: 285 tokens (compared to ~3,900 tokens required for broad file scans).
    • Resolved target location: src/astermesh/graph/builder.py lines 162–180.
    • Transitive blast radius: LOW (1 direct caller, 2 upstream entrypoints, 0 public API leaks).

    1. Blast Radius & Transitive Dependency Matrix

    Querying get_impact_radius(symbol="src.astermesh.graph.builder.GraphBuilder._resolve_symbol", max_depth=2) returned the following dependency chain:

    HopDependent EntityTypeFile PathLine RangeEdge Type
    TargetGraphBuilder._resolve_symbolMethodsrc/astermesh/graph/builder.py162–180TARGET
    1-HopGraphBuilder._link_file_relationsMethodsrc/astermesh/graph/builder.py134–160CALLS
    2-HopGraphBuilder.build_fullMethodsrc/astermesh/graph/builder.py43–54CALLS
    2-HopGraphBuilder.update_fileMethodsrc/astermesh/graph/builder.py183–191CALLS

    The method is completely private to GraphBuilder. Downstream modules interact strictly via GraphBuilder.build_full() and GraphBuilder.update_file().


    2. Physical Code Slice (Lines 162–180)

        def _resolve_symbol(self, raw_name: str, parsed: FileParseResult) -> str | None:
            clean = raw_name.removeprefix("self.").removeprefix("cls.")
            local_candidate = f"{parsed.module_fqn}.{clean}"
            if local_candidate in self._symbol_table:
                return self._symbol_table[local_candidate]
    
            if clean in parsed.imports:
                imp_target = parsed.imports[clean]
                if imp_target in self._symbol_table:
                    return self._symbol_table[imp_target]
    
            if clean in self._symbol_table:
                return self._symbol_table[clean]
    
            short = clean.split(".")[-1]
            matches = self._short_names.get(short)
            if matches and len(matches) == 1:
                return next(iter(matches))
            return None
    
    Key Risk Identified

    Line 178 (len(matches) == 1) discards ambiguous short names when two classes define methods with identical identifiers (e.g., build or run), resulting in dropped CALLS edges in large codebases.


    3. Proposed Safe Refactoring

    Intersect ambiguous short-name candidates with the current file's imported module prefixes before falling back to None:

            short = clean.split(".")[-1]
            matches = self._short_names.get(short)
            if matches:
                if len(matches) == 1:
                    return next(iter(matches))
                # Disambiguate against known module imports
                imported_modules = set(parsed.imports.values())
                disambiguated = [m for m in matches if any(m.startswith(mod) for mod in imported_modules)]
                if len(disambiguated) == 1:
                    return disambiguated[0]
            return None
    

    4. Next Steps & Regression Verification

    1. Apply the disambiguation patch to src/astermesh/graph/builder.py.
    2. Run targeted test verification:
      pytest tests/test_builder.py tests/test_resolver.py -v
      
    3. Re-verify graph connectivity via MCP:
      Call get_neighbors(symbol="src.astermesh.graph.builder.GraphBuilder._resolve_symbol", direction="in") to confirm that incoming call edges from _link_file_relations remain active.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Codebases often grow too large for context windows, leading to hallucinated call paths and broken refactors. This skill replaces broad regex searches with deterministic AST graph navigation via the Astermesh MCP server.

    What it does

    • AST symbol resolution provides exact file paths and 1-based line boundaries for any class, method, or variable.
    • Transitive blast-radius analysis computes multi-hop dependents to identify every call site affected by a signature change.
    • Execution pathway tracing identifies the shortest call or dependency chain between any two symbols in the graph.
    • Community detection groups code into Leiden communities to map macro architecture and identify God nodes.
    • Line-bounded reading ensures the agent only loads specific code slices instead of entire files.

    How it works

    1. Analyze the codebase architecture by reading the codebase://report resource to identify logical modules and hubs.
    2. Navigate to specific logic using locate_symbol and get_file_outline to find exact line ranges.
    3. Trace dependencies using get_neighbors or get_impact_radius before attempting any code modifications.
    4. Refactor with precision by visiting every node identified in the impact radius to update call sites.

    Frameworks & tools

    Built for Python 3.10+ environments. It utilizes the Astermesh MCP server to interface with Python, TypeScript, and JavaScript source code through an in-memory AST graph.

    Why this beats prompting it yourself

    Standard prompting relies on the agent's "best guess" or expensive recursive grepping, which misses indirect dependencies. This skill enforces a graph-first protocol that guarantees the agent sees the actual call graph and respects physical line boundaries.

    Use cases

    • Onboarding to a massive, unfamiliar repository by visualizing Leiden communities and God nodes.
    • Safe refactoring of core library functions by calculating a 3-hop impact radius.
    • Bug hunting by tracing the execution pathway between a source trigger and a target error.
    • Architectural audits to find and decouple highly coupled modules.

    Known limitations

    Requires the Astermesh package installed and configured as an MCP server. Support is currently limited to Python and JavaScript/TypeScript ecosystems.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Requires Python 3.10+ and the astermesh package installed as an MCP server. Supports Python, TS, and JS files only.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Software
    PythonGit

    Permissions

    Read Files
    Network Access
    Listed2 days ago

    What's inside

    Frequently Asked Questions

    No. Astermesh operates on a 100% deterministic, offline architecture. Parsing is handled locally by tree-sitter, and the relational graph is constructed in-memory with NetworkX and python-igraph using the Leiden community detection algorithm. Zero embeddings are computed, zero external API calls are made, and zero LLM tokens are spent during codebase indexing. You do not need any API keys or third-party subscriptions to index your code or run the MCP daemon.

    Astermesh is compatible with any coding environment that supports the Model Context Protocol (MCP) or custom Agent Skills (SKILL.md). Supported tools include Claude Code (via claude mcp add), Cursor (via .cursor/mcp.json), Claude Desktop (via claude_desktop_config.json), Google Antigravity and Gemini CLI (via mcp_config.json), as well as Windsurf, GitHub Copilot, Cline, and Roo Code via their respective standard stdio or SSE configuration files.

    New in LLM Ops