Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Astermesh Code Knowledge Graph & MCP

    0

    Deterministic AST knowledge graph, #ACN2 context compression with up to 98% token savings, and blast-radius analysis for Python, TypeScript, React, Vue, Svelte, and NestJS via MCP.

    $3

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Astermesh Code Knowledge Graph & MCP

    Astermesh Code Knowledge Graph & MCP

    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 knowledge

    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 quickly outgrow LLM context windows, causing coding agents to waste thousands of tokens on blind grep searches, miss transitive callers, and break downstream modules during refactoring. This skill pairs the deterministic Astermesh v1.3.3 MCP server with a strict Graph-First Navigation Protocol for AI coding assistants.

    What it does

    • Dense #ACN2 Context Compression (95.9%–98.3% Token Savings): Compresses multi-hundred-thousand-token repositories into budget-capped L0/L1/L2 topological wire views (codebase://context and get_community_wire).
    • Polyglot AST Symbol Resolution: Resolves exact file paths and 1-based physical line boundaries [line_start, line_end] across Python, TypeScript, JavaScript, React/JSX, Vue SFC, Svelte SFC, Angular, and NestJS with 100% tsconfig.json path-alias resolution.
    • Transitive Blast-Radius Analysis: Computes multi-hop incoming callers and component render trees via get_impact_radius before modifying any function, class, or shared hook.
    • Precision Line Slicing: Uses read_file_snippet and get_file_outline so the agent reads only the exact 20–40 target lines instead of loading entire 500-line files.
    • Leiden Community & Satellite Indexing: Clusters logic entities into cohesive architectural modules while linking satellite configs (.toml, .json, .yaml, .md, Dockerfile) and isolating static assets.

    How it works

    1. Orient: Read codebase://report or codebase://context (#ACN2) to map Leiden communities, God nodes, and circular dependencies.
    2. Zoom & Slice: Call get_community_wire, locate_symbol, and read_file_snippet to inspect exact physical line ranges with sub-millisecond latency.
    3. Assess Blast Radius: Run get_impact_radius and get_neighbors to identify all 1-hop and transitive dependents across modules.
    4. Verify: Trace execution pathways with trace_path as the background file watcher incrementally updates the in-memory graph in under 1ms on every file save.

    Frameworks & tools

    Requires Python 3.10+ and the open-source Astermesh MCP runtime (tree-sitter, networkx, python-igraph, leidenalg). Supports Python, TypeScript, JavaScript, React, Next.js, Vue, Svelte, Angular, and NestJS.

    Why this beats prompting it yourself

    Naive prompting relies on recursive text grepping that misses barrel re-exports, tsconfig path aliases, NestJS dependency injection, and Vue/React component render hierarchies. Battle-tested on production enterprise codebases up to 31,956 LOC (516 files), Astermesh indexes 87–113 files/sec in 1.2s–2.3s using under 13 MB RAM and cuts a 234,466-token codebase down to 3,997 tokens.

    Use cases

    • Rapid onboarding onto unfamiliar monorepos using Leiden community maps and #ACN2 wire subgraphs.
    • Zero-regression refactoring of shared hooks, services, and core classes by auditing multi-hop impact radius first.
    • Root-cause bug localization by tracing shortest call and render chains between entrypoints and failing components.
    • Architectural debt audits to detect circular dependencies and decouple high-degree God nodes.

    Known limitations

    Requires the local astermesh Python package installed and registered as an MCP server. AST extraction currently targets Python and the JavaScript/TypeScript web ecosystem; Go, Rust, and Java extractors are not yet included.

    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 8 days ago

    Software
    PythonGit

    Permissions

    Read Files
    Network Access

    File Scopes

    **/*.py
    **/*.ts
    **/*.tsx
    **/*.js
    **/*.jsx
    **/*.vue
    **/*.svelte
    **/*.toml
    **/*.json
    **/*.yaml
    **/*.md

    Astermesh runs 100% locally in memory over stdio. File reading is strictly sandboxed to the target workspace root with realpath symlink traversal protection. Zero source code or telemetry ever leaves the machine.

    Listed12 days ago
    Updated8 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