gate-engineering

A method for designing lasting checks that detect recurring software defects. These checks can include linters, continuous-integration checks, contract tests, corpus scans, and snapshot or golden tests.

In plain words
What is it for?
Use it to add or review quality gates, create known-bad and known-good test cases, prove that a detector fails and passes as expected, and scan the relevant code or data collection.
Why use it?
It turns a one-time bug fix into a repeatable safeguard that can detect the same class of problem in future changes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/takeoff69/codex-skills-kit/gate-engineering
Any agent
npx skills add TAKEOFF69/codex-skills-kit --skill gate-engineering
Clone the repo
git clone --depth 1 https://github.com/TAKEOFF69/codex-skills-kit

Made for: Claude Code, Codex.

Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 926 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00080 $0.00926
Opus 5 $0.00040 $0.00463
Sonnet 5 $0.00016 $0.00185
Haiku 4.5 $0.00008 $0.00093

Measured 3d ago against content hash 5709917f1773, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gate-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gate-engineering/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gate Engineering

Build standing quality nets that prove they detect intended defect class.

Scope

This skill applies to persistent repository gates: lint rules, CI checks, tripwires, contract suites, corpus detectors, and golden tests. Ordinary unit tests written with a feature do not each need full gate ceremony.

Core rule

A gate never observed failing is unproven. Ship known-bad input, known-good twin, and repeatable way to prove catch.

Five laws

  1. Prove red, then green. Seed representative defect and observe non-zero failure. Fix it and observe pass. Preserve both fixtures and expose --selftest or equivalent deterministic command.
  2. Fix classes, not instances. Recurrence turns one reported case into corpus problem. Detect class, scan full owned corpus, fix all findings, then keep detector as gate.
  3. Keep fixtures hermetic. Commit inputs. Avoid live database, mutable cache, network, current date, or content SHA dependencies unless gate explicitly tests those boundaries.
  4. Assert contract, not incidental snapshot. Prefer invariant such as presence, range, mapping, ordering, or semantic label. Byte-exact and pixel-exact snapshots need clear reason and controlled update process.
  5. Audit consumers. Producer validation does not protect cached, read, import, or alternate write paths. Enumerate bypasses and gate contract where consumers can violate it.

Assertion traps

  • Assert presence before uniqueness – zero matches are trivially unique.
  • Assert selection is non-empty before all(...) or universal validity.
  • Ensure failure fixture reaches code path under test rather than being filtered earlier.
  • Include near-miss good fixture so detector does not encode broad false positives.
  • Test disabled or feature-flagged path by toggling it in controlled run.

Gate lifecycle

  • Recalibrate baseline after legitimate behavior change; do not weaken invariant to make CI green.
  • Re-enable disabled gate only after current corpus passes it.
  • Refresh tripwire baseline with producer or consumer refresh that changes expected truth.
  • Match gate cadence to data cadence.
  • Version fixture schema when parser or contract changes.
  • Record scoped skip with owner and expiry; never silently disable.

Read the full file on GitHub · 94 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 94 lines · 80 tokens per session scan A 5709917f1773

Subscribe to this mod's changes

gate-engineering is a skill published in the GitHub repository TAKEOFF69/codex-skills-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 926 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

hooksmith

Use when designing or reviewing safe Grok Build hooks for linting, tests, formatting, notifications, command guards, lifecycle automation, or project hook trust decisions.

DominikTobureto/awesome-grok-build · 35 tokens

manage-codex-skills

Inventory, classify, route, catalog, relocate, or validate Codex skills and generate a skills menu. Use for skill-library organization or when Codex must find task-relevant skills. Classification, relocation, creation, revision, and promotion require user approval.

WildPigKing/codex-project-skill-manager · 58 tokens

reflect-codex-workflows

Compare evidence from a current or completed project with installed skills and decide whether to reuse, revise, create, or not skill the lesson. Use for workflow reflection or proposed skill upgrades. Do not edit skills without explicit authorization.

WildPigKing/codex-project-skill-manager · 51 tokens

bootstrap-codex-workspace

Inspect a Windows or macOS Codex environment and produce a read-only, approval-bound plan for the global AGENTS.md path, user skills root, and root for future projects. Use for workspace setup, bootstrap, or location planning. Do not write outside the repository until the user approves the exact plan ID.

WildPigKing/codex-project-skill-manager · 69 tokens

maintain-project-ai-records

Initialize and maintain lightweight AI work records in a writable project. Use on the first substantive writable task and after meaningful milestones. Do not create records for read-only inspection or trivial answers.

WildPigKing/codex-project-skill-manager · 43 tokens

organize-codex-projects

Choose a location and internal structure for a future Codex project, including focused projects and umbrella projects with durable subprojects. Use when creating or planning a new project. Do not move, rename, or normalize existing projects.

WildPigKing/codex-project-skill-manager · 52 tokens