Community程式設計與開發github.com

JiamingShi-JsPhys/agent-skills

文件演進追蹤器。當使用者擁有一系列文件版本(帶時間戳或順序編號的檔案)並希望檢視文件如何隨時間變化時使用——哪些段落/行/句子在連續版本之間被新增、刪除或修改,以及一組命名概念(或自動偵測的標題)如何演變(引入/保留/修改/遺棄)。觸發關鍵字包括「追蹤文件變更」、「版本歷史」、「草稿之間的差異」、「概念譜系」、「文件演進」。輸出 Markdown + JSON 時間線。

agent-skills 是什麼?

此技能是一個專門的文件演進追蹤器,專為開發者與 AI 代理設計,用以分析時間序列文件版本之間的結構性變化。它支援依序命名(如 v1.md、v2.md)或帶時間戳的檔案系列,並以段落、行或句子為粒度進行 diff 比對。除了基本的文字差異,它還能追蹤特定概念(透過 --concepts 參數指定或自動偵測標題)在版本間的引入、保留、修改或遺棄。執行後會在 ./evolution/ 目錄下產生易讀的 Markdown 時間線與機器可讀的 JSON 報告。該技能相容於 Windows、macOS 及 Linux,核心功能僅依賴 Python 標準函式庫,YAML 設定支援為選用(需 PyYAML)。其設計限制在於比對為結構性而非語意性,且自訂命名方案僅支援 sequential 與 timestamp。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JiamingShi-JsPhys/agent-skills/tree/HEAD/skills/document-evolution-tracker

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

document-evolution-tracker

一個自包含的技能,用於追蹤文件在不同版本間的演變。給定一個版本家族(例如包含 v1.md, v2.md, ... 或帶時間戳檔案的目錄),它會計算連續版本之間的段落級差異,並追蹤概念的譜系(引入 / 保留 / 修改 / 遺棄)。

必要工作流程

相依套件引導(首次使用時執行)

在首次執行之前,請探測此技能的執行時期相依套件:

  • 核心:純標準函式庫 — 無需安裝。
  • 選用:PyYAML(僅當設定檔為 .yaml 格式時;JSON 設定檔僅需標準函式庫即可運作)。

如果 PyYAML 缺失且設定檔是 YAML 格式,請告知使用者並詢問是否要 pip install pyyaml;僅在使用者確認後才安裝。切勿在未經明確同意的情況下安裝到全域環境。

  1. 載入設定檔(參考 config/examples/family.json;安裝 PyYAML 後也支援 YAML 設定檔)。

  2. 確認 versions_dir 包含至少兩個版本檔案。

  3. 執行 python -m src.cli run --config <路徑> [--concepts "A,B"]。

  4. 報告轉變次數,並引導使用者前往 ./evolution/evolution_<追蹤ID>.{md,json}。

使用時機

  • 必須比較一系列文件版本(帶時間戳或順序編號)隨時間的變化。
  • 使用者要求「追蹤文件變更」、「版本歷史」、「草稿之間的差異」或「概念譜系」。
  • 必須追蹤一個命名概念(術語、標題、定義)在草稿之間的演變,以查看其何時被引入、修改或遺棄。
  • 草稿的演進需以時間線而非單一終端差異來報告。

使用範例

# 驗證設定檔並查看發現的版本檔案
python -m src.cli validate --config config/examples/family.json
python -m src.cli versions --config config/examples/family.json

# 執行追蹤器;可選地指定要追蹤的概念
python -m src.cli run --config config/examples/family.json --concepts "entropy,partition function"

報告會寫入 ./evolution/evolution_<追蹤ID>.{md,json};Markdown 時間線供人類閱讀,JSON 則供程式使用。

錯誤處理

  • 設定檔無效(validate 結束碼非零)— 修正報告中指定的欄位並重新驗證;命名規則與 versions_dir 通常是問題所在。
  • 發現少於兩個版本— 執行中止;請檢查 version_naming 規則是否與實際檔名相符,然後重試。
  • 某個概念從未出現— 報告中會將其標示為在所有版本中缺席,這是有效結果,並非錯誤。
  • 非預期的結束碼— 直接回報訊息內容;不要自行手動比對檔案。

差異粒度

粒度分割規則
line非空行
paragraph(預設)以空行分隔的區塊
sentence以標點符號分隔的句子

限制

  • 差異比對是結構性的(透過 difflib 進行區塊對齊),而非語意性的。一個概念僅在其確切詞組(不區分大小寫)出現在版本的文字中時,才被視為「存在」。
  • 不支援自訂命名方案(僅支援 sequential / timestamp)。

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

JiamingShi-JsPhys/agent-skills

Cross-document conflict detector. Use when the user has two or more documents, datasets, or extracted fact tables and wants to find contradictions between them. Triggers on "detect conflicts", "find contradictions", "do these documents agree", "cross-check claims", "inconsistency check", or when comparing a claim across multiple sources. Runs three detection levels: entity (numeric / boolean mismatch on the same key), clause (categorical mismatch), and argument (free-text disagreement). Emits a machine-readable conflict report in JSON / CSV / Markdown.

JiamingShi-JsPhys/agent-skills

Longitudinal statistical analysis pipeline. Use when the user has panel / repeated-measures data (one or more sessions per subject, with between-subject conditions) and wants to run a reproducible analysis: descriptive stats, a manipulation check, a linear mixed model, a lagged mediator, or a sensitivity analysis over random-effects / covariance structures. Triggers on any of the phrases "LMM", "mixed model", "repeated measures", "longitudinal analysis", "mediation over time", "lagged mediator", "sensitivity analysis of RE structure". When fired, load the YAML config that lists the enabled steps, run the pipeline, and report the per-step results plus the generated CSVs.

JiamingShi-JsPhys/agent-skills

State manager for multi-dimensional computational experiments. Iterate a parameter grid over many rounds, snapshot declared critical files each round, audit every round (params, hashes, timestamps, status), and roll back to any round non-destructively. Use it when a workflow runs hundreds of rounds across multiple parameter dimensions and needs per-round snapshots, full audit trail, and arbitrary rollback - e.g. longitudinal studies, parameter scans, or symbolic/ numerical sweeps calling external solvers (Mathematica, GAP, SymPy, custom scripts).

相關技能