plugins/verification-gate/skills/verification-gate/SKILL.md
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
npx skillsauth add jamie-bitflight/claude_skills verification-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill implements mandatory verification checkpoints that prevent pattern-matching from training data from overriding explicit reasoning. It enforces structural gates between hypothesis formation and action execution, ensuring actions align with verified hypotheses rather than reflexive pattern-matching responses.
When to use this skill:
Core principle: Verification is not advisory—it is a mandatory gate. Actions that don't align with verified hypotheses are BLOCKED.
Before executing ANY implementation action, complete ALL checkpoints in sequence. If any checkpoint fails, HALT and report the failure.
Requirement: Have I explicitly stated what system/component the issue affects?
Test:
If NO:
BLOCKED - Hypothesis not stated
REQUIRED: State hypothesis explicitly before proceeding
EXAMPLE: "Hypothesis: The issue affects [specific system/component]"
If YES: Proceed to Checkpoint 2
Requirement: Have I gathered evidence to confirm or refute my hypothesis?
Verification methods:
Test:
If NO:
BLOCKED - Hypothesis not verified
REQUIRED: Gather evidence before proceeding
NEXT STEPS:
1. Identify what evidence would confirm/refute hypothesis
2. Use appropriate tools to gather that evidence
3. Document findings with file paths and line numbers
4. Revise hypothesis if evidence contradicts it
If YES: Proceed to Checkpoint 3
Requirement: Does my planned action target the SAME system as my hypothesis identified?
Alignment template:
┌─────────────────────────────────────────────────────────┐
│ HYPOTHESIS SYSTEM: [What system does my hypothesis │
│ identify as the problem location?] │
├─────────────────────────────────────────────────────────┤
│ ACTION SYSTEM: [What system does my planned action │
│ operate on or modify?] │
├─────────────────────────────────────────────────────────┤
│ ALIGNMENT CHECK: [Same system = ✓ Proceed] │
│ [Different systems = ✗ BLOCKED] │
└─────────────────────────────────────────────────────────┘
Common misalignments:
| Hypothesis System | Wrong Action System | Why Blocked |
| ---------------------------------------- | ---------------------------- | ----------------------------- |
| PEP 723 inline metadata (# /// script) | uv sync (pyproject.toml) | Different dependency systems |
| Docker container config | Host network settings | Different network layers |
| Git repository state | File system permissions | Different system domains |
| Python virtual environment | Global pip install | Different installation scopes |
| Application code logic | Infrastructure configuration | Different operational layers |
If MISALIGNED:
✗ BLOCKED - Hypothesis-action misalignment detected
HYPOTHESIS targets: [system A]
ACTION operates on: [system B]
REQUIRED: Either:
1. Revise action to target same system as hypothesis
2. Revise hypothesis after gathering new evidence
3. Report that systems are unrelated and task needs clarification
If ALIGNED: Proceed to Checkpoint 4
Requirement: Is this action based on verified project reality or pattern-matching from training data?
Detection questions:
Pattern-matching indicators:
Note on research tools: Prefer MCP tools for verification:
mcp__Ref__ref_search_documentation for high-fidelity documentation (verbatim source)mcp__exa__get_code_context_exa for code examples and library usagemcp__exa__web_search_exa for web research with LLM-optimized outputWeb resource access, definitive guide for getting accurate data for high quality results
If pattern-matching detected:
⚠ PATTERN-MATCHING WARNING
I am using training data patterns without project verification.
REQUIRED actions:
1. State: "I am pattern-matching from training data without verification"
2. Read relevant files to understand current project setup
3. Check project documentation or configuration
4. Verify approach against project reality
5. Return to Checkpoint 2 with gathered evidence
If verified against project reality: Proceed to execution
After completing ALL four checkpoints:
✓ ALL CHECKPOINTS PASSED → EXECUTE ACTION
Document verification trail:
VERIFICATION COMPLETE:
✓ Checkpoint 1: Hypothesis stated - [brief hypothesis]
✓ Checkpoint 2: Verified via [files/docs read]
✓ Checkpoint 3: Aligned - both target [system name]
✓ Checkpoint 4: Verified against project reality
EXECUTING: [action description]
✗ ANY CHECKPOINT FAILED → HALT
Report failure explicitly:
EXECUTION BLOCKED
Failed checkpoint: [number and name]
Reason: [specific failure reason]
Required before proceeding: [specific next steps]
Observation: ModuleNotFoundError: No module named 'pydantic'
Verification workflow:
Checkpoint 1 - State hypothesis:
Checkpoint 2 - Gather evidence:
# /// script blockpyproject.toml to check declared dependenciesCheckpoint 3 - Verify alignment:
# /// script block# /// script blockCheckpoint 4 - Pattern-matching check:
# /// script block)Result: Execute action
WRONG approach (BLOCKED):
uv sync (operates on pyproject.toml)Observation: Application not respecting new timeout setting
Verification workflow:
Checkpoint 1 - State hypothesis:
Checkpoint 2 - Gather evidence:
Checkpoint 3 - Verify alignment:
Checkpoint 4 - Pattern-matching check:
Result: Execute action
Observation: npm build fails with module resolution error
Verification workflow:
Checkpoint 1 - State hypothesis:
Investigation required:
After investigation:
npm install to sync dependenciesResult: Execute action
The model must activate this skill:
Automatically before:
On detection of:
This skill works in conjunction with:
This skill enforces existing CLAUDE.md verification protocols by adding structural gates:
CLAUDE.md states: "The model must verify behavior with authoritative sources"
This skill enforces: "Cannot execute until verification completed and documented"
CLAUDE.md states: "Never cargo cult code without verification"
This skill enforces: "Checkpoint 4 detects and blocks pattern-matching behavior"
CLAUDE.md states: "Distinguish verified information from assumptions"
This skill enforces: "Checkpoint 2 requires evidence before proceeding"
This skill includes reference documentation:
Authoritative research backing the verification gate approach:
Load this reference when:
Common failure modes and how verification prevents them:
Load this reference when:
The model must actively monitor for verification violations:
Warning signs:
When warning signs detected:
⚠ VERIFICATION VIOLATION DETECTED
I attempted to bypass verification checkpoint.
HALTING and returning to Checkpoint [number].
This skill implements defensive programming for LLM reasoning. Just as compilers block syntactically invalid code, verification gates block logically misaligned actions.
Key principle: Speed without verification is not efficiency—it's error propagation. Taking time to verify prevents cascading failures, reduces debugging cycles, and builds user confidence.
Overhead justification: 2-3 Read operations (50-100 tokens each) prevent wrong implementations requiring 20+ tool calls to debug and fix (4000+ tokens). The verification overhead is small relative to the cost of debugging misaligned actions.
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.
development
Use when auditing docs vs code drift, syncing docs after changes, optimizing CLAUDE.md or SKILL.md for AI consumption, validating GLFM and Markdown, or summarizing files/URLs/images — routes each task to the correct specialist agent via /rwr:audit, /rwr:optimize, or /rwr:author