chronicle-remote-summarizer
Automate cross-system summarization workflow for Chronicle sessions. Export sessions from remote systems (like FreeBSD) and import/summarize on local machine with Gemini API. Use when you have sessions on a system without Gemini API access and need to summarize them on another machine.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o chronicle-remote-summarizer.zip https://jpskill.com/download/17811.zip && unzip -o chronicle-remote-summarizer.zip && rm chronicle-remote-summarizer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17811.zip -OutFile "$d\chronicle-remote-summarizer.zip"; Expand-Archive "$d\chronicle-remote-summarizer.zip" -DestinationPath $d -Force; ri "$d\chronicle-remote-summarizer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
chronicle-remote-summarizer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
chronicle-remote-summarizerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Chronicle Remote Summarizer
このスキルは、異なるシステム(例:FreeBSD 開発マシン → Gemini API を搭載した Mac)にまたがる Chronicle セッションの要約ワークフローを自動化します。
自動アクティベーション
このスキルは自動的にアクティブになります! (マイルストーン #13)
「remote でセッションを要約する」や「FreeBSD からセッションをインポートする」のようなプロンプトは、このスキルを自動的にトリガーします!
トリガーパターン: remote, freebsd, import session, summarize on remote 参照: 詳細については
docs/HOOKS.mdを参照してください
このスキルを使用するタイミング
このスキルは、以下の場合に使用します。
- Gemini API が設定されていないリモートシステムに Chronicle セッションがある場合
- それらのセッションをローカルマシン(Gemini API がある)で要約したい場合
- 要約を元のシステムに転送する必要がある場合
- 複数の開発環境(FreeBSD、Linux、macOS)で作業している場合
一般的なシナリオ: FreeBSD 開発サーバー (Gemini API なし) → macOS ラップトップ (Gemini API キーあり)
仕組み
Chronicle は import-and-summarize --quiet を提供します。これは以下のことを行います。
- 負の ID (例:
-3) を持つ一時的なセッションを作成します。 - Gemini を使用して AI 要約を生成します。
- 自動クリーンアップ: 一時的なセッションとファイルを削除します。
- クリーンな JSON を stdout に出力します (
--quietを使用するとステータスメッセージは出力されません)。
システム間の汚染なし - リモートセッションはリモートシステムに残り、要約のみが転送されます。
推奨ワークフロー: 1 行コマンド
前提条件:
- ローカルマシンからリモートマシンへの SSH アクセス
- 両方のシステムに Chronicle がインストールされていること
- ローカルマシンに Gemini API キーが設定されていること (
chronicle config ai.gemini_api_key YOUR_KEY) - オプション: Chronicle 設定でリモートシステムが設定されていること (ホスト名/パスを自動化)
ステップ 1: リモートシステムの設定 (初回のみ)
# FreeBSD リモートシステムを設定
chronicle config remote_systems.freebsd.hostname "chandlerhardy-dev.aws0.pla-net.cc"
chronicle config remote_systems.freebsd.chronicle_path "/home/chandlerhardy/.local/bin/chronicle"
# 設定の確認
chronicle config --list | grep freebsd
ステップ 2: スキルの使用
Claude がこのスキルを使用し、リモートシステム設定を見つけた場合、自動的に次のコマンドを構築します。
ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle export-session 7" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle import-summary"
設定が見つからない場合、Claude はホスト名を尋ね、コマンドをインタラクティブに構築します。
コマンド (手動):
ssh <remote-host> "chronicle export-session <id>" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh <remote-host> "chronicle import-summary"
例:
ssh freebsd "chronicle export-session 7" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh freebsd "chronicle import-summary"
注: grep -A 999999 '^{$' は、--quiet および 2>/dev/null を使用しても漏洩する可能性のある Google ライブラリの警告をフィルタリングします。
これは何をするか:
- リモート → ローカル: セッション 7 を JSON としてエクスポートします。
- ローカル: インポート、Gemini で要約、一時セッションの自動クリーンアップ
- ローカル → リモート: 要約 JSON を送り返します。
- リモート: セッション 7 を要約で更新します。
--quiet が機能する理由:
- サマライザーからのすべてのステータスメッセージを抑制します。
- クリーンな JSON のみを stdout に出力します (パイプ処理に不可欠)。
- 詳細な出力から JSON を手動で抽出する必要はありません。
2>/dev/nullは Google ライブラリの警告を抑制します (無害)。
時間: 通常、大規模なセッションでは 30 ~ 60 秒 (トランスクリプトのサイズによって異なります)。
代替案: 手動 3 ステップワークフロー
SSH パイプがハングする場合、または中間ファイルを検査する必要がある場合:
ステップ 1: リモートからセッションをエクスポートする
ssh <remote-host> "chronicle export-session <id>" > /tmp/session_<id>.json
例:
ssh freebsd "chronicle export-session 7" > /tmp/session_7.json
ステップ 2: ローカルで要約する (一時的)
cat /tmp/session_<id>.json | chronicle import-and-summarize --quiet 2>/dev/null > /tmp/summary.json
例:
cat /tmp/session_7.json | chronicle import-and-summarize --quiet 2>/dev/null > /tmp/summary.json
何が起こるか:
- 一時セッションを作成します (
-3のような負の ID)。 - Gemini で要約を生成します。
- 自動クリーンアップ: 一時セッションとトランスクリプトファイルを削除します。
- 要約 JSON を
/tmp/summary.jsonに出力します。
ステップ 3: 要約をリモートに送り返す
cat /tmp/summary.json | ssh <remote-host> "chronicle import-summary"
例:
cat /tmp/summary.json | ssh freebsd "chronicle import-summary"
結果:
- ✅ 要約が元のセッションにリンクされたリモートデータベースに保存されます。
- ✅ ローカルシステムはクリーンな状態を維持します (一時セッションは自動的に削除されます)。
- ✅ システム間のデータ汚染はありません。
実際に何が起こるか (内部)
import-and-summarize --quiet について:
- インポート: stdin からセッション JSON を読み取ります。
- 一時セッションの作成:
- 負の ID を割り当てます (例:
-1、-2、-3)。 - トランスクリプトを
~/.ai-session/sessions/session_-3.cleanedに保存します。 is_session=Trueでデータベースエントリを作成します。
- 負の ID を割り当てます (例:
- 要約:
- Gemini API で
summarize_session_chunked()を実行します。 - 大規模なトランスクリプトをチャンク単位で処理します (チャンクあたり 10,000 行)。
- AI が生成した要約でセッションを更新します。
- Gemini API で
- JSON の出力:
{ "version": "1.0", "original_id": 7, "summary": "AI-generated summary...", "summary_generated": true, "keywords": ["feature", "implementation", "testing"] } - 自動クリーンアップ:
- トランスクリプトファイル (
session_-3.cleaned) を削除します。 - データベースエントリ (一時セッション) を削除します。
- 要約 JSON のみが残ります (stdout にパイプされます)。
- トランスクリプトファイル (
import-summary について (リモート側):
- JSON の読み取り: stdin から要約を読み取ります。
- セッションの検索:
original_id(例: 7) でセッションを検索します。 - 更新:
response_summary、summary_generated=True、keywordsを設定します。 - **Do
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Chronicle Remote Summarizer
This skill automates the workflow for summarizing Chronicle sessions across different systems (e.g., FreeBSD dev machine → Mac with Gemini API).
Auto-Activation
This skill auto-activates! (Milestone #13)
Prompts like "summarize session on remote" or "import session from FreeBSD" automatically trigger this skill!
Trigger patterns: remote, freebsd, import session, summarize on remote See:
docs/HOOKS.mdfor full details
When to Use This Skill
Use this skill when:
- You have Chronicle sessions on a remote system without Gemini API configured
- You want to summarize those sessions on your local machine (which has Gemini API)
- You need to transfer the summary back to the original system
- You're working across multiple development environments (FreeBSD, Linux, macOS)
Common scenario: FreeBSD development server (no Gemini API) → macOS laptop (has Gemini API key)
How It Works
Chronicle provides import-and-summarize --quiet which:
- Creates temporary session with negative ID (e.g.,
-3) - Generates AI summary using Gemini
- Auto-cleanup: Deletes temporary session and files
- Outputs clean JSON to stdout (no status messages with
--quiet)
No pollution between systems - the remote session stays on the remote system, only the summary is transferred.
Recommended Workflow: One-Line Command
Prerequisites:
- SSH access from local machine to remote machine
- Chronicle installed on both systems
- Gemini API key configured on local machine (
chronicle config ai.gemini_api_key YOUR_KEY) - Optional: Remote system configured in Chronicle config (automates hostname/path)
Step 1: Configure Remote System (One-Time Setup)
# Configure FreeBSD remote system
chronicle config remote_systems.freebsd.hostname "chandlerhardy-dev.aws0.pla-net.cc"
chronicle config remote_systems.freebsd.chronicle_path "/home/chandlerhardy/.local/bin/chronicle"
# Verify configuration
chronicle config --list | grep freebsd
Step 2: Use the Skill
When Claude uses this skill and finds remote system configuration, it will automatically construct the command:
ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle export-session 7" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle import-summary"
If no config found, Claude will ask for the hostname and construct the command interactively:
Command (Manual):
ssh <remote-host> "chronicle export-session <id>" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh <remote-host> "chronicle import-summary"
Example:
ssh freebsd "chronicle export-session 7" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh freebsd "chronicle import-summary"
Note: The grep -A 999999 '^{$' filters out Google library warnings that can leak through even with --quiet and 2>/dev/null.
What this does:
- Remote → Local: Export session 7 as JSON
- Local: Import, summarize with Gemini, auto-cleanup temporary session
- Local → Remote: Send summary JSON back
- Remote: Update session 7 with the summary
Why --quiet works:
- Suppresses ALL status messages from summarizer
- Outputs ONLY clean JSON to stdout (essential for piping)
- No need to manually extract JSON from verbose output
2>/dev/nullsuppresses Google library warnings (harmless)
Time: Typically 30-60 seconds for large sessions (depends on transcript size)
Alternative: Manual 3-Step Workflow
If SSH pipes hang or you need to inspect intermediate files:
Step 1: Export session from remote
ssh <remote-host> "chronicle export-session <id>" > /tmp/session_<id>.json
Example:
ssh freebsd "chronicle export-session 7" > /tmp/session_7.json
Step 2: Summarize locally (transient)
cat /tmp/session_<id>.json | chronicle import-and-summarize --quiet 2>/dev/null > /tmp/summary.json
Example:
cat /tmp/session_7.json | chronicle import-and-summarize --quiet 2>/dev/null > /tmp/summary.json
What happens:
- Creates temporary session (negative ID like
-3) - Generates summary with Gemini
- Auto-cleanup: Deletes temporary session and transcript files
- Outputs summary JSON to
/tmp/summary.json
Step 3: Send summary back to remote
cat /tmp/summary.json | ssh <remote-host> "chronicle import-summary"
Example:
cat /tmp/summary.json | ssh freebsd "chronicle import-summary"
Result:
- ✅ Summary stored in remote database linked to original session
- ✅ Local system stays clean (temporary session auto-deleted)
- ✅ No data pollution between systems
What Actually Happens (Under the Hood)
On import-and-summarize --quiet:
- Import: Reads session JSON from stdin
- Create Temporary Session:
- Assigns negative ID (e.g.,
-1,-2,-3) - Stores transcript in
~/.ai-session/sessions/session_-3.cleaned - Creates database entry with
is_session=True
- Assigns negative ID (e.g.,
- Summarize:
- Runs
summarize_session_chunked()with Gemini API - Processes large transcripts in chunks (10,000 lines per chunk)
- Updates session with AI-generated summary
- Runs
- Output JSON:
{ "version": "1.0", "original_id": 7, "summary": "AI-generated summary...", "summary_generated": true, "keywords": ["feature", "implementation", "testing"] } - Auto-Cleanup:
- Deletes transcript file (
session_-3.cleaned) - Deletes database entry (temporary session)
- Only the summary JSON remains (piped to stdout)
- Deletes transcript file (
On import-summary (remote side):
- Read JSON: Reads summary from stdin
- Find Session: Looks up session by
original_id(e.g., 7) - Update: Sets
response_summary,summary_generated=True,keywords - Done: Session 7 now has the AI summary
Session Examples
Tested with:
- Session 1: 16.3 minutes, system test
- Session 2: 66.7 minutes, large session
- Session 4: 23KB JSON export
All sessions work perfectly with this workflow.
Troubleshooting
SSH Pipes Hang
Symptom: Command hangs indefinitely
Solution: Use manual 3-step workflow instead:
# Step 1: Export to file
ssh freebsd "chronicle export-session 7" > /tmp/session.json
# Step 2: Process locally
cat /tmp/session.json | chronicle import-and-summarize --quiet > /tmp/summary.json
# Step 3: Send back
cat /tmp/summary.json | ssh freebsd "chronicle import-summary"
Gemini API Not Configured
Symptom: ImportError: google-generativeai package not installed
Solution: Configure Gemini API key on local machine:
chronicle config ai.gemini_api_key YOUR_API_KEY_HERE
Get free API key: https://ai.google.dev/
Session Not Found
Symptom: Session 7 not found
Solution: Check session exists on remote:
ssh freebsd "chronicle sessions --limit 20"
Summary Already Exists
Behavior: import-and-summarize will overwrite existing summaries
Note: This is by design - you can re-summarize sessions if needed.
Tips
- Use
--quietflag: Essential for piping - suppresses status messages - Suppress stderr: Add
2>/dev/nullto hide Google library warnings - Check SSH paths: Remote Chronicle might be in
~/.local/bin/chronicle - Inspect files: Use 3-step workflow to save intermediate JSON for debugging
- Large sessions: 10K+ line transcripts are chunked automatically (no action needed)
- Network failures: Use 3-step workflow for unreliable connections
- Batch processing: You can script this to process multiple sessions
How Claude Should Use This Skill
When invoked, Claude should:
-
Check for remote system config:
chronicle config --list | grep remote_systems -
If config exists (e.g.,
remote_systems.freebsd.hostname):- Read hostname:
chronicle config remote_systems.freebsd.hostname - Read chronicle path:
chronicle config remote_systems.freebsd.chronicle_path - Construct command automatically
- Announce: "Found FreeBSD config, using:
<hostname>"
- Read hostname:
-
If no config exists:
- Ask user: "What's the hostname of your remote system?"
- Ask: "What's the path to chronicle on the remote? (default: chronicle)"
- Optionally suggest: "I can save this to config for future use"
- Construct command with user-provided values
-
Run the command and monitor output
-
Confirm success or handle errors
Example Usage
User: "I have session 7 on my FreeBSD dev machine that needs summarization, but FreeBSD doesn't have Gemini API. Can you summarize it here on my Mac?"
Assistant (with config):
- Checks config:
chronicle config remote_systems.freebsd.hostname - Finds:
chandlerhardy-dev.aws0.pla-net.cc - Announces: "Found FreeBSD config, using chandlerhardy-dev.aws0.pla-net.cc"
- Runs the command:
ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle export-session 7" | chronicle import-and-summarize --quiet 2>&1 | grep -A 999999 '^{$' | ssh chandlerhardy-dev.aws0.pla-net.cc "/home/chandlerhardy/.local/bin/chronicle import-summary" - Confirms: "Session 7 summarized successfully and summary imported back to FreeBSD"
Assistant (without config):
- Checks config:
chronicle config --list | grep remote_systems - No FreeBSD config found
- Asks: "What's your FreeBSD hostname?"
- User provides:
chandlerhardy-dev.aws0.pla-net.cc - Asks: "What's the path to chronicle on FreeBSD? (press Enter for default 'chronicle')"
- User provides:
/home/chandlerhardy/.local/bin/chronicle - Suggests: "I can save this to config for future use. Would you like me to?"
- Runs the command with provided values
- If user agrees, saves config for next time
If one-liner hangs:
- Falls back to 3-step workflow
- Exports to
/tmp/session_7.json - Processes locally →
/tmp/summary.json - Imports summary back to remote
- Confirms success
Advanced Usage
Batch Summarize Multiple Sessions
# List unsummarized sessions on remote
ssh freebsd "chronicle sessions --limit 50" | grep "No summary"
# For each session ID (7, 8, 9):
for id in 7 8 9; do
echo "Summarizing session $id..."
ssh freebsd "chronicle export-session $id" | \
chronicle import-and-summarize --quiet 2>/dev/null | \
ssh freebsd "chronicle import-summary"
done
Inspect Summary Before Importing
# Export and summarize
ssh freebsd "chronicle export-session 7" | \
chronicle import-and-summarize --quiet 2>/dev/null > /tmp/summary.json
# Review summary
cat /tmp/summary.json | jq '.summary'
# If satisfied, import
cat /tmp/summary.json | ssh freebsd "chronicle import-summary"
Debug Verbose Output
If you need to see what's happening, remove --quiet:
ssh freebsd "chronicle export-session 7" | chronicle import-and-summarize
# Shows: "Importing session...", "Summarizing...", "Cleaning up...", then JSON
Note: Without --quiet, JSON is NOT at line 1, so it won't pipe cleanly to import-summary.
Related Commands
chronicle export-session <id>- Export session as JSONchronicle import-session- Import session (permanent, gets new ID)chronicle import-and-summarize- Import + summarize + auto-cleanup (transient)chronicle import-summary- Update existing session with summarychronicle session <id>- View session details and summary
See Also
- REMOTE_SUMMARIZE_WORKFLOW.md - Full workflow documentation with examples
- tests/test_import_export.py - 17 tests covering all import/export scenarios
- chronicle-session-documenter - Document sessions to Obsidian vault after summarization