ctx-agent-history-search

Searches local coding-agent session history with the ctx CLI for prior decisions and context.

Updated Oct 15, 2019
One-click install
npx skills add https://github.com/kkkaoru/dotfiles --skill ctx-agent-history-search-kkkaoru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ctx-agent-history-search
Source: https://github.com/kkkaoru/dotfiles/tree/main/.agents/skills/ctx-agent-history-search
Command: npx skills add https://github.com/kkkaoru/dotfiles --skill ctx-agent-history-search-kkkaoru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Past coding-agent sessions contain valuable decisions, failed attempts, commands, and user intent that are otherwise lost. This Skill retrieves that local history before acting, so current work builds on prior evidence instead of repeating mistakes. ## Core Features & Use Cases - Pre-work retrieval: Search prior sessions for decisions, commands, failures, and citations relevant to the current task using natural-language queries with filters like provider, workspace, file, and time range. - History research reports: Produce concise or long-form cited reports on a historical topic across multiple local agent sessions, with strict citation and privacy rules. - SQL fallback: Run read-only ctx sql queries over stable local views for counts, audits, and joins that plain search cannot express. - Use Case: Before refactoring a module, search past sessions for why a previous approach was abandoned, then cite the exact session and event IDs in your plan. ## Quick Start Ask the agent to search local coding-agent history with ctx for prior decisions about the current task before making any changes.

Frequently Asked Questions about ctx-agent-history-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search past coding agent sessions with ctx?

Run ctx search with a natural-language query, then add filters like --provider, --workspace, --file, or --since to narrow results. Inspect hits with ctx show event or ctx show session before relying on them.

How do I research a topic across multiple agent sessions?

Run several ctx search queries with varied wording, file names, error text, and decision terms, then inspect promising sessions and synthesize a cited report. Use --include-subagents when implementation details or failure traces live in delegated sessions.

When should I use ctx sql instead of ctx search?

Use ctx sql only for questions search cannot express, such as counts, joins, or audits over stable local views. It is read-only and does not refresh or migrate the index; broad transcript text search belongs in ctx search.

What if the ctx CLI is not installed or still indexing?

Install it with the official curl installer from ctx.rs, then let the initial indexing finish, possibly in the background or tmux. If ctx stays unavailable, state that local history search is unavailable rather than inventing results.

Does ctx search include the current active session?

In Codex, ctx excludes the active session tree by default when CODEX_THREAD_ID is set, so the current prompt does not dominate results. Use --include-current-session only when the active session itself is the target.