Community研究&データ分析github.com

JiamingShi-JsPhys/agent-skills

複数ドキュメント間の矛盾を検出するスキル。2つ以上のドキュメント、データセット、または抽出された事実テーブル間で矛盾を見つけたい場合に使用します。

agent-skills とは?

このスキルは、複数のドキュメント間で矛盾(contradictions)を発見するための自己完結型ツールです。各ドキュメントをパス、インラインテキスト、インラインJSONから読み込み、その事実を抽出し、クロスドキュメントルールエンジンが正規化されたキーでペアを照合して不一致をフラグ付けします。3つの検出レベル(数値/ブール値の不一致を扱うエンティティレベル、カテゴリの不一致を扱う句レベル、自由テキストの不一致を扱う引数レベル)を実行し、結果はJSON、CSV、Markdown形式で機械可読なレポートとして出力されます。主にClaude CodeやCursor、CodexなどのAIエージェントと連携し、ユーザーが「detect conflicts」「find contradictions」「cross-check claims」などのトリガーワードを使用した際に自動的に起動します。また、設定ファイルのバリデーション、ドキュメントソースの一覧表示、実行結果のレポート生成など、堅牢なワークフローを提供します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JiamingShi-JsPhys/agent-skills/tree/HEAD/skills/conflict-detector

Installed? Explore more 研究&データ分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

conflict-detector

複数のドキュメント間で矛盾を発見する自己完結型スキル。各ドキュメントは(パス/インラインテキスト/インラインJSONで)読み込まれ、その事実が抽出されます。クロスドキュメントルールエンジンが正規化されたキーでクレームをペアリングし、不一致をフラグ付けします。

必須ワークフロー

依存関係のブートストラップ(初回使用時)

初回実行前に、このスキルのランタイム依存関係を確認します。

  • コア: 純粋な標準ライブラリ — インストール不要。
  • オプション: PyYAML (設定/入力が .yaml の場合のみ;JSON入力は標準ライブラリのみで動作します)。

PyYAML が不足しており、入力がYAMLの場合は、ユーザーに伝え pip install pyyaml するかどうかを尋ねてください。明示的な同意なしにグローバル環境にインストールしないでください。

  1. YAML設定を読み込む(config/examples/two_docs.yaml を参照)。

  2. すべての documents[].value / documents[].path が到達可能であることを確認する。

  3. python -m src.cli run --config <path> [--format json,csv,md] を実行する。

  4. レベルごとの矛盾数を報告し、./conflicts/conflicts_<run_id>.* をユーザーに示す。

使用タイミング

  • 2つ以上のドキュメント、データセット、または抽出された事実テーブルを相互にチェックし、矛盾がないか確認する必要がある場合。
  • ユーザーが「detect conflicts」「find contradictions」「cross-check claims」、または「do these documents agree」と尋ねた場合。
  • 単一のクレーム(数値、ステータス、名前付き事実)が複数のソースに現れ、それらを比較する必要がある場合。
  • ドキュメントから抽出された事実テーブルの内部的な整合性を監査する必要がある場合。

使用例

# 設定を実行前に検証する(高速、レポートは書き込まれない)。
python -m src.cli validate --config config/examples/two_docs.yaml

# 設定が解決するドキュメントソースを一覧表示する。
python -m src.cli list-docs --config config/examples/two_docs.yaml

# 検出を実行し、出力フォーマットを選択する(デフォルト: json)。
python -m src.cli run --config config/examples/two_docs.yaml --format json,csv,md

レポートは ./conflicts/conflicts_<run_id>.{json,csv,md} に書き込まれます。JSONは機械可読な契約です。

失敗時の処理

  • 設定が無効(validate が非ゼロで終了)— 報告されたフィールドを修正し、再検証してください。スキーマ違反を手動で編集して回避しないでください。
  • ドキュメントソースに到達できない — 該当する documents[] エントリを特定して実行が中断されます。パスまたはインライン値を確認し、再試行してください。
  • 矛盾が見つからない — 有効で報告可能な結果(空のレポート)であり、エラーではありません。再実行する代わりに、その旨を明示的に伝えてください。
  • 予期しない終了コード — メッセージをそのまま報告し、手動でドキュメントを比較するフォールバックは行わないでください。

検出レベル

レベル種類重大度例
entitynumeric_mismatch, boolean高speed = 10 vs speed = 20
clausecategorical中status = "active" vs status = "archived"
argumentcategorical (テキスト)低矛盾する自由形式のテキスト行

制限事項

  • 抽出はキーと値に重点を置いています。自由形式の段落は argument レベル(行単位の比較)でのみ参加します。
  • 単位の正規化はテーブル駆動(unit_map)です。カスタムの単位ルールは設定を介して提供する必要があります。

Individual skills in this repo

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

JiamingShi-JsPhys/agent-skills

Document evolution tracker. Use when the user has a family of document versions (timestamped or sequentially named files) and wants to see how the document changed over time -- which paragraphs / lines / sentences were added, removed, or modified between consecutive versions, and how a set of named concepts (or auto-detected headings) evolved (introduced / retained / modified / dropped). Triggers on "track document changes", "version history", "what changed between drafts", "concept lineage", "document evolution". Emits a Markdown + JSON timeline.

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).

関連スキル