verification-loop

Six-phase quality gate for code changes. Runs build, typecheck, lint, test, security, and diff-review in sequence. Supports JavaScript/TypeScript, Python, and Rust with auto-detection and skip conditions.

5 stars

Best use case

verification-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Six-phase quality gate for code changes. Runs build, typecheck, lint, test, security, and diff-review in sequence. Supports JavaScript/TypeScript, Python, and Rust with auto-detection and skip conditions.

Teams using verification-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/verification-loop/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/development/verification-loop/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/verification-loop/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How verification-loop Compares

Feature / Agentverification-loopStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Six-phase quality gate for code changes. Runs build, typecheck, lint, test, security, and diff-review in sequence. Supports JavaScript/TypeScript, Python, and Rust with auto-detection and skip conditions.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Verification Loop Skill

## Overview

Six-phase quality gate validating code changes sequentially. Each phase must pass before proceeding. Auto-detects project type and adapts commands.

## When to Use

- Before committing changes
- Pre-merge validation
- CI/CD pipeline integration
- Code review preparation

## Phase Definitions

### Phase 1: Build

| Project | Command | Skip If |
|---------|---------|---------|
| Node.js | `npm run build` | No build script in package.json |
| Python | `uv build` / `python -m build` | No pyproject.toml or setup.py |
| Rust | `cargo build --release` | No Cargo.toml |

### Phase 2: Typecheck

| Project | Command | Skip If |
|---------|---------|---------|
| TypeScript | `tsc --noEmit` | No tsconfig.json |
| Python | `pyright` / `mypy .` | No type checker installed |
| Rust | (included in build) | Always (cargo handles types) |

### Phase 3: Lint

| Project | Command | Skip If |
|---------|---------|---------|
| JS/TS | `eslint . --ext .js,.jsx,.ts,.tsx` | No eslint config |
| Python | `ruff check .` / `flake8 .` | No linter config |
| Rust | `cargo clippy -- -D warnings` | No Cargo.toml |

### Phase 4: Test

| Project | Command | Skip If |
|---------|---------|---------|
| JS/TS | `npm test` / `npm run test:coverage` | No test script |
| Python | `pytest --cov` | No tests directory |
| Rust | `cargo test` | No tests |

### Phase 5: Security

| Project | Command | Skip If |
|---------|---------|---------|
| JS/TS | `npm audit` | No package-lock.json |
| Python | `safety check` / `pip-audit` / `bandit -r .` | No scanner installed |
| Rust | `cargo audit` | cargo-audit not installed |

### Phase 6: Diff Review

**Command:** `git diff HEAD~1 --stat`

Provides summary of changes for review context. Always informational, never fails.

## Detection Logic

```bash
# Project type detection
detect_project() {
  [ -f "package.json" ] && echo "node"
  [ -f "pyproject.toml" ] || [ -f "setup.py" ] && echo "python"
  [ -f "Cargo.toml" ] && echo "rust"
}

# Skip conditions per phase
should_skip_typecheck() {
  [ ! -f "tsconfig.json" ] && [ ! -f "pyproject.toml" ]
}

should_skip_lint() {
  [ ! -f ".eslintrc.js" ] && [ ! -f ".eslintrc.json" ] && \
  [ ! -f "ruff.toml" ] && [ ! -f "Cargo.toml" ]
}

should_skip_test() {
  [ ! -d "tests" ] && [ ! -d "test" ] && \
  ! find . -name "*_test.py" -o -name "test_*.py" | grep -q .
}
```

## Execution Flow

```
START -> BUILD -> TYPECHECK -> LINT -> TEST -> SECURITY -> DIFF-REVIEW -> SUCCESS
              \         \         \       \          \
               -> SKIP   -> SKIP   -> SKIP -> SKIP   -> SKIP (if conditions met)

Any phase FAIL -> STOP with error report
```

## Configuration

### Environment Variables

```bash
VERIFICATION_SKIP_PHASES="security,diff-review"  # Skip specific phases
VERIFICATION_COVERAGE_MIN=80                      # Coverage threshold
VERIFICATION_STRICT=true                          # Fail on warnings
```

### Config File (.verification-loop.yml)

```yaml
phases:
  build:
    enabled: true
    timeout: 300
  typecheck:
    enabled: true
    timeout: 120
  lint:
    enabled: true
    allow_warnings: false
  test:
    enabled: true
    coverage_threshold: 80
  security:
    enabled: true
    severity_threshold: moderate
  diff-review:
    enabled: true
    compare_ref: HEAD~1

skip_conditions:
  - pattern: "*.md"
    skip_phases: [build, typecheck, lint, test]
```

## Error Handling

| Phase | On Failure |
|-------|------------|
| Build | Stop, report compilation errors |
| Typecheck | Stop, report type errors |
| Lint | Stop, report lint violations |
| Test | Stop, report failed tests |
| Security | Report vulns, continue if below threshold |
| Diff-Review | Always succeeds (informational) |

## Integration

**CI (GitHub Actions):** Use `fetch-depth: 2` for diff-review, run each phase in sequence.

**Pre-Commit Hook:**
```bash
#!/bin/bash
./verification-loop.sh --skip=security,diff-review
[ $? -ne 0 ] && exit 1
```

## Metrics

| Metric | Target |
|--------|--------|
| Pass Rate | >95% |
| Duration | <60s |
| Test Coverage | >80% |

---

**Version 1.0.0** (2026-01-24): Initial release

Related Skills

subagent-write-verification

5
from vamseeachanta/workspace-hub

Independently verify subagent-claimed file writes with filesystem and git checks before treating the artifact as real, before committing it, and before referencing the path in downstream prompts.

llm-wiki-audit-feedback-loop

5
from vamseeachanta/workspace-hub

Durable feedback loop for correcting llm-wiki pages without losing the correction to chat history. Use when (1) a human notices a wiki page is wrong, outdated, or contradicts a source, (2) processing the `audit/` inbox of a domain wiki, (3) reviewing what feedback has been resolved vs deferred, (4) needing to leave a comment on a specific text range that survives line- number drift. Implements the anchored-text audit file pattern from lewislulu/llm-wiki-skill, adapted for workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Extends the 5-op model (compile/ingest/query/lint) from research/llm-wiki with the missing `audit` op. Never silently delete feedback — rejected audits stay archived with rejection rationale.

tdd-verification-and-adversarial-review

5
from vamseeachanta/workspace-hub

Verify pre-written TDD tests pass, conduct adversarial code review on committed diffs, and route findings to existing issues

tax-form-navigation-verification

5
from vamseeachanta/workspace-hub

Systematic workflow for verifying tax software calculations against entry guide specifications

portable-pattern-verification-workflow

5
from vamseeachanta/workspace-hub

Multi-package implementation with verification strategy for cross-platform configuration hardening

multi-year-tax-filing-verification-workflow

5
from vamseeachanta/workspace-hub

Verify and reconcile complex multi-form tax filings by cross-referencing source documents, identifying data dependencies, and validating line-by-line against authoritative records.

plan-review-handoff-verification

5
from vamseeachanta/workspace-hub

Verify a parked GitHub issue plan-review handoff across live labels, local markers, README rows, canonical review artifacts, and stale plan-body evidence before reporting next action.

overnight-worktree-verification-fallback

5
from vamseeachanta/workspace-hub

Verify overnight multi-worktree Codex batches when auto-sync, duplicate-lane convergence, and sandbox-blocked review create misleading local state or review provenance.

targeted-artifact-commit-verification

5
from vamseeachanta/workspace-hub

Verify whether the exact files from a just-completed task are still uncommitted before creating another commit, especially in dirty repos with unrelated churn.

artifact-commit-verification

5
from vamseeachanta/workspace-hub

Class-level artifact and commit verification for claimed agent work, exact file diffs, and closeout evidence.

closed-issue-plan-refile-loop

5
from vamseeachanta/workspace-hub

Reopen and re-drive a previously closed GitHub plan issue after review/governance blockers are fixed, without prematurely restoring approval state.

Codex-worker-patch-loop

5
from vamseeachanta/workspace-hub

Use Codex as a delegated worker to patch canonical skills or policy files directly, then verify and iterate from the main session.