Skip to main content
skill CX Codex

verify-artifact — Claude Code skill: file integrity before handoff

verify-artifact is a Claude Code skill that checks file integrity before review or publication. It rebuilds from source and catches truncation and numbering drift.

MIT ★ 1,729 updated 2026-09-27

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pedrohcgs/claude-code-my-workflow --skill verify-artifact -a claude-code
Open on GitHub

What verify-artifact does

The skill runs mechanical checks on an artifact before it leaves your hands: rebuilds from source in one shell command, verifies size and structure, parses the file (pdfinfo, pdftotext, JSON parser), counts pages or records, hunts for unresolved markers like ??, TODO, \ref{. Then it diffs the derived file against source — enumerates labels, section numbers, tables, functions before and after transformation.

Cloud-synced folders (Dropbox, iCloud, OneDrive) dehydrate files: a PDF can become zero bytes or partially copied between build and read. The skill requires staging to a local directory and verifying there — Syntax Error: Couldn't find trailer dictionary on a 70 KB file that should be 700 KB signals this.

It asks the recipient to state filename, page or record count, and version at the top of their response — catches stale cache, wrong attachment, or silent fallback to an older upload. Uses versioned filenames (report_r6.pdf, not report.pdf) so the recipient's system does not serve a cached earlier copy.

What it helps with

  • verify PDF or CSV integrity before sending to a reviewer
  • catch content truncation at the end of a file
  • check section and table numbering after cutting a block
  • confirm a file from a cloud folder is not dehydrated
  • make the recipient prove they opened the right version

Example prompts for the agent

  • Rebuild paper.pdf from source, check size and page count, count unresolved \ref{ markers, and diff table numbering against paper.tex
  • Stage release.zip to a local folder in one command, verify the archive parses, and diff the file list against the manifest
  • Check that data_export.csv contains all rows from the source table and is not truncated at the end

How to install verify-artifact

1Skills CLI (Vercel)

npx skills add pedrohcgs/claude-code-my-workflow --skill verify-artifact -a claude-code

2Manually: put the files in place

~/.claude/skills/verify-artifact/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/verify-artifact/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about verify-artifact

How to install verify-artifact in Claude Code?

Run npx skills add pedrohcgs/claude-code-my-workflow --skill verify-artifact -a claude-code, then open ~/.claude/skills/verify-artifact/SKILL.md.

What does verify-artifact do?

Rebuilds a derived file from source, checks its integrity (size, structure, parsing), diffs numbering and labels against source, and requires the recipient to confirm filename and version.

Why stage to a local directory?

Cloud-synced folders dehydrate files between build and read — a PDF can become zero bytes or truncated. A local directory prevents this.

Source text

SKILL.md · MIT
---
name: verify-artifact
description: Prove that the file you are about to send, publish, or hand off IS the thing you mean — before it leaves your hands. Rebuild from source, check integrity, diff the derived artifact against its source, and require the recipient to echo what they received. Use before sending a paper/PDF for review, shipping a release or replication package, handing files to a coauthor or collaborator, uploading anything to an external reviewer or model, or publishing. Prevents an entire review/QA cycle from being spent on defects that exist only in the artifact, not in the work.
allowed-tools: ["Read", "Grep", "Glob", "Bash", "Write"]
metadata:
  protocol: data-lineage
---


# Verify the artifact before it leaves

A review is only as good as the thing reviewed. If the artifact is corrupt, truncated, stale, or silently renumbered, a competent reviewer will return confident findings about defects **that do not exist in your work** — and you will spend a cycle chasing them. This is cheap to prevent and expensive to miss.

**Rule: never send a derived artifact you have not diffed against its source.**

## 1. Rebuild from source, in one shell invocation

Never send yesterday's build. Rebuild, then copy to the send location in the *same* command, so nothing can change underneath you.

Cloud-synced folders (Dropbox/iCloud/OneDrive) **dehydrate files**: a PDF can become 0 bytes or a partial copy between building and reading it. Symptoms: `Syntax Error: Couldn't find trailer dictionary`, a 70 KB file that should be 700 KB. Build-tool "up to date" messages are *not* evidence the file is intact — the tool checks timestamps, not content. Always stage to a local (non-synced) directory and verify there.

## 2. Integrity checks (mechanical, fast, non-negotiable)

- **Size and structure**: byte size in the expected range; page/record/row count as expected.
- **It parses**: open it with a real reader (`pdfinfo`, `pdftotext`, a JSON/CSV parser, `unzip -t`). A file that exists is not a file that works.
- **Sample the content**: first and last page/record actually contain what you expect — truncation shows up at the end.
- **Unresolved markers**: for documents, count `??`, `[cite]`, `TODO`, `XXX`, `\ref{` leftovers, "Chapter ??"; for code/data, NaNs, empty cells, placeholder values.

## 3. Diff the derived artifact against its source

This is the step people skip and the one that pays. If you produced the artifact by transforming, excerpting, compressing, or subsetting, then **enumerate what could have been lost** and check it:

- **Labels/anchors/IDs**: set of identifiers in source vs artifact. Anything defined in source and *referenced but missing* in the artifact is a break.
- **Numbering**: removing a numbered object silently renumbers everything after it, so a citation that was "Lemma 10" becomes "Lemma 6" — every downstream reference now points somewhere plausible and wrong. Check numbering stability, not just presence.
- **Counts**: sections, tables, figures, rows, functions, endpoints — before vs after.
- **Nested content**: excerpting a block can remove *statements* nested inside it, not just the prose you meant to cut.

If you cut anything, leave a visible in-artifact note saying so, so a reviewer does not read an omission as a gap.

## 4. Make the recipient prove what they got

Ask the reviewer (human or model) to **state, at the top of their response, the exact filenames, page/record counts, and version they are reviewing**. This catches stale caches, wrong attachments, and silent fallbacks to an older upload — failures that are otherwise invisible until the findings make no sense.

Use unique filenames per round (`report_r6.pdf`, not `report.pdf`). Repeated identical names invite the recipient's system to serve a cached earlier copy.

## 5. If findings look strange, suspect the artifact first

Before acting on a review, ask: could this finding be an artifact of what I sent? Signals: complaints about missing/undefined references, "sections appear truncated", "the proof ends mid-argument", numbering that does not match your copy, or objections to text you know is present. **Re-verify the artifact before you re-verify the work.** Applying "fixes" for artifact-induced findings actively damages correct material.

## Minimum checklist

1. Rebuild from source; stage to a local dir in the same shell command.
2. Verify it parses; check size, counts, first/last content.
3. Count unresolved markers — expect zero.
4. Diff identifiers/numbering/counts against source; note any deliberate omissions in the artifact itself.
5. Unique filename for this round.
6. Require the recipient to echo filename + counts.

## Cross-references

- [`verification-ladder.md`](../../references/verification-ladder.md) — rung 2 (existence → substantiveness → wiring → coherence)
- [`external-oracle-process.md`](../../references/external-oracle-process.md) §7 — cloud-synced files upload corrupt

© pedrohcgs · MIT · pedrohcgs/claude-code-my-workflow

Similar skills

All skills for Writing and docs →

From the same set58

The whole set →
visual-audit visual-audit runs layout audits on Quarto and Beamer decks to detect overflow, font clashes, and box fatigue before you present. CX Codex +1 ★ 1,729repo stars verify-claims verify-claims is a skill that independently checks factual claims in drafts, including citations, figures, dataset claims, and research references. CX Codex +1 ★ 1,729repo stars validate-bib validate-bib is a Claude Code skill that cross-references citations in lecture materials with bibliography files, finding missing keys, duplicate entries, and metadata mismatches. CX Codex +1 ★ 1,729repo stars vaccinate vaccinate is a Claude Code skill that tests whether a reviewer or automated check catches the defects it is meant to find. Run it before trusting a review gate for a release or consequential decision. CX Codex +1 ★ 1,729repo stars triage-inbox triage-inbox sorts academic mail and calendar events through MCP into buckets, then proposes one gated action per thread. It never sends or accepts anything. CX Codex +1 ★ 1,729repo stars translate-to-quarto translate-to-quarto converts Beamer LaTeX slides into Quarto RevealJS presentations inside Quarto/. Useful when preparing academic decks for online publication without rewriting math. CX Codex +1 ★ 1,729repo stars teach-from-paper teach-from-paper is a Claude Code skill that turns a research paper into a lecture plan, slide outline, discussion prompts, and exercise brief for a defined audience. CX Codex +1 ★ 1,729repo stars syllabus Turns a topic or reading list into a teachable syllabus: description, weekly schedule, objectives, assessment and policies. Built for instructors. CX Codex +1 ★ 1,729repo stars

Project sponsors

Companies that keep this analytics open