/ccs:ccs optional: search queryfrom ccs
Full-text search across Claude Code, Claude Desktop, Codex, and Opencode sessions. Finds past conversations by content, lists recent sessions, and locates specific discussions.
Ships in ccs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Full-text search across Claude Code CLI, Claude Desktop, Codex, and Opencode sessions using ccs.
Binary ccs must be in PATH (installed via cargo install ccfullsearch or Homebrew brew install materkey/ccs/ccs).
Choose the mode based on context:
Use when the user wants to visually browse and pick a session. Launches ccs TUI in a terminal overlay popup.
${CLAUDE_PLUGIN_ROOT}/.claude/skills/ccs/scripts/launch-ccs.sh [query]
The script:
ccs pick in an overlay popupOutput format on selection:
session_id: <uuid>
file_path: <absolute path to .jsonl>
source: CLI|Desktop
project: <project name>
message_uuid: <uuid> # present for search results and tree view selections
host: <local|host name> # the machine the session lives on
Empty output (exit 1) means user cancelled.
If output is non-empty, parse the key-value pairs. Use AskUserQuestion to offer the user a choice:
Option 1: "Read here" — read the session in the current conversation context through ccs show, not by parsing the JSONL yourself (a Codex session may continue an earlier file, and ccs show stitches that history in):
ccs show <file_path> --tail 40 [--host <host>] # how the session ended
ccs show <file_path> --uuid <message_uuid> --context 20 [--host <host>] # around the picked message
Present a summary of the conversation (participants, topics, key decisions). The user can then ask follow-up questions about the session content without leaving the current conversation. Pass --host when host is not local: the file is on that machine.
Option 2: "Enter session (overlay)" — resume the session in a terminal overlay:
${SKILL_DIR}/scripts/launch-resume.sh <session_id> --file <file_path> [--uuid <message_uuid>] [--host <host>]
This runs ccs resume in a tmux popup / kitty overlay / wezterm split-pane. ccs picks the agent (Claude, Codex or Opencode), the project directory, and the branch at message_uuid; with a host other than local the session opens on that machine over ssh. Blocks until the session exits, then returns control here.
For Desktop sessions (source: Desktop): overlay resume is not available, only "Read here" and open -a Claude are options.
The retrieval flow is search → show → answer.
ccs search "<query>" --limit 20 [--regex] [--host local]
Output is JSONL: one {"type":"match",...} line per result, then always a final {"type":"summary",...} line.
Search covers this machine and every remote host in [[hosts]] of ~/.config/ccs/config.toml (or CCS_HOSTS), waiting up to 5 s for hosts. --host narrows it, repeatable: local, remote, a host name, or all (default). Use --host local when only this machine matters — it skips the wait.
Match fields:
| Field | Description |
|---|---|
host | local or the remote host the session lives on |
session_id | Session ID |
project | Project name extracted from path |
provider | Claude, Codex, or Opencode |
source | CLI or Desktop |
file_path | Path to the session file (for Opencode: <db>#<session_id>) |
line_number | 1-based line in the JSONL file; null for Opencode |
message_uuid | Message UUID; for Opencode this is the SQLite message id |
timestamp | ISO 8601 timestamp of the message |
role | user or assistant |
content | Snippet around the match (~200 chars each side) |
Summary line:
{"type":"summary","shown":20,"total_matches":2721,"sessions":24,"truncated":true,"hosts":[{"name":"local","status":"ok","shown":15},{"name":"Z270XX","status":"ok","shown":5}]}
shown: 0 means no matches. truncated: true means the result set is incomplete. hosts says how each machine answered: ok, down, incompatible (old ccs there) or timeout, with error explaining a failure — say so when a host did not answer.
The snippet identifies the session; to answer the user's question, read the surrounding messages:
ccs show <file_path> --line <line_number> [--context K] [--max-chars M] [--host <host>]
Pass the match's host as --host when it is not local: the file is on that machine.
For Opencode matches line_number is null — anchor by uuid instead:
ccs show <file_path> --uuid <message_uuid>
Output is JSONL: {"type":"message",...} rows in file order (the target carries is_target: true, truncated rows carry content_truncated: true), then a final {"type":"summary",...} with session_id, provider, project. Defaults: 3 messages before/after, 2000 chars per message — a few KB total.
Every row carries the file_path it comes from. A Codex thread that was reverted or forked continues an earlier rollout file; its history includes that file's prefix, and rows whose file_path differs from the summary's are that inherited part.
Note: near a fork of a branched session the window can mix branches; parent_uuid on each row shows the actual chain.
Without --line/--uuid, ccs show prints the end of the session: the last --tail messages (default 10) of its current line. The target can be a session id instead of a path:
ccs show <session_id> --tail 10 [--host <host>]
For a Codex thread the id resolves to its newest rollout file; for a branched Claude session the tail follows the latest branch. The summary has "mode": "tail" and total_messages. A host running an older ccs rejects --tail; say that ccs needs updating there.
Cite project and timestamp from the match. Say if the result set was truncated.
shown: 0 — try 2-3 query variants: a shorter phrase, a synonym, or --regex for patterns like "OOM|OutOfMemory".truncated: true — narrow the query (more specific phrase) before raising --limit.--context / --tail / --max-chars.--full-content on search is a last resort: tool outputs can make single results hundreds of KB.ccs list [--limit N] [--host local]
Default limit: 50 sessions, sorted by last activity (newest first). Fields: host, session_id, project, provider, source, file_path, last_active, message_count. --host works as in search.
ccs pick [query] [--output=/path/to/file]
Opens TUI picker, outputs selection in key-value format. Exit 0 on selection, exit 1 on cancel.
ccs
Launches full interactive TUI with search, navigation, tree view, and session resume.
ccs search "configuration cache" --limit 20
# pick the most relevant match, then:
ccs show /path/to/session.jsonl --line 381 --context 3
ccs show 01a178da-2e05-7720-b6ba-6b4edd17fc27 --tail 10
No search needed when the user gives the session id. Raise --tail to see more of the ending.
After finding a session in search/list output, resume it by its file_path:
ccs resume --file <file_path> [--uuid <message_uuid>] [--host <host>]
ccs starts the right agent in the session's project directory; --uuid resumes from that message (a fork if it is not the latest one), --host runs it on the remote host the session lives on. Plain claude --resume <session_id> only finds Claude sessions of the current project.
project field helps identify which project a session belongs toWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub materkey/ccfullsearch --plugin ccs