Check

From Chanw-research/claude-code-paper-writing · View interactive version

Check is an AI agent skill from the GitHub repository Chanw-research/claude-code-paper-writing. Scan the full wiki to detect health issues and produce a tiered fix-recommendation report (covers all 9 entity types + graph consistency)

How to use this skill

Skill file

/check

Scans the full wiki to detect structural, link, field, and graph health issues, and generates a tiered fix-recommendation report.

Covers all 9 entity types, including claims confidence plausibility, idea failure-reason completeness,

experiment-claim link validity, and graph edge consistency.

Inputs

Outputs

Wiki Interaction

Reads

Writes

Workflow

Pre-conditions: confirm the working directory is the wiki project root (directory containing wiki/, raw/, tools/).

Set WIKI_ROOT=wiki/.

Step 1: Run the Automated Lint Tool

Default mode (report only):

python3 tools/lint.py --wiki-dir wiki/ --json

Auto-fix mode (when user specifies --fix):

python3 tools/lint.py --wiki-dir wiki/ --fix --json

Auto-fixes deterministic issues (xref reverse-link completion, missing fields filled with default values) and outputs a fix report.

Preview mode (when user specifies --fix --dry-run):

python3 tools/lint.py --wiki-dir wiki/ --fix --dry-run --json

Previews what would be fixed without applying any changes.

Parse the JSON output to obtain all automatically detected issues (and fix results).

Step 2: Structural Completeness (automated coverage)

The automated tool checks:

  1. Broken wikilinks: [[slug]] target file does not exist
  2. Orphan pages: pages with no incoming links
  3. Missing required fields (all 9 entity types):

Step 3: Field Value Validation (automated coverage)

  1. Enum value checks:
  1. Claim confidence ∈ [0.0, 1.0]
  2. Idea failure_reason: must be non-empty when status=failed (anti-repetition memory)
  3. Experiment target_claim: the referenced claim must exist

Step 4: Cross Reference Symmetry (automated coverage)

Check all bidirectional link rules defined in CLAUDE.md:

| Forward link | Reverse link checked |

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

| concepts.key_papers → papers | papers.Related contains concept link |

| papers → people (wikilink) | people.Key papers contains paper |

| claims.source_papers → papers | papers.Related contains claim link |

| ideas.origin_gaps → claims | claims.Linked ideas contains idea |

| experiments.target_claim → claims | claims.evidence contains experiment |

Step 5: Graph Edge Consistency (automated coverage)

  1. JSON format validity: every line is valid JSON
  2. Required fields: each edge has from, to, type
  3. Edge type validity: semantic edges use the current endpoint-aware type sets; legacy paper-paper / paper-concept types produce migration warnings
  4. Edge confidence: /ingest paper-paper and paper-concept semantic edges use confidence: high|medium|low
  5. Citation layer: graph/citations.jsonl rows use type: cites, valid source/date, paper endpoints, and no confidence field
  6. Dangling nodes: wiki pages referenced by from/to must exist

Step 6: Content Quality (LLM-assisted)

Items detectable by the automated tool:

  1. Papers with importance=5 have no concept page referencing them
  2. Concepts with maturity=stable have only 1 key_paper
  3. Topics have empty Open problems sections

Additional LLM judgments (requires reading content):

  1. Concept near-duplicate detection: scan all concept page titles + aliases and assess whether any pairs are semantically identical or highly similar (e.g. "attention mechanism" and "self-attention"). Output merge recommendations for suspected duplicates.
  2. Contradictory statement detection (inconsistent descriptions of the same fact across different pages)
  3. SOTA records not updated in over 6 months
  4. people Recent work not updated in over 6 months
  5. Claim confidence inconsistent with evidence quantity/strength
  6. High-priority idea stuck in proposed status for a long time

Step 7: Generate Report

Output sorted by priority:

## Lint Report — YYYY-MM-DD

**Summary**: N 🔴, M 🟡, K 🔵

### 🔴 Fix Immediately
1. [file] — {issue description}

### 🟡 Recommended Fixes
1. [file] — {issue description}

### 🔵 Optional Improvements
1. [file] — {issue description}

Classification:

Append log:

python3 tools/research_wiki.py log wiki/ "check | report: N 🔴, M 🟡, K 🔵"

Constraints

Error Handling

Dependencies

Tools(via Bash)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.