Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "context-guru",
"description": "Run context-guru in front of your Claude Code sessions: install once, route per repo.",
"owner": {
"name": "rossoctl",
"url": "https://github.com/rossoctl/context-guru"
},
"plugins": [
{
"name": "context-guru",
"source": "./context-guru-plugin",
"displayName": "context-guru",
"description": "Install, route, inspect and remove a local context-guru proxy for Claude Code. Recovers prompt-cache misses on long sessions; no API key needed on a Pro/Max subscription.",
"homepage": "https://github.com/rossoctl/context-guru",
"repository": "https://github.com/rossoctl/context-guru",
"license": "Apache-2.0",
"keywords": ["cache", "cost", "proxy", "tokens", "prompt-caching"],
"category": "productivity"
}
]
}
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,25 @@ docker build -t context-guru:local .

## Quickstart (60 seconds)

Download a release binary — statically linked, **no Go and no C compiler needed** — or build
**Claude Code users — install once per machine, route once per repo; no toolchain, and no API key
needed on a Pro/Max subscription** ([details](docs/how-to/install-plugin.md)):

```
/plugin marketplace add rossoctl/context-guru
/plugin install context-guru@context-guru
/reload-plugins
/context-guru:install
```

`/reload-plugins` is what makes the `/context-guru:*` skills exist in this session; without it the
last line answers `Unknown command`. A new session does the same thing.

That installs a statically-linked binary (no Go, no C compiler), routes **this project only** by
default, starts the proxy on demand and lets it exit when idle. `/context-guru:uninstall` undoes it,
restoring any base URL it replaced. The plugin installs with `--preset cache` — the prompt-cache
split and nothing else. (The proxy's own default is `house`; `--preset` is how you change it.)

Or by hand — a release binary is statically linked, **no Go and no C compiler needed** — or build
from source:

```sh
Expand Down
48 changes: 48 additions & 0 deletions context-guru-plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "context-guru",
"displayName": "context-guru",
"description": "Installs a local context-guru proxy, routes this project's Claude Code sessions through it, and reports what it saved. Reversible: /context-guru:uninstall removes the one settings key it adds and stops the proxy.",
"version": "0.1.0",
"author": {
"name": "rossoctl",
"url": "https://github.com/rossoctl/context-guru"
},
"homepage": "https://github.com/rossoctl/context-guru",
"repository": "https://github.com/rossoctl/context-guru",
"license": "Apache-2.0",
"keywords": [
"cache",
"cost",
"proxy",
"tokens",
"prompt-caching"
],
"userConfig": {
"port": {
"type": "number",
"title": "Proxy port",
"description": "Local port the proxy listens on. The port must be FIXED rather than negotiated: the ANTHROPIC_BASE_URL written into your settings and the session hook that starts the proxy have to agree, and a URL cannot be renegotiated after it is written. Default 8787 \u2014 deliberately not 4000, which collides with litellm.",
"default": 8787,
"min": 1024,
"max": 65535
},
"preset": {
"type": "string",
"title": "Preset",
"description": "Compaction pipeline. `cache` (the default) runs the prompt-cache split and NOTHING else: no content dropped, no markers, no extra tool, no model calls. `codesmart` adds the offloaders once you want them.",
"default": "cache"
},
"idle_exit": {
"type": "string",
"title": "Idle exit",
"description": "Exit the proxy after this long with no requests and no keep-alive ping pending, so nothing is left running on your machine. Must be at least 2x the store's entry lifetime (~5h34m at the default), because exiting clears in-memory cache state.",
"default": "24h"
},
"upstream": {
"title": "Upstream base URL",
"type": "string",
"default": "",
"description": "Forward to this Anthropic-compatible base URL instead of api.anthropic.com. Set it when something else is already the gateway \u2014 a hosted agent pod, a corporate gateway \u2014 so the proxy CHAINS behind it rather than replacing it. That gateway keeps holding the credential and, on at least one pod, rewriting model names: bypassing it sends model ids the real API has never heard of and every request fails. Empty means go straight to Anthropic."
}
}
}
26 changes: 26 additions & 0 deletions context-guru-plugin/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/check-proxy.sh",
"timeout": 30
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/start-proxy.sh",
"timeout": 60
}
]
}
]
}
}
Loading
Loading