Install the ctx skill

Install the ctx agent-history search skill with the open skills installer.

Install the CLI first:

curl -fsSL https://ctx.rs/install | sh

Then install the ctx skill into your agent:

npx skills add ctxrs/ctx

The public ctx repo currently contains one skill, so no --skill flag is needed. The installer discovers ctx-agent-history-search and places it in the selected agent skill location.

Useful options

npx skills add ctxrs/ctx -g
npx skills add ctxrs/ctx --agent claude-code codex cursor
npm exec skills -- add ctxrs/ctx
pnpm dlx skills add ctxrs/ctx
bunx skills add ctxrs/ctx

Omit -g for a project install. Use -g for a global install. Use --agent when you want to target a specific harness.

Manual fallback

If you cannot use Node/npm, copy skills/ctx-agent-history-search from ctxrs/ctx into the skill directory supported by your agent, or give the agent this instruction:

Use ctx to search prior local coding-agent sessions before you answer or edit.

Run:
ctx search "<focused query>"

Search multiple terms:
ctx search --term "<term one>" --term "<term two>"

Inspect the best result:
ctx show event <ctx-event-id> --window 3
or:
ctx show session <ctx-session-id>

If retrieved history affects your answer, cite the ctx_event_id or
ctx_session_id and include the ctx command you ran.

Verify

Ask the agent for a short cited finding before it edits:

Search ctx for prior work on this area. Inspect the best event or session, tell
me which ctx ID you used, and explain whether that history changes your plan.

If ctx does not return a useful result, the agent should say that and continue from the current repository state.