ai4s-research/ai4s-skills/integrity-auditor
Claude Code and agent skill by ai4s-research/ai4s-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when the user wants a paper audited for integrity issues — image misuse, numerical anomalies, logical gaps — and needs a reviewable evidence report. Works on external papers (PDF / DOI / arXiv) and on outputs from a local paper-writer run. Single-stage skill.
Install
npx vskill@latest install ai4s-research/ai4s-skills/integrity-auditorSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ai4s-research/ai4s-skills/integrity-auditor.
Integrity Auditor
Overview
Paper-integrity audit package. Single stage, full quality from the start. The agent reads each reference, then carries out three evidence tracks (image / numerical / logical) and produces a structured audit_report.md with Level 1–4 graded findings.
This skill ships no LLM SDK — it is the skill instructions, references, templates, and single-purpose forensics_tools/ only.
The substantive work is decomposed into reference playbooks under references/:
| Reference | Topic | |
|---|---|---|
references/00-incremental-execution.md | how to do this without losing work: batches, persistence, resume — read first | |
references/01-image-evidence.md | image evidence: panel split, dup detection, rotate/flip alignment, Western-blot continuity | |
references/02-numerical-evidence.md | numerical evidence: n-consistency, mean/SD/SEM recompute, P-value sanity, decimal trail, Benford with caveats, deterministic-column-pair and last-digit chi-square sweepers, variance-reporting consistency | |
references/02a-supplement-acquisition.md | publisher CDN routes: how to get hi-res figures and source-data XLSXs even when the article PDF is paywalled | |
references/02b-ml-paper-arithmetic.md | ML / non-biology papers: arithmetic re-derivation of every quoted improvement against tabulated benchmark cells; leaderboard archive routes | |
references/03-logical-evidence.md | logical evidence: conclusion-chain compression, missing controls, replication gap | |
references/04-evidence-grading.md | 4-level finding grading + reviewable-evidence format (DOI / figure-id / pointer / transformation / requested raw data) | |
references/05-quality-gate.md | self-check before delivery |
Also:
templates/audit_report.md— report skeleton the agent fills.forensics_tools/image_dup.py— perceptual-hash (dHash + aHash) duplicate detector for figure / panel PNGs. Single-purpose pure-Python utility (Pillow only). Catches untransformed dups.forensics_tools/image_dup_orb.py— ORB feature-matching duplicate detector with horizontal-flip augmentation. Catches transformed dups (rotation / flip / crop / brightness change) that perceptual hashing misses. Pair withimage_dup.py: use phash first, escalate to ORB when phash distance is suspicious-but-inconclusive (16–60 range). Deps: OpenCV + NumPy.forensics_tools/panel_split.py— whitespace-gutter panel splitter. Pair withimage_dup.py/image_dup_orb.pyfor cross-panel duplicate detection; whole-figure phash without panel splitting almost never finds anything.forensics_tools/channel_check.py— RGB channel-content classifier (DAPI / Flag / Merge / other) for fluorescence sub-images. Catches within-panel label swaps (e.g., a "DAPI" sub-image that is actually a Merge); cross-panel phash cannot catch this class.forensics_tools/decimal_match.py— cross-cell last-N-decimal matching sweeper for source-data XLSX. Detects fabrication where many distinct values share trailing decimal patterns (Kang Tiebang whistleblower class). Single-purpose pure-Python utility (openpyxl only). Seereferences/02-numerical-evidence.mdCheck 1.5.forensics_tools/magnitude_consistency.py— supplement-text vs source-data XLSX unit/scale consistency. Catches unit-confusion (TWh vs GWh, mM vs µM, MHz vs Hz, etc.) and order-of-magnitude transcription errors via entity-overlap + literal-value matching across a generic SI-prefix-aware unit taxonomy covering energy / power / mass / length / area / volume / time / voltage / current / frequency / pressure / concentration / amount / force / dose / genomics-bp / CO2 / currency. Cross-family pairs (e.g., kV vs TWh) are automatically rejected. Pair withbilingual_cn_geography.json(or your own JSON map) for cross-language entity matching. Empirical baseline: Hu et al. 2026 Nature Tongyu county 1000× unit error. Seereferences/02-numerical-evidence.mdCheck 1.6.forensics_tools/xlsx_aggregate_consistency.py— cross-XLSX same-quantity sum/row consistency. Detects when two source-data tables in the same paper purport to carry the same aggregate quantity but disagree by a small systematic margin (e.g., Hu et al. 2026 Nature MOESM3 vs MOESM6 1110.78 vs 1103.89 TWh, 0.62 percent diff, all 31 provinces same sign). Reuses the unit taxonomy frommagnitude_consistency.py. Empirical baseline same paper Level 1 finding. Seereferences/02-numerical-evidence.mdCheck 1.7.tests/smoketest.sh— < 30-second pre-commit gate. Compiles every script, runs every--help(catches argparse%bugs), and runs positive + negative controls fordecimal_match,magnitude_consistency, andxlsx_aggregate_consistency. Run before every change.- See
forensics_tools/README.mdfor the design rule that distinguishes utility scripts from forbidden "skeleton → enrich" orchestration, and for the recommended pipeline.
Read the relevant reference _before_ writing, not after. The full audit does not fit in a single turn — references/00-incremental-execution.md is the only execution mode that completes.
When to Use
- User hands you a paper (PDF / DOI / arXiv ID) and asks whether the figures / data / logic are trustworthy.
- User wants a quality gate on outputs from a local paper-writer run (slug-based).
- Reviewer / investigator wants a reviewable-evidence document to forward to authors or an integrity body.
When NOT to Use
- User wants to write a paper →
paper-writer. - User wants to build / run an experiment →
experiment-suite. - User wants a literature survey →
literature-survey. - User wants a verdict ("is this fraud?") — this skill produces evidence and grading, never verdicts.
Workflow
Step 1 — Identify the input and set up the run
Detect input mode:
| Mode | Trigger | Acquisition | |
|---|---|---|---|
| PDF path | local *.pdf argument | use directly | |
| DOI / arXiv ID | 10.xxxx/..., arXiv:NNNN.NNNNN | WebFetch landing page; record DOI / arXiv URL and abstract; download PDF if open-access | |
| Local paper-writer slug | matches output/paper-writer/<slug>/latest/ | use slug directly; also read output/experiment-suite/<slug>/latest/ if present |
Compute slug:
In commands below $RUN = output/integrity-auditor/<slug>/latest.
Step 2 — Gather materials into the run
Open `references/02a-supplement-acquisition.md` first if the input is a DOI / arXiv ID / external PDF reference. Many publishers (Nature / Springer being the canonical example) gate the article body behind a paywall while serving the supplementary tables, source data, and hi-res figures on open CDN endpoints. Never conclude "paywalled, audit blocked" before trying the supplement / figure CDN routes.
Acquisition order (try every step; do not stop early):
- Article HTML landing page — usually open even when PDF is gated.
curl -sL -A "Mozilla/5.0" "<article URL>" -o $RUN/paper.html. This page typically embeds the abstract, all main-figure captions, and direct CDN URLs for every supplementary file and high-resolution figure. - Harvest CDN URLs from the HTML:
grep -oE 'https?://[^"]*(MOESM|Fig[0-9]_HTML|mmc|MEDIA)\.(?:pdf|xlsx|docx|png)' $RUN/paper.html | sort -u. Download every distinct URL into$RUN/supplementary/and$RUN/figures_hires/. - Author Correction PDF —
curl -sL -A "Mozilla/5.0" "<correction URL>.pdf" -o $RUN/correction.pdfthenfile $RUN/correction.pdfto confirm it is a real PDF (not HTML auth wall).
3a. CRITICAL — the correction's own supplementary — fetch the correction's landing HTML, grep for its MOESM supplementary URLs (separate DOI namespace from the parent article), download every one. These often contain the pre-correction originals of replaced figures. See references/02a-supplement-acquisition.md for the exact recipe. Empirical baseline: the Wang Ping 2025 Nature audit only surfaced its image-track Level 4 finding because the correction's MOESM1_ESM.pdf carried the original (pre-correction) Fig 2 and Extended Data Figs 7, 10.
- Article PDF —
curl -sL -A "Mozilla/5.0" "<article URL>.pdf" -o $RUN/paper.pdfthenfile $RUN/paper.pdf. If gated, record that fact in the manifest and continue with whatever the earlier steps acquired. - For a local paper-writer slug only: read the matching
results.json,data_contract.md,figures/manifest.json,bibliography.bib.
Write $RUN/input_manifest.md listing every artefact actually acquired. At minimum it must enumerate what was downloaded and what was attempted-but-blocked.
Extract structured material:
If pdfimages / pdftotext / pdftoppm from poppler-utils is not installed, install via system package manager and retry. Do not proceed without either raster panels or page renderings — image evidence track depends on them.
If the article PDF is paywalled and the article HTML page yields no supplementary or figure CDN URLs and the Author Correction PDF is also gated, then and only then write _paywall_blocked.md per track. The Wang Ping 2025 Nature audit (output/integrity-auditor/wang-ping-hdac6-valine-10-1038-s41586-024-08248-5/latest/) demonstrates that the article body being gated says nothing about whether the supplementary source data is gated; the latter is almost always open and is where the substantive audit lives.
Step 3 — Run the three audit tracks (REQUIRED — this is the whole job)
Open references/00-incremental-execution.md first. Then carry out the three tracks below across many turns, persisting state to $RUN/ after every batch.
3.0 Paper-type triage (do this first; it picks which sweepers run)
Before invoking any sweeper or forensics tool, classify the paper. The substantive audit method differs by class — running biology sweepers on an ML paper wastes the run and pollutes the report with "swept clean" lines that are misleading (nothing was actually swept).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/integrity-auditor/SKILL.md
Popularity
- Repository stars
- 232
- Repository forks
- 21
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ai4s-research/ai4s-skills/integrity-auditor)