conversation-history-sparse
Sparse conversation history triage for current repo/worktree using ~/.claude/projects and ~/.codex/sessions with strict context budgets.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- type
- analysis
- scope
- project
- description
- Sparse conversation history triage for current repo/worktree using ~/.claude/projects and ~/.codex/sessions with strict context budgets.
03 SKILL.md 正文
Conversation History Sparse
Purpose
Infer what the current directory/worktree/branch has been doing by sampling only high-signal history from:
~/.claude/projects~/.codex/sessions
Use this skill when you need orientation, forensic context, or session continuity without loading full transcripts.
Hard Limits
- Never
catfull history files. - Prefer metadata and first/last small samples.
- Default sample budget:
- At most 3 candidate files per source.
- At most 3 user prompts per file.
- At most 200 chars per prompt.
- Exclude assistant thinking/tool payload blobs unless explicitly required.
Workflow
1) Establish local git intent first
git branch --show-current
git log --oneline -n 8
gh pr view --json number,title,headRefName,baseRefName,state,url
2) Find exact Claude project folder for cwd
find ~/.claude/projects -maxdepth 1 -type d | rg "worktree[-_]$(basename "$PWD")|$(basename "$PWD")"
find ~/.claude/projects -type f -name '*.jsonl' -print0 | \
xargs -0 rg -n --max-count 20 --fixed-strings "\"cwd\":\"$PWD\"" 2>/dev/null
3) Sample Claude prompts only (sparse)
Use a small parser to print:
- newest 2-3 JSONL files
- first 3 user prompts per file (truncated)
Do not print full JSONL lines.
4) Find matching Codex rollout sessions for cwd
python3 - <<'PY'
from pathlib import Path
import os
cwd = os.getcwd()
files = []
for p in Path.home().glob(".codex/sessions/*/*/*/rollout-*.jsonl"):
try:
with open(p, "r", encoding="utf-8") as f:
if cwd in f.readline():
files.append(p)
except Exception:
pass
for p in sorted(files, key=lambda x: x.stat().st_mtime, reverse=True)[:3]:
print(p)
PY
Then sample only recent user messages from the newest file.
5) Synthesize result
Return:
- Current branch/PR intent from git.
- Recent request themes from Claude history.
- Recent request themes from Codex history.
- One concise statement: "This worktree appears focused on X because Y+Z evidence."
Output Template
Branch/PR:
- ...
Claude history (sparse):
- ...
Codex history (sparse):
- ...
Inference:
- ...
Safety
- Read-only operations only.
- Do not modify
~/.claude/projectsor~/.codex/sessions. - Keep excerpts short to avoid pulling excessive context into the session.
04 同仓库更多 Skills
instinct
Use when the user invokes /instinct or /in, or asks to "message Instinct", "ask Instinct", "tell Instinct", "check Instinct", or read replies from the configured peer assistant. iMessage first, WhatsApp Web as fallback.
hr
Compatibility alias for history-resume; produce the same fresh-state, provenance-aware resume briefing.
history-resume
Resume briefing for the current repository branch or worktree using fresh state and admitted history sources.
grok
Alias for the canonical grokbot browser conversation workflow; /grok talks to the Grok bot the same way /dot talks to Dot.
codexa-bench
Compare `codexa` and normal `codex` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.