Agent skill

Delivery Gate

by affaan-m in affaan-m/ECC

Stop hook that blocks Claude from finishing until quality checks pass.

MITAuto-check passed

Install Delivery Gate

skills CLI
$ npx skills add affaan-m/ECC --skill delivery-gate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC delivery-gate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/delivery-gate .claude/skills/delivery-gate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
delivery-gate
GitHub stars
276k
Token cost
~1.3k tokens
SKILL.md length
464 words
Files
2
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

Stop hook that blocks Claude from finishing until quality checks pass.

  • Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass
  • SKILL.md covers What It Checks, Why, Install and Learning Libraries, plus 6 more sections
  • Runs Python scripts from its folder

What it does

Delivery Gate is an agent skill from affaan-m/ECC. Stop hook that blocks Claude from finishing until quality checks pass. Detects rationalization patterns (surface text heuristics), stale learning logs (filesystem mtime), and low disk space. Complements self-audit by mechanically enforcing learning capture habits. Use when Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `hooks/quality-gate.py`).

The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass

Example prompts

  • “/delivery-gate”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 4eb71d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Delivery Gate loads about 1.3k tokens when it runs. Until then it costs about 103 tokens; SKILL.md has 464 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 4eb71d9, republished under its MIT licence (© affaan-m). 464 words, ~1,266 tokens.

Download SKILL.mdSave it as .claude/skills/delivery-gate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
delivery-gate
description
Stop hook that blocks Claude from finishing until quality checks pass. Detects rationalization patterns (surface text heuristics), stale learning logs (filesystem mtime), and low disk space. Complements self-audit by mechanically enforcing learning capture habits. Use when Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass.
metadata.version
1.1.1
metadata.origin
ECC

Delivery Gate — Mechanical Quality Gate for Claude Code

A Stop hook that checks three things before Claude can finish a session, using only deterministic checks — file modification timestamps, disk usage, and regex patterns on the transcript text. No AI inference.

This is distinct from reasoning gates (like self-audit): delivery-gate checks machine-verifiable facts; self-audit checks output quality across four reasoning dimensions. Together they form defense in depth:

  • delivery-gate: "Was the learning library touched today? Is disk space safe?"
  • self-audit: "Is the file content correct, complete, and honest?"

This is the same pattern as CI pipeline gates — automated, deterministic checks that verify machine-readable facts rather than trusting self-reported status.

What It Checks

CheckMechanismOn Hit
Rationalization patternsRegex on transcript tailWarning only (never blocks)
Stale learning librariesmtime on 5 configurable pathsWarning if some stale; Block if >=3 stale OR growth-log stale + complex task
Disk space < 50GBshutil.disk_usageWarning
Disk space < 15GBshutil.disk_usageBlock (exit 2)

Rationalization detection warns about patterns like "skip tests for now" and "pre-existing bug" — surface signals that thinking may have been cut short. It never blocks on its own, because regex heuristics can false-positive. The blocking conditions are: disk critical, >=3 learning libs stale, OR growth-log specifically stale (all require complex task >=3 edits).

Why

Claude Code's built-in checks cover code quality (build → type → lint → test). But there's a different failure mode: the agent produces working code while the session hygiene was neglected — learning not captured, rationalized shortcuts, disk running out silently.

Over many sessions of "ship and forget," the human hasn't grown. This hook enforces the habit: complex task → must touch learning libraries.

Install

bash
cp quality-gate.py ~/.claude/scripts/

Add to ~/.claude/settings.json:

json
{
  "hooks": {
    "Stop": [{
      "hooks": [{
        "type": "command",
        "command": "python3 ~/.claude/scripts/quality-gate.py",
        "timeout": 5000
      }]
    }]
  }
}
Show full SKILL.md (190 more words)Show less

Learning Libraries

Create these files in your project's memory directory. The hook checks if at least one was updated today:

memory/
├── growth-log/          # Daily learning entries (directory)
├── decisions/log.md     # Decision log
├── output-index.md      # Index of session outputs
├── ratings-tracker.md   # Skill ratings over time
└── tooling_capabilities.md  # Known tools inventory

Customize the LIBS dict to match your own file structure.

Configuration

Edit quality-gate.py:

VariableDefaultPurpose
RATIONALIZE4 patternsRegex patterns for rationalization detection
LIBS5 librariesFiles/dirs to check for today's updates
COMPLEX_THRESHOLD3Edit/Write calls to classify as complex
DISK_WARN_GB50Warn below this
DISK_CRIT_GB15Block below this

Examples

Simple session — allowed:

edit_count=1 (< 3, not complex) → exit 0

Complex task, learning captured — allowed:

edit_count=5 (complex) → checks LIBS → growth-log updated today → exit 0

Complex task, no learning — BLOCKED:

edit_count=4 (complex) → checks LIBS → all 5 stale → exit 2
stderr: "Blocked: complex task completed but no learning captured today."

Low disk space — BLOCKED:

disk_free=12GB < 15GB critical → exit 2
stderr: "Blocked: disk space at 12GB (threshold: 15GB)."

Limitations

The hook enforces the habit of touching learning libraries, not the quality of what was recorded. If output-index.md is updated but growth-log is skipped, the hook passes (1 of 5 libraries touched). This is by design: mechanical gates check machine-verifiable facts. For content quality verification, pair with self-audit.

Compatibility

  • Python 3.8+ (uses from __future__ import annotations)
  • Cross-platform: Windows, macOS, Linux
  • Zero dependencies beyond stdlib

Quality

This code went through 4 rounds of automated code review (CodeRabbit + Greptile) with 9 real bugs found and fixed.

See Also

  • self-audit — Reasoning quality gate (completeness/consistency/groundedness/honesty)
  • verification-loop — Code quality checks (build/type/lint/test)
  • gateguard — PreToolUse safety gate

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/delivery-gate of affaan-m/ECC.

  • SKILL.md
  • hooks/quality-gate.py

Open the folder on GitHubat commit 4eb71d9

Compare with similar skills

Delivery Gate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Delivery Gate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Delivery Gate this skillaffaan-m/ECC276k—~1.3kAutomated safety check: PassMIT
Block No Verify Hookwshobson/agents40k—~1.9kAutomated safety check: NotesMIT
Blocking IO Guardbytedance/deer-flow84k—~1.7kAutomated safety check: PassMIT
Crush Hook Writercharmbracelet/crush29k—~1.8kAutomated safety check: PassCustom licence
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Gate Testsvercel/next.js143k—~2.8kAutomated safety check: PassMIT

Similar skills

  • Block No Verify Hook

    wshobson/agents

    Configure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags.

    40k GitHub stars~1.9k tokensUpdated 6 days ago
    Testing & QAAuto-check: notes
  • Blocking IO Guard

    bytedance/deer-flow

    Adds a runtime test anchor for backend async code that could block the asyncio event loop, and proves the anchor fails when the blocking call returns.

    84k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Crush Hook Writer

    charmbracelet/crush

    Helps write, debug and configure Crush hooks in crush.json that block, approve or rewrite tool calls before they run.

    29k GitHub stars~1.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Gate Tests

    vercel/next.js

    Official

    How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.

    143k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Block Kit

    openclaw/openclaw

    Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

    392k GitHub stars~624 tokensUpdated today
    Auto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Delivery Gate

What does Delivery Gate do?

Stop hook that blocks Claude from finishing until quality checks pass. Delivery Gate is an agent skill from affaan-m/ECC. Stop hook that blocks Claude from finishing until quality checks pass.

When should I use Delivery Gate?

Delivery Gate fits situations like: Claude should be mechanically blocked from declaring work finished before quality checks and learning capture actually pass.

How do I install Delivery Gate in Claude Code?

Run `npx skills add affaan-m/ECC --skill delivery-gate -a claude-code`. Or copy the skill folder (skills/delivery-gate in affaan-m/ECC) into .claude/skills/delivery-gate in your project. Claude Code loads it when a task matches its description.

How do I install Delivery Gate in Codex?

Run `npx skills add affaan-m/ECC --skill delivery-gate -a codex`. Or copy the skill folder (skills/delivery-gate in affaan-m/ECC) into .agents/skills/delivery-gate in your project. Codex loads it when a task matches its description.

Can I use Delivery Gate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill delivery-gate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/delivery-gate, .gemini/skills/delivery-gate, .github/skills/delivery-gate and .opencode/skills/delivery-gate in your project.

What does Delivery Gate need to run?

Going by SKILL.md and its folder, Delivery Gate needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Delivery Gate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Delivery Gate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Delivery Gate use?

Delivery Gate is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Delivery Gate use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Delivery Gate?

Skills that share tags, products or a category with Delivery Gate: Block No Verify Hook (wshobson/agents, 40k stars), Blocking IO Guard (bytedance/deer-flow, 84k stars), Crush Hook Writer (charmbracelet/crush, 29k stars) and Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Delivery Gate?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,111 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 10, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.