<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>session on 林協霆醫師</title><link>/tags/session/</link><description>林協霆醫師 (session)</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><image><url>https://htl.physician.tw/favicon-32x32.png</url><title>林協霆醫師</title><link>https://htl.physician.tw/</link><width>32</width><height>32</height></image><webfeeds:icon>https://htl.physician.tw/favicon-32x32.png</webfeeds:icon><webfeeds:logo>https://htl.physician.tw/android-chrome-512x512.png</webfeeds:logo><webfeeds:accentColor>5bbad5</webfeeds:accentColor><lastBuildDate>Tue, 05 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/session/index.xml" rel="self" type="application/rss+xml"/><item><title>session-collection：個人 Claude Code 會話歷史的彙整與檢索倉庫</title><link>/blog/session-collection-2026-05-05/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>/blog/session-collection-2026-05-05/</guid><description>&lt;h2 id="introduction引言" >
&lt;div>
&lt;a href="#introduction%e5%bc%95%e8%a8%80">
#
&lt;/a>
Introduction（引言）
&lt;/div>
&lt;/h2>
&lt;p>長期使用 Claude Code 之後，個人會累積大量會話檔案：每段對話都可能包含對特定問題的思考過程、可重用的 prompt 模式與最終解法。然而 Claude Code 預設的 session 儲存以時間為主軸，難以從主題或專案視角檢索。當使用者想找回「上次處理 NGS 報告時用過的提示詞」或「某段 R 程式碼的演進過程」時，往往需要逐一翻閱資料夾。本專案旨在建立一個個人化的會話倉庫，將散落於不同機器的紀錄集中後，提供更高層次的檢索與利用。&lt;/p>
&lt;h2 id="methods方法" >
&lt;div>
&lt;a href="#methods%e6%96%b9%e6%b3%95">
#
&lt;/a>
Methods（方法）
&lt;/div>
&lt;/h2>
&lt;p>倉庫以 Python 為主要語言，搭配版本控制將會話檔案結構化保存。透過約定的命名規則（日期、專案、議題標籤）與 metadata 標頭，使每筆會話皆具備可被 grep、可被索引的關鍵字。後續以 Python 腳本進行統計與摘要，例如統計常用 prompt 結構、抽取共通設計模式，或產生可重用的 prompt 模板庫。&lt;/p>
&lt;p>設計刻意保持輕量：不引入向量資料庫等複雜架構，先以純文字加 SQLite 形式累積，待資料量超過閾值再考慮升級。此一決策呼應「先讓資料穩定，再選工具」的原則，避免過度工程化。&lt;/p>
&lt;h2 id="results結果" >
&lt;div>
&lt;a href="#results%e7%b5%90%e6%9e%9c">
#
&lt;/a>
Results（結果）
&lt;/div>
&lt;/h2>
&lt;p>目前倉庫已能集中管理跨機器的會話紀錄，並支援按專案或議題快速回顧。對於從事多專案、需要在不同 LLM 工作流間切換的使用者，本系統提供了個人化「外部記憶」，補足模型本身上下文有限的缺陷。倉庫亦可作為實證資料，分析使用者自身的提示工程演化軌跡。&lt;/p>
&lt;h2 id="discussion討論" >
&lt;div>
&lt;a href="#discussion%e8%a8%8e%e8%ab%96">
#
&lt;/a>
Discussion（討論）
&lt;/div>
&lt;/h2>
&lt;p>本專案的價值在於把「會話」視為長期可分析的資料而非一次性消耗品。限制方面，會話內容可能含敏感資訊，需嚴格控管權限；不同 Claude Code 版本的紀錄格式變動亦需要維護兼容層。未來可考慮加入語意搜尋、跨會話的代理人記憶整合，並將高品質模式自動回灌為 Skill。&lt;/p>
&lt;h2 id="連結" >
&lt;div>
&lt;a href="#%e9%80%a3%e7%b5%90">
#
&lt;/a>
連結
&lt;/div>
&lt;/h2>
&lt;ul>
&lt;li>GitHub：&lt;a href="https://github.com/htlin222/session-collection">htlin222/session-collection&lt;/a>&lt;/li>
&lt;li>主要語言：Python&lt;/li>
&lt;li>最後更新：2026-05-05&lt;/li>
&lt;/ul></description></item></channel></rss>