by ctxrs
Instant recall for coding agents. Search the history already on your machine. Git blame, but for agent sessions.
# Add to your Claude Code skills
git clone https://github.com/ctxrs/ctxLast scanned: 7/3/2026
{
"issues": [
{
"file": "README.md",
"line": 17,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://ctx.rs/install | sh\"",
"severity": "low"
},
{
"file": "plugins/ctx-agent-history-search/skills/ctx-agent-history-search/SKILL.md",
"line": 25,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://ctx.rs/install | sh\"",
"severity": "medium"
},
{
"file": "skills/ctx-agent-history-search/SKILL.md",
"line": 25,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://ctx.rs/install | sh\"",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-07-03T07:19:39.753Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}ctx is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ctxrs. Instant recall for coding agents. Search the history already on your machine. Git blame, but for agent sessions. It has 1,032 GitHub stars.
Yes. ctx passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ctxrs/ctx" and add it to your Claude Code skills directory (see the Installation section above).
ctx is primarily written in Rust. It is open-source under ctxrs on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ctx against similar tools.
No comments yet. Be the first to share your thoughts!
ctx is an open-source CLI for fast local search across your past coding agent sessions. You can search messages and tool calls across agents and sessions, then jump straight to the exact event or full transcript for any result.
ctx pro is a paid add-on for “git blame, but for agent sessions.” Take any line, file, commit, or PR and surface the original transcript of the agent session that produced it. Your agents can use that transcript to recover why the code was written that way, including the decisions, assumptions, and tool calls from the original session.
Coding agents have git history, but their own session transcripts and tool call records remain sequestered away in verbose log files. Those log files are a treasure trove of useful data, but they aren't accessible in a legible format for agents.
If you give your agents fast, easy access to search and retrieve these transcripts, your agents can:
That means less repeated agent work, lower token spend, and better task outcomes because each new session can use the history already on your machine.
ctx also understands how parent sessions, subagents, and forks relate to one another, so agents can recover the whole chain of work no matter how aggressively you orchestrate.
This is different from “agent memory,” which usually compacts what happened into facts or summaries that can become stale. ctx gives agents instant recall of the real record without a lossy memory step.
macOS and Linux:
curl -fsSL https://ctx.rs/install | sh
Windows PowerShell:
irm https://ctx.rs/install.ps1 | iex
or prompt your agent:
Please install and set up ctx CLI (see github.com/ctxrs/ctx)
By structuring agent history into sessions, events, metadata, and indexed fields, then returning ranked cited matches, agents can access meaningful history with far fewer tokens than raw search. Results vary by query and corpus, but raw search is often so token-heavy that it can be effectively the same as not having usable history.
git blame tells you which commit last changed a line. ctx blame tells you which agent session produced that commit, with exact citations back to the original transcript and recorded tool calls.
Agents use ctx blame to recover context that no longer exists anywhere near the current session. Starting from a file, line range, commit, or PR, they can find the relevant historical agent sessions and recover the decisions, constraints, failed approaches, and assumptions recorded there.
This helps agents:
Every attribution includes citations back to the original transcript and tool calls. If the session is not on your machine (for example, because a teammate’s agent produced the code), ctx says it cannot prove the attribution.
# Your agent is investigating why customized cart items
# are disappearing from your e-commerce app.
$ ctx blame file src/checkout.ts --lines 118:146
# ctx blame finds the agent session that produced those lines:
# Lines 118–146
# commit 8f3c2a1
# Produced by
# session c0297b8a-2ad7-4f73-a826-8ee9387cd1f4
# evidence [1] [2]
# Your agent opens the transcript of the session that produced the offending commit
$ ctx show session c0297b8a-2ad7-4f73-a826-8ee9387cd1f4
# Previous agent — transcript excerpt
"Some responses contain multiple cart lines with the same product_id.
I'm treating those as duplicates and merging them before calculating the total."
# Your agent finds the mistake
"FOUND IT: The previous agent treated matching product_ids as duplicate cart lines.
Customized items can share a product ID, so that merge drops valid items."
ctx blame can also start from a commit or PR:
ctx blame commit <sha>
ctx blame pr https://github.com/your-org/your-repo/pull/42
Like ctx indexing and search capabilities, blame runs locally, so your code and history never leave your machine.
ctx pro is $20 USD per month, but you can try it for free for two weeks with no account or credit card required.
New to ctx? Install ctx. Eligible fresh interactive installs start the free ctx pro trial automatically.
Already use ctx? Set up pro:
ctx pro
Learn more about ctx pro, including supported inputs, local privacy, pricing, and the free trial.
Your past coding agent sessions already live on your machine, usually in JSONL files or SQLite databases under directories such as ~/.claude and ~/.codex.
ctx setup discovers those sources and reads them without modifying them. It converts each provider’s format into consistent local records for sessions, messages, tool calls, relationships, and repository activity, then stores and indexes those records locally.
ctx does not require hooks or any code running inside the agent process. After setup, a local background daemon watches the history sources your agents already write and keeps the index current as they change. Each update is completed before it becomes visible, so commands never read a partially built index.
Every session and event receives a stable ctx ID and retains its complete transcript content and source information. ctx search finds the relevant history, ctx show retrieves the exact event or full transcript, and ctx locate identifies where it came from. Semantic search and ctx pro use those same records.
# Index all of your existing local agent sessions
ctx setup
# Your agent can search prior work with normal language
ctx search "failed migration"
# Search sessions and events that touched a file
ctx search --file crates/foo/src/lib.rs
# Or search multiple terms
ctx search --term "failed migration" --term rollback --term "cursor rename"
# Results include matching sessions, snippets, and ctx IDs
# evt_01h... ses_01h... codex "migration expected the old cursor name" ...
# Print the matching part of the old transcript
ctx show event <ctx-event-id> --window 3
# Or print a compact transcript of the original session
ctx show session <ctx-session-id>
ctx does not send your prompts, transcripts, or indexed history to a cloud service, call model APIs, require API keys, or write into your source repositories. Transcript text is preserved rather than automatically redacted, so review copied output before sharing it outside your machine.
For the full pipeline, see How ctx works. For a quick first run, see Quickstart.
ctx is written in Rust, but that's not the main reason why it's fast. Instead of ingesting your history into a local relational database like SQLite, ctx scans it with parallel workers and writes searchable records directly to Tantivy. That removes an entire database ingest step while still supporting structured filtering and complete record retrieval.
Tantivy builds the index in parallel. It creates a compact map from each term to the records containing it, searches memory-mapped segments without loading your entire history into memory, and ranks the results with BM25. The same index stores the complete record for every result, so ctx search, ctx show, and ctx locate can read it without a second database or reopening and reparsing the original agent logs.
In our benchmark, this was 16x faster than ctx's previous optimized SQLite implementation.
Semantic search takes a similarly direct approach. ctx embeds your history locally with multilingual-e5-small and stores the vectors in memory-mapped flat-F32 segments. At the scale of personal agent history, scanning those vectors exactly is fast, so there is no vector database or approximate HNSW graph to build, tune, or maintain.
| Category | Starts from | Answers |
|---|---|---|
| Agent memory (Mem0, Zep) | Extracted facts, summaries, conversation-derived memories, or graph nodes | “What should the agent remember?” |
| Codebase intelligence (Graphify, Sourcegraph) | The current repository's code, symbols, documents, and relationships | “What is in this codebase, and how does it fit together?” |
| Coding-agent history and provenance (ctx) | Original sessions, messages, tool calls, and local Git history | “What actually happened, and which session produced this code?” |
ctx gives coding agents exact recall of prior work. They can search the original history, retrieve the cited transcript or tool call, and use ctx pro to map a line, file, commit, or PR back to the session that produced