contract-first

contract-first is a skill for Codex from kreek/consult. It costs 28 tokens per session (896 once invoked), scanned A, original, MIT.

A coding guide for agreeing on caller-facing interfaces and shared structures before implementation begins. These include functions, data types, API endpoints, command-line options, event data, and database schemas.

In plain words
What is it for?
Use it before changing public functions, package boundaries, APIs, configuration, file formats, migrations, or other shared contracts.
Why use it?
It reduces rework and prevents different parts of a system from depending on an interface that was never agreed on.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before changing public functions, package boundaries, APIs, configuration, file formats, migrations, or other shared contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kreek/consult/contract-first
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 kreek/consult --skill contract-first
Clone the repo
git clone --depth 1 https://github.com/kreek/consult

Made for: Codex.

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 contract-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/kreek/consult/contract-first/github.svg)](https://agentmods.dev/skills/kreek/consult/contract-first)
Your own site
<a href="https://agentmods.dev/skills/kreek/consult/contract-first"><img src="https://agentmods.dev/badge/skills/kreek/consult/contract-first/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for contract-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/kreek/consult/contract-first"><img src="https://agentmods.dev/badge/skills/kreek/consult/contract-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 896 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.00028 $0.00896
Opus 5.5 $0.00011 $0.00358
Sonnet 5.5 $0.00006 $0.00179
Haiku 4.5 $0.00003 $0.00090

Measured 2mo ago against content hash 58f1948f6189, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

contract-first 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 2mo 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.

agents/.agents/skills/contract-first/SKILL.md · 80 lines

How it starts

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

Contract First

Iron Law

CALLER-FACING INTERFACES AND SHARED STRUCTURE MUST BE APPROVED BEFORE IMPLEMENTATION.

When to Use

  • A task defines or materially changes a caller-facing interface or shared structure: exported function, public type, HTTP endpoint, CLI/env/config surface, event payload, file format, database schema, migration step, package/module boundary, project layout, or the public surface of a significant new module.
  • Reviewing whether implementation started before contract approval.

When NOT to Use

  • Internal helper changes, local file moves, or private organization with no boundary future work will depend on.
  • Typos, formatting, comment-only, or docs-only edits.
  • The approach or solution direction is still unsettled; settle it in specify first.

Rules

  1. A contract is any shape concrete enough that another caller, process, service, user, migration step, package, or future module will depend on it. An export with no caller outside the change is not yet a contract. Working out the actual signatures, types, and shapes is this skill's job.
  2. The gate scales with reversal cost. Gate a shape when outside callers will bind to it and changing it later means breakage or migration. An additive, easily reversed change gets its shape stated in the close-out and continues; do not stop the work for it.
  3. Approval covers the named shape only. Compatibility (renames, removals, aliases, shims, deprecation paths) needs its own explicit decision.
  4. An approving design or RFC approves the direction, not the concrete shapes. The list of proposed surfaces with evidence is the approval.
  5. Silence is not approval. Wait for an explicit approve, revise, or reject. When no human can answer in this run (headless, scheduled, or delegated sessions), do not deadlock: build the most conservative version, mark the contract provisional, and flag the pending decision in the close-out.
  6. If implementation discovers a materially different contract, reopen the gate.

Read the full file on GitHub · 80 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. 2mo ago Changed · +1 tokens per session 58f1948f6189
  2. 3mo ago Changed · -30 lines 3ae3856f997c
  3. 3mo ago First seen · 110 lines · 27 tokens per session scan A 7cfe0c8be2e3

Subscribe to this mod's changes

contract-first is a skill published in the GitHub repository kreek/consult (1 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 896 once invoked, about $0.0001 per session on Opus 5.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

contract-first compared with skills from other repositories

contract-first next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
contract-firstkreek/consultSkill12mo agoMITA28Codex
clarifyramboz/jigSkill6todayMITA153Claude Code
explainramboz/jigSkill6todayMITA173Claude Code
security-reviewramboz/jigSkill6todayMITA147Claude Code
pr-reviewramboz/jigSkill6todayMITA183Claude Code
pandadoc-quote-builderPandaDoc/mcp-server-guideSkill3yesterdayMITA66Claude Code
pandadoc-transcript-proposalPandaDoc/mcp-server-guideSkill3yesterdayMITA83Claude Code