generator-oracle-zero-diff-verify
Use when building a code-generator, sanitizer, or export pipeline whose output already exists as a hand-maintained artifact — make zero-git-diff against that…
Skill by hjr15
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hjr15-generator-oracle-zero-diff-verify
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, data, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/generator-oracle-zero-diff-verify
What's inside
- Skill name
generator-oracle-zero-diff-verify- Description
- Use when building a code-generator, sanitizer, or export pipeline whose output already exists as a hand-maintained artifact — make zero-git-diff against that existing artifact the acceptance test, instead of hand-deriving a per-file classification.
- License
- MIT
- Instructions
- 95 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Generator Oracle: Zero-Diff Verify ## Overview When you build a generator/sanitizer/transform whose output **already exists as a maintained artifact** (e.g. a public template repo's `main` branch generated from a private source), use that artifact as the **oracle**: iterate the manifest + transforms + overlay until `generate()` produces a **zero git-diff** against it. One assertion subsumes the narrower grep/leak gate and proves both completeness (nothing missing) and determinism in a single test. ## When to Use - Building an export / template / codegen / sanitisation pipeline - The target output already exists as a hand-maintained reference - You're tempted to write a per-file "is this leaked?" classification by hand ## Steps 1. Identify that the target output already exists as a maintained artifact — that's the oracle. 2. Build the generator to a clean output directory. 3. `git diff --no-index <generated> <oracle>` — every residual diff line drives the next transform or overlay rule. 4. Loop until the diff is empty. An empty diff ⊇ any narrower content/leak gate, so you can drop the hand-maintained grep checklist. **Determinism sub-check:** if you prove idempotence with "regenerate, then `git diff <generated-file>`", the diff is **vacuous while the file is untracked** — diffing an untracked path always shows clean, a false pass. `git add <file>` to establish a baseline first, *then* regenerate and `git diff --stat` (staged vs working). Distinguish genuinely-changed live values (today's reading) from structural churn. ## Caveat The oracle may embed downstream changes not present in the source (e.g. a later dependency pin, a sibling repo's contract file). Those become **overlay files** in the generator — the zero-diff requirement forces you to account for them either way, which is the point. ## A green diff can still be a false success Exit 0 is necessary, not sufficient. Interrogate *how* the green was reached: - **Green by snapshotting the target.** The gate is satisfiable by vendoring a copy of the oracle and copying it back — converging by overlaying, not *deriving*. After the test goes green, inspect the **derive-count vs copy/overlay-count** composition against the ticket's intent; refuse to rubber-stamp a green achieved mostly by copying (e.g. 73 of 80 files overlaid). - **Thin-derivation pivot.** If a "derive the public artifact from source" pipeline turns out to derive only a handful and must vendor the rest verbatim, stop and surface the honest derive-vs-vendor split via AskUserQuestion, and record the reduced value in the ADR Consequences rather than shipping it as if the spec's promise held. - **Distrust a stale/multi-agent fixture.** When the oracle diff disagrees across agent runs (one says pass, another "pre-existing failure"), a prior agent likely left a dirty `/tmp/...-oracle` dir. Re-materialize the comparison fixture into a *fresh* dir (`git archive origin/main | tar -x`) before trusting any verdict — a persisted golden rots silently. ## Non-determinism in the generator defeats the oracle before you start A zero-diff oracle only works if regenerating unchanged input produces unchanged bytes. Tools that stamp wall-clock metadata break that silently, so every run "changes" and the oracle degrades into noise you learn to ignore. The canonical case: **matplotlib bakes a `<dc:date>` into a `<metadata>` block (plus a version comment) in every SVG it saves.** A regenerate-and-commit pipeline then produces a spurious byte-diff on *every* run even when the plotted data is identical — defeating last-good caching, golden-file snapshot tests, and any "these SVGs are deterministic enough to diff" assumption. Strip the metadata block after `savefig` before comparing or committing. Generalised: before trusting a zero-diff oracle, regenerate **twice with no input change** and confirm the second diff is empty. If it isn't, find the timestamp, version string, hash seed, or dict-ordering that moved, and normalise it — the oracle is worthless until that passes. (Absorbed 2026-08-12 from the orphaned `matplotlib-svg-strip-dc-date-for-deterministic-diffs`, deleted by `ece9ecf` into the memory tier ADR-0018 later retired.) ## Scan the assembled output, not the source The leak/safety gate must run against the **built tree**, not the source diff. The generator or overlay step can itself introduce a leak that appears in no source file — an inlined value, a templated path, a vendored fixture. Audit what will actually ship, not what went in. ## Merge conflicts in the generated output Never hand-merge a generated index/hub. If a sibling lane regenerated the same generated file and you conflict, re-run the generator (it writes the union of both inputs) and overwrite the conflict markers with its output.
From hjr15/claude-kit, MIT.
More from hjr15/claude-kit
- 0.524score
architect-team
hjr15
Deploy the architecture agents (architect, code-architect, backend-architect) as a coordinated design council to design or review a feature/system before it's…
SkillBFreshness: BClaude Code +9 - 0.524score
code-team
hjr15
Deploy the code-quality agents (code-quality-reviewer, code-architect) alongside the /code-review skill to answer "is this code well-built?" — clean code…
SkillBFreshness: BClaude Code +9 - 0.524score
doc-accuracy-audit
hjr15
Use when validating that a repo's READMEs and docs are still accurate against the current code — endpoints, ports, counts, env vars, commands, schemas, event…
SkillBFreshness: BClaude Code +9 - 0.524score
backport-review-fix-into-plan-of-record
hjr15
Use when a per-task review during subagent-driven development catches and fixes a real bug in code that a plan-of-record authored — edit the plan itself to…
SkillBFreshness: BClaude Code +9 - 0.524score
fix-blocker-rather-than-override
hjr15
Use when a pre-existing master CI gate is red and blocking your unrelated PR — decide between fix-the-blocker (compounds across all PRs) and admin-override…
SkillBFreshness: BClaude Code +9 - 0.524score
multi-agent-branch-collision-recovery
hjr15
Use when a commit landed on the wrong branch because a parallel agent shifted the active branch in a shared working directory.
SkillBFreshness: BClaude Code +9 - 0.519score
ghcr-first-push-403-seed-and-link
hjr15
Use when a CI build succeeds but the GHCR push fails 403 Forbidden for a service whose package never existed, on a personal (non-org) account.
SkillBFreshness: BClaude Code +9 - 0.517score
git-checkout-B-from-worktree-moves-a-foreign-checkouts-branch
hjr15
Use before `git checkout -B <branch>` / `git branch -f` / `git reset --hard` on a SHARED branch name from inside a worktree — `-B` force-moves the ref even…
SkillBFreshness: BClaude Code +9 - 0.517score
symlink-vs-realfile-classify-before-deleting-fanout-dups
hjr15
Use before deleting "duplicates" during a skill/config dedup on a symlink-fanned tree — run a `test -L` classification loop first, so you remove only genuine…
SkillBFreshness: BClaude Code +9 - 0.499score
grill-brainstorm-build
hjr15
Use when the user wants to go from a rough idea to implementation, running through interrogation, options exploration, and build in one flow.
SkillBFreshness: BClaude Code +9 - 0.474score
mcp-overflow-delegate-summary
hjr15
Use when an MCP tool result is dumped to a tool-results/*.txt file because it exceeded the token cap — delegate the read+summarize to a general-purpose…
SkillCFreshness: CClaude Code +9 - 0.474score
mobile-team
hjr15
Deploy the mobile agents (mobile-app-builder, mobile-ux-optimizer) — with ui-designer/ux-researcher/frontend-developer on call — to design and build native or…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 15, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hjr15/claude-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hjr15
- 0.524score
fix-blocker-rather-than-override
hjr15
Use when a pre-existing master CI gate is red and blocking your unrelated PR — decide between fix-the-blocker (compounds across all PRs) and admin-override…
SkillBFreshness: BClaude Code +9 - 0.524score
backport-review-fix-into-plan-of-record
hjr15
Use when a per-task review during subagent-driven development catches and fixes a real bug in code that a plan-of-record authored — edit the plan itself to…
SkillBFreshness: BClaude Code +9 - 0.524score
code-team
hjr15
Deploy the code-quality agents (code-quality-reviewer, code-architect) alongside the /code-review skill to answer "is this code well-built?" — clean code…
SkillBFreshness: BClaude Code +9 - 0.524score
architect-team
hjr15
Deploy the architecture agents (architect, code-architect, backend-architect) as a coordinated design council to design or review a feature/system before it's…
SkillBFreshness: BClaude Code +9 - 0.524score
doc-accuracy-audit
hjr15
Use when validating that a repo's READMEs and docs are still accurate against the current code — endpoints, ports, counts, env vars, commands, schemas, event…
SkillBFreshness: BClaude Code +9 - 0.524score
multi-agent-branch-collision-recovery
hjr15
Use when a commit landed on the wrong branch because a parallel agent shifted the active branch in a shared working directory.
SkillBFreshness: BClaude Code +9
Cite this page
generator-oracle-zero-diff-verify skill. Agent Mart. https://agentmart.dev/skills/hjr15-generator-oracle-zero-diff-verify (last updated 2026-10-24)