CommunityResearch & Data Analysisgithub.com

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.

What is agent-skills?

agent-skills is a Claude Code agent skill that 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.

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

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

conflict-detector

A self-contained skill that finds **contradictions across a set of

documents**. Each document is loaded (path / inline text / inline JSON),

its facts are extracted, and a cross-document rule engine pairs claims by

canonical key and flags mismatches.

MANDATORY WORKFLOW

Dependency bootstrap (run on first use)

Before the first run, probe the runtime deps for this skill:

  • Core: pure standard library — no install required.
  • Optional: PyYAML (only when the config / input is a .yaml; JSON inputs work with the standard library alone).

If PyYAML is missing and the input is YAML, tell the user and ask whether to pip install pyyaml; install only after they confirm. Never install into the global environment without explicit consent.

  1. Load the YAML config (config/examples/two_docs.yaml as reference).

  2. Verify every documents[].value / documents[].path is reachable.

  3. python -m src.cli run --config <path> [--format json,csv,md].

  4. Report the per-level conflict count and point the user at

    ./conflicts/conflicts_<run_id>.*.

When to use

  • Two or more documents, datasets, or extracted fact tables must be checked

    against each other for contradictions.

  • The user asks to "detect conflicts", "find contradictions", "cross-check

    claims", or asks "do these documents agree".

  • A single claim (a number, a status, a named fact) appears in several

    sources and must be compared across them.

  • A fact table extracted from documents must be audited for internal

    consistency before it is relied on.

Usage examples




# Validate a config before running it (fast, no report written).



python -m src.cli validate --config config/examples/two_docs.yaml







# List the document sources a config resolves to.



python -m src.cli list-docs --config config/examples/two_docs.yaml







# Run a detection; pick the output formats (default: json).



python -m src.cli run --config config/examples/two_docs.yaml --format json,csv,md



Reports are written to ./conflicts/conflicts_<run_id>.{json,csv,md}; the

JSON is the machine-readable contract.

Failure handling

  • Config invalid (validate exits non-zero) - fix the reported field

    and re-validate; do not hand-edit around a schema violation.

  • A document source is unreachable - the run aborts naming the

    offending documents[] entry; verify the path or inline value, retry.

  • No conflicts found - a valid, reportable result (an empty report),

    not an error; say so explicitly instead of re-running.

  • Unexpected exit code - report the message verbatim; do not fall back

    to comparing the documents by hand.

Detection levels

| Level | Kind | Severity | Example |

| --- | --- | --- | --- |

| entity | numeric_mismatch, boolean | high | speed = 10 vs speed = 20 |

| clause | categorical | medium | status = "active" vs status = "archived" |

| argument | categorical (text) | low | free-text lines that disagree |

Limitations

  • Extraction is key-value oriented; free-text paragraphs only participate

    at the argument level (line-level comparison).

  • Unit normalisation is table-driven (unit_map); custom unit rules must

    be supplied via the config.

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

Related Skills