スキル一覧に戻る
jasonkuhrt

thread-search

by jasonkuhrt

Tool configurations

1🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: thread-search description: Search Claude Code conversation history. Use when user asks "where did I discuss X", "when did we talk about X", "find the conversation about X", or wants to continue previous work.

Thread Search

Search and analyze Claude Code conversation history.

For storage internals (sessions-index.json, /rename scope, path encoding): See cc-internals skill.

Quick Reference

FactValue
Threads location~/.claude/projects/<encoded-path>/
Thread formatJSONL (one JSON object per line)
Main threads<uuid>.jsonl
Subagent threadsagent-<hash>.jsonl

Tool Selection

TaskUse ThisNOT This
Pattern searchCC Grep toolrg via Bash
Read filesCC Read toolcat via Bash
Find filesCC Glob toolfind via Bash
JSON extractionjq via Bash(no CC equivalent)

Why CC tools: Better permissions, structured output, error handling. Why Bash for jq: No native JSONL parsing in CC.

JSONL Message Structure

{
  "type": "user" | "assistant" | "summary",
  "timestamp": "<ISO-8601>",
  "message": { "content": [{ "type": "text", "text": "..." }] },
  "uuid": "<uuid>",
  "sessionId": "<uuid>"
}

Search Approach

Step 1: Use CC Grep tool to find matching threads

Grep pattern="X" path="~/.claude/projects/" output_mode="files_with_matches"

Step 2: Use Bash + jq for JSON extraction

jq -c 'select(.type=="user") | select(.message.content[].text | test("pattern";"i"))' file.jsonl

Step 3: Use CC Read tool to examine specific thread content

Query Workflows

"Where did I discuss X?"

  1. Grep tool → find matching thread files
  2. Decode paths to project names
  3. Bash + jq → extract first timestamp + context
  4. Report: project, thread ID, date range, snippet

"When did we discuss X?"

  1. Grep tool → find matching files
  2. Bash + jq → extract timestamps from matches
  3. Report: timeline grouped by date/project

"Continue work on X"

  1. Grep tool → find threads mentioning X
  2. Read tool → examine most relevant thread
  3. Analyze: goal, accomplishments, pending items, decisions
  4. Generate continuation prompt (see template below)

Continuation Prompt Template

Continuing work from [date] on [project]:

## Original Goal
[from first user message]

## What Was Done
- [accomplishments]
- [files changed]

## Pending
- [incomplete items]

## Key Decisions
- [choices that carry forward]

## Resume Point
[specific next task]

jq Patterns

# Decode project path (inline)
echo "-Users-foo-bar" | sed 's/^-/\//; s/-/\//g'

# Extract timestamps from thread
jq -r '.timestamp // empty' file.jsonl | sort

# User messages only
jq -c 'select(.type=="user")' file.jsonl

# Filter by text content
jq -c 'select(.message.content[].text | test("pattern";"i"))' file.jsonl

# Get first/last timestamp
jq -rs '[.[].timestamp | select(.)] | sort | .[0], .[-1]' file.jsonl
TopicSkill
Storage internals, /renamecc-internals
Permission configcc-configuring-permissions

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です