Skip to content
Back to skills

Contradict Check

ASecurity

LLM-judged contradiction check across the vault. Run before committing changes that touch knowledge pages, or as a git pre-commit hook.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 6, 2026
ai-agentspythonbashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 6, 2026

npx -y skills add Ekgardt/llm-wiki --skill contradict-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contradict Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contradict Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ekgardt-contradict-check/badge)](https://www.skillsdirectory.com/skills/ekgardt-contradict-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: skill
name: contradict-check
argument-hint: "[--scope all]  (default: all)"
description: LLM-judged contradiction check across the vault. Run before committing changes that touch knowledge pages, or as a git pre-commit hook.
disable-model-invocation: true
allowed-tools: Read Glob Grep LS Bash(python scripts/lint_memory.py *) Bash(uv run python scripts/lint_memory.py *)
title: "Contradict Check"
timestamp: 2026-07-03T05:41:37
---
Wraps `scripts/lint_memory.py --contradictions`, which uses the unified llm_client (`scripts/llm_client.py`) to flag concrete logical contradictions between pages.

## When to use
- Before committing a batch of edits to `knowledge/notes/`.
- After promoting a page via `bridge-promote-insight` (to check the promoted page hasn't drifted from its memory origin).
- Scheduled: part of a weekly review, alongside `knowledge-review` / `session-memory-review`.
- As a git pre-commit hook (see *Installing as a pre-commit hook* below).

## What it catches
Only **concrete** contradictions — two pages giving different answers to the same question; a rule stated one way here and the opposite way there; a dated decision on page A silently violated by page B. It does **not** flag stylistic drift, differing levels of detail, or mere scope overlap — those belong in `knowledge-review`.

## Procedure

1. Run: `python scripts/lint_memory.py --contradictions $ARGUMENTS`.
   - `--scope all` (default) — knowledge/notes.
   - Note: this check costs API calls; the other 13 structural checks are free and always run.

2. Open the generated report at `$LLM_WIKI_STATE_ROOT/logs/lint-YYYY-MM-DD.md` (default `$LLM_WIKI_STATE_ROOT/logs/`) and read the `## Contradictions` section.

3. For each finding:
   - If real: pick one page as canonical, update the other to defer to it, and add a `knowledge/log.local.md` entry noting the resolution.
   - If false positive: record in the relevant knowledge page's `Related` section that the apparent conflict is scope-difference, not contradiction — this teaches future lints (by making the distinction explicit in-page).

4. Re-run the structural lint (`python scripts/lint_memory.py`) to confirm no new breakage from your fix.

## Installing as a pre-commit hook
Create `.git/hooks/pre-commit` (or add to an existing one):

```bash
#!/usr/bin/env bash
# Only run the expensive check if knowledge pages changed.
if git diff --cached --name-only | grep -qE '^knowledge/notes/'; then
  python scripts/lint_memory.py --contradictions --scope all || exit 1
fi
```

Then `chmod +x .git/hooks/pre-commit`. The `grep -qE` gate keeps the hook cheap when the diff is code-only.

## Anti-patterns
- Don't run on every save — structural `lint_memory.py` is the cheap daily pass; contradictions is the deliberate one.
- Don't silence a finding by deleting one of the pages. Resolve via supersession (CLAUDE.md rule 7: track superseded claims, don't silently delete history).

## Return
- Count of contradictions found.
- Path of the lint report.
- One-line verdict: clean / resolved inline / needs human judgment.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.