Skip to content

Instantly share code, notes, and snippets.

@fbbp
Last active June 9, 2025 12:05
Show Gist options
  • Select an option

  • Save fbbp/349c7a717dda729b79ecc92979821fa1 to your computer and use it in GitHub Desktop.

Select an option

Save fbbp/349c7a717dda729b79ecc92979821fa1 to your computer and use it in GitHub Desktop.
該当プロジェクトで行なったClaude Codeの全セッション内容を振り返りレポートを.mdで出力するプロンプト

Extract Full Claude Code Project History

Analyze all session history for this project and create a comprehensive markdown summary.

Steps:

1. Find project directory

pwd  # Get current path
# Convert to Claude format: /path/to/project → -path-to-project

2. List all sessions

ls -lat ~/.claude/projects/[ESCAPED_PATH]/*.jsonl

3. For each JSONL file:

# Get date
stat -f "%Sm" -t "%Y-%m-%d" [FILE] || date -r [FILE] "+%Y-%m-%d"

# Extract key activities (grep for: created, updated, implemented, added, fixed, 作成, 実装, 追加, 修正, 更新)
cat [FILE] | jq -r 'select(.type=="user") | .message' | grep -E "content" | head -30

# Find created files
grep "File created" [FILE] | grep -oE "at: [^\"]*"

# Find errors
grep -i "error" [FILE] | grep -v "without" | head -5

4. Check git history if exists

git log --oneline --date=short --pretty=format:"%h %ad %s" | head -20

5. Check key files

ls -la README* *.py *.js requirements*.txt package*.json 2>/dev/null
find . -name "*stats*.json" -o -name "*.log" 2>/dev/null | head -10

6. Create summary markdown

Japanese Structure / 日本語版構成:

# [プロジェクト名] セッション履歴

## プロジェクト概要
[プロジェクト全期を通した説明]

## タイムライン
- **YYYY-MM-DD**: [その日のセッションでなにがあったのかの概要を詳細に書く]
- **YYYY-MM-DD**: [その日のセッションでなにがあったのかの概要を詳細に書く]
- **YYYY-MM-DD**: [その日のセッションでなにがあったのかの概要を詳細に書く]

## セッション詳細

### YYYY-MM-DD - セッション [SESSION_ID]
**実施内容:**
- [主要タスクのリスト]

**作成/更新ファイル:**
- [ファイルリスト]

**主な実装:**
- [機能/修正のリスト]

[各セッションについて同様に記載]

## プロジェクト統計
- 総セッション数: X
- 作成ファイル数: Y
- 使用技術: [リスト]

## 現在の状態
[現状、エラー、TODO項目]

Notes:

  • For large JSONLs use: tail -n 500 [FILE]
  • If jq fails, use: grep -o '"content":"[^"]*"' | sed 's/"content":"//'
  • Focus on significant sessions if many exist

Execute this analysis and create project_history.md.

Don't hold back. Give it your all. ultrathink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment