Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@muthuishere/ctx-optimize

Latest version: v0.18.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: muthuishere
2 Stars
2 Forks
10 Versions
1.1K Downloads
Go Repo language

Scan summary

@muthuishere/ctx-optimize was last scanned on 29 Nov 2026 at version 0.18.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 10 versions; the latest 4 were published within 7 days (23–29 Nov 2026).
  • Findings: No rules fired in version 0.18.0.
  • Downloads: 1,061 downloads.

Versions

10 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.18.0 LATEST 29 Nov 2026 No rules fired
0.17.0 24 Nov 2026 No rules fired
0.16.1 23 Nov 2026 No rules fired
0.16.0 23 Nov 2026 Not shown
0.15.5 1 Oct 2026 Not shown

No rules fired in 0.18.0

Findings

Findings for v0.18.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.18.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

ctx-optimize

CI npm license Discord

muthuishere.github.io/ctx-optimize — docs, demos, benchmarks, and the use-case tour. Releases & changelog — what shipped in every version, newest first.

Know what breaks before you change it.

One static Go binary gathers a repo — and, via native sources, its databases, buckets, queues and APIs — into a local knowledge graph your agent answers from in one call instead of a grep-and-read chain. On a graded benchmark it answered 79% of "what calls this / what breaks if I change this" questions correctly, against 29% for a grep-armed agent. It indexes the linux kernel — 84,300 files — in about a minute (61 s median on v0.15), and is the only one of the four tools we tested that produces a usable kernel graph at all. Deterministic: no LLM, no embeddings, no database, no MCP, no credentials at rest. The only intelligence in the system is the agent you already run.

Where it does not win: ripgrep is faster at finding a string and better at "where is X" (47% vs 42%), and CodeGraph answers free-text kernel queries about 4× faster than we do (0.86s vs ~3.6s, measured side by side on 2026-08-16) — though on five kernel questions its top hit was useful 0 times to our 4. Numbers for all of it in Proof.

Why

  1. Best at impact questions — 79% vs 29% (grep) and 42% (graphify) on 8 graded "who calls this / what breaks" questions, 3 runs, n=36 per arm. Zero false claims and zero empty answers, in 15 tool calls per run against grep's 42.7. Full method + failures.

  2. The agent finishes sooner even though each query is slower — ripgrep answers a single lookup faster than we do (2.06s for rg on one kernel symbol against 2.96s for our free-text query, same machine, 2026-09-10). But an agent does not make one call: on the graded run it made 42.7 tool calls per question with grep against our 15.0 — grep, read a file, grep again, chase a caller, re-read. End to end it finished in 40.1s with ctx-optimize against 65.5s with grep, 1.6x faster overall, and answered 67% correctly against 35%. Per-call latency is not the unit; the question is.

  3. Fastest to build, by a wide margin — linux v6.9 in 118.18s vs CodeGraph's 289.86s and graphify's 527.72s; GitNexus did not finish in 45 minutes. Those four were measured together, when our gather still generated the markdown wiki (off by default since v0.12); re-measured alone on v0.15 our kernel gather is 61.2s median. The competitors were not re-run, so no newer ratio is claimed. A 1,476-file repo in 0.648s vs 5.123s / 1.323s / 10.649s. And the graph is the most complete: 2,849,719 nodes in 2.0GB, against CodeGraph's 1,838,442 in 4.1GB.

  4. Instant symbol lookup — card on the kernel resolves an exact symbol in under 20ms (it was 1.8s), via a plain-text index that is 20% of the graph. Since v0.15.2 affected answers a blast radius from the same index: 3.5s → 7-95ms on ordinary kernel walks, byte-identical output. Fuzzy and ambiguous names still cost a full scan, deliberately: they rank against every node, and refusing to guess is the point.

  5. Complete answers, not pointer lists — card returns signature + doc + callers/callees with file:line, so the agent doesn't reopen the file. change-plan composes the whole "I'm about to edit X" answer — callers, blast radius, which tests to run — in a single call. What we measured and kept: impact-answer correctness, onboarding traces, wall time. What we measured and dropped: token savings — Claude Code −0.2%, Codex +3.0%, so we don't claim it (CRITIQUE.md).

  6. It maps the edges of the system, which no other tool we benchmarked does — boundaries answers "what does this call out to, and what does it expose" in one command: external hosts, env vars with credentials flagged by name, spawned binaries, exposed routes — each with file:line. graphify, CodeGraph and GitNexus model none of it.

    $ ctx-optimize boundaries
    boundaries: 76 ports
    
    CONSUMES (what this system calls out to)
      config.env     30 · 30 external · 1 SENSITIVE · 3 dynamic
          OPENROUTER_API_KEY     INFERRED   SECRET  proof/agent/agent.mjs:L28 (+1 sites)
      network.http   17 · 17 external
          api.github.com         INFERRED    internal/app/app.go:L3149
      process.exec   12 · 12 external · 7 dynamic
          git                    AMBIGUOUS   internal/app/githistory_cli_test.go:L28 (+13 sites)
    
    PROVIDES (what this system exposes)
      network.http   17
          /api/graph             INFERRED    internal/dashboard/dashboard.go:L119
    
    UNRESOLVED  10 port(s) carry a dynamic identifier — os.Getenv(varName) and
                friends. The SITE is certain, the value is not.

    Read the tiers: a port list is a floor, not a census. config.env is INFERRED and process.exec is AMBIGUOUS because os.Getenv(varName) and exec.Command(bin) hide the value behind a variable — we report the site and refuse to invent the name. Two more limits worth stating: scope says internal or says nothing — there is no external value, because the join that would prove one compares consumed HOSTS against provided ROUTE PATHS and so has no input on the default rules; absence means "not proven internal", never "third-party". And query cannot retrieve these — use boundaries or nodes --kind port. --json carries the otel.* keys under their OpenTelemetry semconv names, so a static boundary joins a runtime trace on the same key.

  7. Your infrastructure goes in the graph too — databases, buckets, queues and APIs enter by env-var name; the value is a URL and its scheme picks the connector. Nine of them: postgres · mysql · mongodb · redis · kafka · nats · s3 · mssql · openapi. The secret value is never read into config, stored, or printed. docs/sources.md

    export BILLING_DB_URL='postgres://reader:$PG_PASS@db.internal:5432/billing'
    ctx-optimize add BILLING_DB_URL      # same door for s3, kafka, mongo, redis, nats, mssql, openapi
  8. Extensible without a fork — languages are drop-in tree-sitter grammar packs (12 embedded, languages add builds any other), external systems are dropped scripts through one validated JSON door, and the remote is your script. The store is plain sorted ndjson at ~/ctxoptimize/<repo>/ — diffable, portable, greppable.

Install

Already in Claude Code, Codex or Copilot? Paste this and it does the setup:

Install ctx-optimize for this repo and set yourself up to use it:
1. npm install -g @muthuishere/ctx-optimize
2. cd into the repo root and run: ctx-optimize up
3. run: ctx-optimize install --claude     (or --codex / --copilot, or plain
   `install` for every agent CLI you detect)
4. run: ctx-optimize init                 (writes the committed pointer block
   so my teammates' agents inherit it too)

From now on answer my code questions with its verbs — query, card,
change-plan, affected, boundaries — instead of grep-and-read, and cite the
file:line it returns.

Every line is a command you could have typed. No curl | sh, nothing behind a shortener: you can read what will run before an agent runs it.

The skill is always installed globally (~/.claude/skills/ or ~/.agents/skills/) with a session hook; the agent flag only picks which agent gets wired up. The one optional piece is the always-on rule added to your global ~/.claude/CLAUDE.md / ~/.codex/AGENTS.md — that is what makes an agent reach for the store unprompted. ctx-optimize uninstall removes all three. Only init touches the repo, and it writes files meant to be committed.

By hand:

npm install -g @muthuishere/ctx-optimize     # prebuilt binaries, macOS/Linux/Windows
go install github.com/muthuishere/ctx-optimize/cmd/ctx-optimize@latest   # or from source

ctx-optimize install     # skills + hooks for every agent CLI it detects
ctx-optimize update      # binary + skills + hooks; network only when YOU run it

ctxo is the short form: every command works as ctxo <verb> (same binary). npm installs it with the package; for a release binary or go install, ctx-optimize install creates it beside the binary (a symlink on macOS/Linux, ctxo.cmd on Windows).

Shrink what your agent reads (optional, off by default)

ctx-optimize config input-compress on   # big tool results and images shrink before the model sees them; installs the hooks

Claude Code and Devin CLI, v0.18.0 or later. Compression, images and switches.

Quick start

ctx-optimize up                        # the only onboarding verb: bootstraps config,
                                       # pulls the team store or gathers. Idempotent.
ctx-optimize query "refund flow"       # complete, citable hits under a token budget
ctx-optimize change-plan RefundService # callers + blast radius + which tests to run
ctx-optimize serve                     # → 127.0.0.1:4747, embedded dashboard, zero external requests

What you ask it

You want to… Verb
find something by intent query "<terms>"
inspect one symbol (signature, doc, callers, callees) card <symbol>
edit safely — callers, impact, tests, co-change change-plan <symbol>
blast radius of a change affected <symbol>
how are these two connected path <a> <b>
why does this node exist / where from explain <node>
the load-bearing symbols hubs
chain several of the above in one process, return only the filtered answer (import a shipped recipe: ctx:edit, ctx:find, ctx:impact, ctx:orient) code run - --input ... --json (docs/cli.md)
what this calls out to & exposes — hosts, env vars, secrets, spawned binaries, routes boundaries
list & filter without jq nodes --kind K · edges --relation R · deps --scope dev
add a database / bucket / queue / API add BILLING_DB_URL
feed anything else in <your-script> \| add --json -
re-gather code only / run adapters only sync · adapters run [name]
is my store trustworthy right now fresh · status --json
share it with the team remote push / remote pull
combine or dump the graph merge a b --into all · export --format dot
a human-readable wiki of the codebase wiki
browse it serve
(optional, off by default) check a configured ToolNexus decision / completion model model status · model test decision (docs/model.md)

Full reference with when-and-why for each: docs/cli.md.

Proof

Apple M5 Pro (18 cores, 48 GB). ctx-optimize on the build that became v0.13.0, graphify 0.9.12, CodeGraph 1.5.0, GitNexus 1.6.9, ast-grep 0.45.0, ripgrep 15.2.0. Each tool on its own fastest deterministic path, no LLM anywhere. Cold gather best-of-3, query median-of-5.

corpus ctx-optimize CodeGraph graphify GitNexus
linux v6.9 · 84,300 files 118.18s / 4,039ms 289.86s / 880ms 527.72s / 22,799ms* did not finish (>45 min)
graphify-src · 1,476 files 0.648s / 27ms 1.323s / 101ms 5.123s / 373ms 10.649s / 779ms
ctx-optimize-src · 409 files 0.326s / 12ms 0.762s / — 1.352s / 120ms 12.85s / —
flask · 344 files 0.314s / 12ms 0.438s / 102ms 0.845s / 106ms 6.355s / 794ms
gin · 253 files 0.342s / 11ms 0.593s / — 0.777s / 110ms 7.56s / —

Kernel gather on v0.15, re-measured alone on 2026-09-09: 61.2s median (60.13 / 61.17 / 63.24, byte-identical output). The 118.18s row above was taken when our gather still built the markdown wiki; the other columns were not re-run alongside, so the row is kept as recorded rather than mixed with a newer number.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @muthuishere/ctx-optimize

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229