Best for
- Use when prior agent sessions may contain relevant insights, decisions, attempts, or transcript context.
ctxrs/ctx/skills/ctx-agent-history-search/SKILL.md
Use ctx to search local coding-agent history before acting. Use when prior agent sessions may contain relevant insights, decisions, attempts, or transcript context.
Decision brief
Use ctx whenever you need to reference previous coding-agent sessions. Those transcripts can contain user intent, decisions, previous work timelines, past attempts, and what worked or failed.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/ctxrs/ctx --skill "skills/ctx-agent-history-search"Inspect the Agent Skill "ctx-agent-history-search" from https://github.com/ctxrs/ctx/blob/103c0105645cc02c730f98eba2831fba854d3569/skills/ctx-agent-history-search/SKILL.md at commit 103c0105645cc02c730f98eba2831fba854d3569. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Confirm ctx is ready when starting from a cold context:
Require the ctx CLI to be installed and set up. If it is missing and
Use ctx sql only when normal search cannot express the question, such as counts, joins, audits, or scripts over stable local views. Do not use SQL for broad transcript text search; ctx search is built for that.
When asked to research a historical topic, stay read-only unless the user also asks for edits. The agent writes the report; ctx only retrieves local source material.
Cite ctx material when it affects your answer or implementation.
Permission review
The documentation includes network, browsing, or remote request actions.
curl -fsSL https://ctx.rs/install | shEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 976 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use ctx whenever you need to reference previous coding-agent sessions. Those transcripts can contain user intent, decisions, previous work timelines, past attempts, and what worked or failed.
Use this skill in two modes:
Require the ctx CLI to be installed and set up. If it is missing and
installing tools is appropriate for the task, install it with:
curl -fsSL https://ctx.rs/install | sh
First setup can take time while ctx indexes past sessions. If needed, keep it running in the background or in tmux, or wait for it to finish.
If ctx remains unavailable, say local history search is unavailable and do not invent results.
Confirm ctx is ready when starting from a cold context:
ctx status
ctx sources
Use ctx status --format json or ctx sources --format json only when a script needs
exact fields.
Search with normal language first. Add terms or filters when useful:
ctx search "<query>"
ctx search "<query>" --refresh off
ctx search "<query>" --provider codex
ctx search "<query>" --workspace <workspace>
ctx search "<query>" --file <path>
ctx search "<query>" --since 30d
ctx search "<query>" --term "<related term>" --term "<error text>"
ctx search "<query>" --session <ctx-session-id>
ctx search "<query>" --verbose
Use default text output for agent reading. Do not add --format json for
search, show, or locate unless you are piping it into jq or a script, or
you need exact machine-readable fields. JSON output is much larger and can
quickly consume the context window.
When the prompt asks for a topic history or report across multiple sessions,
run several ctx search queries with different wording and filters to find
promising sessions. Use scoped
ctx search "<query>" --session <ctx-session-id> when a session looks
relevant and you need dense event-level matches from that session.
Default search returns primary-agent sessions so human intent and decisions
stay prominent. Use --include-subagents when implementation details, code
review notes, test output, or failure traces from subagent sessions are
likely to matter.
Use --verbose when you need full ctx IDs, provider IDs, citations, and
copyable follow-up commands without switching to JSON.
You can write a session transcript to a temporary file, check the file size, and then read the relevant parts:
ctx show session <ctx-session-id> --format markdown --out /tmp/ctx-session.md
wc -c /tmp/ctx-session.md
In Codex, ctx excludes the active session tree by default when
CODEX_THREAD_ID is available, so the current prompt and subagents do not
dominate historical retrieval. Use --include-current-session only when the
active session tree is the target.
Inspect relevant results before relying on them:
ctx show event <ctx-event-id> --window 5
ctx show session <ctx-session-id>
Locate original provider material when source identity or resume hints matter:
ctx locate event <ctx-event-id>
ctx locate session <ctx-session-id>
Write a transcript of relevant sessions when you, the human, or another agent needs a file:
ctx show session <ctx-session-id> --format markdown --out <output-path>
Use ctx sql only when normal search cannot express the question, such as
counts, joins, audits, or scripts over stable local views. Do not use SQL for
broad transcript text search; ctx search is built for that.
Start with the bundled SQL docs:
ctx docs show sql
ctx docs search "stable views"
Common SQL examples:
ctx sql "SELECT provider, COUNT(*) AS sessions FROM ctx_sessions GROUP BY provider"
ctx sql "SELECT event_type, COUNT(*) AS events FROM ctx_events GROUP BY event_type ORDER BY events DESC"
ctx sql "SELECT path, provider, provider_session_id FROM ctx_files_touched WHERE path LIKE '%AGENTS.md%' LIMIT 20"
ctx sql is read-only and queries the existing index. It does not refresh,
import, initialize, or migrate ctx storage.
When asked to research a historical topic, stay read-only unless the user also asks for edits. The agent writes the report; ctx only retrieves local source material.
Restate the topic, scope, and desired length if the prompt is ambiguous. Prefer concise reports by default; use a longer report when the user asks for chronology, alternatives, or detailed evidence.
Run several targeted searches. Vary query terms across user wording, file or
module names, error text, commands, branch names, and decision terms. Start
with ctx search "<topic>", then broaden with --term or narrow with
--workspace, --provider, --file, --since, or
--session <ctx-session-id>.
Use --include-subagents when reviews, implementation attempts, test output,
or failure traces are likely to live in delegated sessions. Add
--refresh off when the report must not update the local ctx index.
Inspect focused sources before drawing conclusions. Prefer ctx show event
for a hit plus nearby turns, and ctx show session when the whole session
arc matters:
ctx show event <ctx-event-id> --window 5
ctx show session <ctx-session-id>
Use full or log mode only when default output omits necessary evidence.
Compare evidence across sessions. Note agreements, conflicts, stale results, missing raw sources, and gaps where searches did not find evidence.
Produce the report as agent synthesis with citations.
Concise report shape:
Long report shape:
jq, or
exact field extraction, and keep JSON outputs small.~/.ctx, provider transcript paths, and JSON output as private local
history unless the user explicitly asks to share reviewed excerpts.Alternatives
event4u-app/agent-config
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
K-Dense-AI/scientific-agent-skills
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
affaan-m/ECC
Use it for engineering and operations tasks; the detail page covers purpose, installation, and practical steps.