hve4638/cc-toolkit/chatrec
Claude Code and agent skill by hve4638/cc-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Query and extract the current Claude Code session transcript by turn (count/search/clip/filter)
Install
npx vskill@latest install hve4638/cc-toolkit/chatrecSKILL.md
The same SKILL.md was published earlier as hve4638/cc-toolkit/chatrec.
<chatrec_instruction>
chatrec
Query the current session's transcript (the .jsonl log on disk) through the chatrec CLI. Locate a range, then extract just it — never load the whole transcript into context.
Work from chatrec's output, not in-context memory: a long session may have been summarized, so the file is the complete record while memory is lossy.
Invoke
chatrec is on PATH (core exposes its bin/). If it is not found, fall back to:
It finds this session via $CLAUDE_CODE_SESSION_ID (cwd-independent → works in worktrees). First use builds an auto-cached slimmed copy; later calls reuse it (rebuilt only when the transcript has grown).
To target a different transcript (any command): --session <id> finds that session's .jsonl anywhere under ~/.claude/projects/; --source <jsonl> reads an arbitrary transcript file directly. Caches don't clash — sessions key by id, sources by path.
Records (flat jsonl, 4 roles)
t = turn number (user-utterance ordinal). Content is preserved in full; thinking, attachments, and injected context are dropped.
Commands
| command | output | |
|---|---|---|
chatrec count | total turns + role counts | |
chatrec search [pat] [filters] | matching turns → T<t> <role> <snippet> | |
chatrec clip <from> [to] | records of that turn range (jsonl) | |
chatrec filter [filters] | filtered records (jsonl) |
Filters (search·filter): --role user,assistant,tool_call,tool_result · --tool Bash,Read · --match "text" · --from N --to M · --invert.
clip/filter are jsonl→jsonl, so pipe them: chatrec clip 4 8 | chatrec filter --tool Bash. Add --out <file> to write a file instead of stdout.
Workflow
chatrec count— gauge size.- Map the request to turns:
chatrec search "X"(or--tool/--role) → matchingT<t>. - Extract just that range:
chatrec clip <from> <to>, narrowing withfilter/pipe as needed. - Produce the deliverable:
- "extract X" → the cleaned records of that range.
- "what went wrong in X" → analyze that range and answer.
- Write the result to a file and report its path (the user wants a file, not only chat output).
Keep outputs small — search snippets and narrow clips, never the whole transcript. The current turn (this call) may not be flushed yet, so target work that already happened. </chatrec_instruction>
$ARGUMENTS
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcore/skills/chatrec/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hve4638/cc-toolkit/chatrec)