nosleepman1

SynapseCode — AI skill for Claude Code

AI community

Ultra-fast Code Graph & AST Pruning MCP Server for LLMs.

How to install SynapseCode

This entry records only its repository, not the path inside it, so there is no exact command to give. Open nosleepman1/SynapseCode and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What SynapseCode does

Ultra-fast Code Graph & AST Pruning MCP Server for LLMs. Reduces context token consumption by 75%-90% in Claude, Cursor & AI Coding Agents.

Alternatives in AI

  • Jcodemunch MCP — Cut AI token costs 95%+ on code exploration 2.6k ★
  • Nocturne Memory — A lightweight, rollbackable, and visual Long-Term Memory Server for MCP Agents 1.3k ★
  • Empryo — Empryo issue tracker + SoulForge (v2) 1.1k ★

README

SynapseCode

**High-Performance AST Code Graph & Context Optimization Engine for Large Language Models**

SynapseCode reduces context token consumption by 75% to 90% when interacting with LLMs such as Claude 3.5 Sonnet, GPT-4, and autonomous coding agents via the Model Context Protocol (MCP).

![SynapseCode Architecture](assets/synapse_architecture_banner.jpg)

[![Go Version](https://img.shields.io/badge/Go-1.22+-00ADD8?style=flat-square&logo=go)](https://golang.org) [![Protocol](https://img.shields.io/badge/Protocol-Model%20Context%20Protocol-8A2BE2?style=flat-square)](https://modelcontextprotocol.io) [![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE) [![CI](https://img.shields.io/badge/CI-Passing-brightgreen?style=flat-square)](https://github.com/nosleepman1/SynapseCode/actions)


1. Problem Statement

When using AI code assistants, injecting full raw source files or dumping repository trees consumes tens to hundreds of thousands of tokens per prompt.

This creates three critical engineering bottlenecks:

  1. Financial Cost: High token consumption multiplies API usage bills.
  2. Latency: Time-to-first-token (TTFT) degrades significantly with large prompt payloads.
  3. Context Degradation: Unnecessary implementation details dilute the attention of the model, increasing hallucination rates (Lost in the Middle phenomenon).

2. Technical Solution

SynapseCode continuously analyzes your codebase into an in-memory directed dependency graph:

  • AST Extraction: Extracts symbol declarations, types, interfaces, and signatures without full function bodies.
  • Multi-Edge Dependency Graph: Maps relations including CALLS, IMPORTS, DEFINES, IMPLEMENTS, and EXTENDS.
  • Personalized PageRank (PPR): Calculates centrality and relevance scores seeded by user task terms.
  • Knapsack Token Budgeting: Selects target implementations and direct 1-hop dependency skeletons under a strict token budget (e.g.,