midas-diff-gates

midas-diff-gates is a skill for Claude Code from okuzpe/midas-harness. It costs 49 tokens per session (883 once invoked), scanned A, original, Apache-2.0.

A code-review check that runs tests and quality checks only for files changed in the current work. It stores written result records, called receipts, for later review.

In plain words
What is it for?
Use it before closing a sprint when product code, deployment settings, or public API definitions changed.
Why use it?
It reduces unnecessary checks for documentation or tooling-only edits while still checking changes that could affect the product.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: model in frontmatter; mentions AGENTS.md.

Good fit Use it before closing a sprint when product code, deployment settings, or public API definitions changed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okuzpe/midas-harness/midas-diff-gates
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.

Any agent
npx skills add okuzpe/midas-harness --skill midas-diff-gates
Clone the repo
git clone --depth 1 https://github.com/okuzpe/midas-harness

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for midas-diff-gates

README.md
[![agentmods](https://agentmods.dev/badge/skills/okuzpe/midas-harness/midas-diff-gates.svg)](https://agentmods.dev/skills/okuzpe/midas-harness/midas-diff-gates)
Your own site
<a href="https://agentmods.dev/skills/okuzpe/midas-harness/midas-diff-gates"><img src="https://agentmods.dev/badge/skills/okuzpe/midas-harness/midas-diff-gates.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.00883
Opus 5 $0.00024 $0.00441
Sonnet 5 $0.00010 $0.00177
Haiku 4.5 $0.00005 $0.00088

Measured 7d ago against content hash 5dafdc3ba1a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

midas-diff-gates 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 7d 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.

cli/template/.harness/engine/skills/midas-diff-gates/SKILL.md · 77 lines

How it starts

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

midas-diff-gates — Diff-scoped gate receipts

Guard + state: <paths.engine>/templates/skill-state-ritual.md (+ AGENTS.md § Safety / Path resolution). Surface: internal (ADR-013) — prefer /close-sprint Step 0.5 path-pass; power-user may still type this slash.

Mechanical test + quality receipts for the current working diff. Run before /close-sprint when production paths changed. Does not replace /midas-verify (UI/API journeys) or Phase-8 rule conformance — /close-sprint still owns the independent orchestrate audit.

When to run

Diff touches Action
Production paths — product source, deploy config, public API contracts Run both gates; freeze receipts under {paths.cache}/gates/<run>/
Engine-only contributor edits (harness/, scripts/, cli/, installer) Skip OK — record reason in progress or audit notes
Docs-only (docs/, markdown rituals, no product source) Skip OK — record reason

Commands

Use the same --run id for both scripts (default: sprint id or timestamp):

node <paths.scripts>/gates/test-gate.mjs --run <id> [--base <ref>]
node <paths.scripts>/gates/quality-gate.mjs --run <id> [--base <ref>]

Receipts:

  • {paths.cache}/gates/<run>/test.json
  • {paths.cache}/gates/<run>/quality.json

Receipt semantics (isPassingReceipt)

A receipt passes when status is pass or skipped with a non-empty reason. fail or blockedblocks /close-sprint until fixed or re-run green.

Procedure

  1. Read paths.state + active sprint; resolve production diff (git diff vs base or staged).
  2. If no production paths → log skip + reason; stop (no receipts required).
  3. Run test-gate.mjs then quality-gate.mjs with the same --run id.
  4. Confirm both receipts exist and satisfy isPassingReceipt; cite paths in {runs}/sprints/NN-progress.md or session notes.

Does / Does not

Does Does not
Freeze deterministic test/quality receipts to cache Advance stage or pass Phase-8
Block close when gates fail/blocked Replace /midas-verify or UI proof
Allow explicit skip for non-production diffs Run LLM conformance audit

Read the full file on GitHub · 77 lines

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. 7d ago First seen · 77 lines · 49 tokens per session scan A 5dafdc3ba1a6

Subscribe to this mod's changes

midas-diff-gates is a skill published in the GitHub repository okuzpe/midas-harness (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 49 tokens to every session and 883 once invoked, about $0.0002 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