Claude Code plugin · v0.1.5

Stop paying tokens
to find your own code

Your architecture, stored as a knowledge graph in your repo. Claude reads it automatically — before you type a single character. No files. No guesswork. No wasted tokens.

# instead of reading 40 files...
$ speculator get subscription --facet reason
→ keep access for 7 days after payment failure
$ speculator list edges --from subscription
→ billing, entitlements, dunning, email
$
speculator get subscription --facet reason
Context costs tokens. Too many tokens.

Every time Claude needs to understand your codebase, it reads dozens of files — burning your budget before writing a single line.

❌ Without Speculator

Files read per task ~40 files
Knows "why"? Never
Finds related code? Maybe
Tokens per task ~12 000
0
tokens wasted on context

✅ With Speculator

Files read per task 0 files
Knows "why"? Always
Finds related code? Instantly
Tokens per task ~800
0
tokens for targeted query
How it works
Zero manual work. Hooks do the heavy lifting.

Install once. Speculator intercepts every Claude Code session — injecting your graph context before you ask a question.

1

SessionStart hook

At the start of every session, Speculator surfaces your knowledge base stats — entity count, coverage areas, recent changes. Claude starts smart, not cold.

# Claude sees this before you type:
Speculator KB: 47 entities · 12 domains · last update 2h ago
2

UserPromptSubmit hook

Before Claude responds to your message, Speculator searches the graph for relevant entities and edges — injecting architecture context, file locations, and reasons directly into the prompt.

# You ask about auth → Claude already knows:
✓ session → jwt → redis (reason: stateless revocation)
✓ oauth → user (file: src/auth/oauth.ts:41)
3

CLI + MCP server

When you need to curate the graph, use the speculator CLI or MCP tools. Ships with curation agents that help keep your knowledge base accurate and complete.

$ speculator add entity "rate-limiter" \
  "token bucket, 100 req/min per IP"
$ speculator add edge rate-limiter api-gateway \
  "enforces throttling before routing"
Speculator finds paths across your graph

This is what Claude sees automatically. A subscription system with checkout, Stripe webhooks, entitlements, dunning, and finance ledger. Speculator traverses the graph on every prompt — finding connections even without a direct edge, surfacing file locations, code snippets, and the reasons behind every decision.

🔍 Works even without direct edges 📄 Each edge carries file & code ⚡ Auto-plays all paths
Select a node
Click any node in the graph to see its connections and metadata
Now click another node to find the path →
Get started
Two commands in Claude Code

Install once. Speculator wires itself into every Claude Code session — injecting graph context before you type a single character.

1
Add the madlexa marketplace (once per machine)
/plugin marketplace add madlexa/skills
2
Install speculator
/plugin install speculator@madlexa-skills
registers SessionStart + UserPromptSubmit hooks via hooks/hooks.json
installs speculator CLI and MCP server (Node.js ≥ 20)
wires graph queries into Claude Code automatically — no manual lookup
creates knowledge/ directory ready for entities and edges