api-governance

A procedure for checking changes to API contracts before merging, deploying, publishing, or registering tools. An API contract is the agreed shape of communication between software, such as an OpenAPI file, GraphQL schema, protobuf definition, MCP manifest, or agent tool schema.

In plain words
What is it for?
Submitting a complete base-to-head change set for preflight review, verifying governance receipts, and retrieving past decisions.
Why use it?
It identifies breaking changes and requires the appropriate governance decision before contract changes are released. Documentation-only edits without contract changes do not require it.

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/coderifts/api-governance/api-governance
Any agent
npx skills add coderifts/api-governance --skill api-governance
Clone the repo
git clone --depth 1 https://github.com/coderifts/api-governance

Made for: Claude Code, Codex.

Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00126 $0.01081
Opus 5 $0.00063 $0.00541
Sonnet 5 $0.00025 $0.00216
Haiku 4.5 $0.00013 $0.00108

Measured yesterday against content hash 5fac6fab69dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

api-governance scanned grade C with 1 finding 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 yesterday.

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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- SOURCE OF TRUTH (do not hand-author tool names/descriptions or rule sentences): - Skill trigger description: agent-setup OpenAI/AGENTS rule body (coderifts-app src/agent-host-rule.js → scripts/generate-agent-host-fi
plugins/api-governance-openai/skills/api-governance/SKILL.md · 89 lines

How it starts

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

CodeRifts API Governance

Call preflight_change_set before merge, deploy, publish, or tool registration when a contract artifact changed. No mutation of API/schema/contract surfaces without a valid authorize-path receipt for the act you are about to perform. Branch on execution_action only.

When to use

  • Merge, deploy, publish, or tool registration when a contract artifact changed (OpenAPI/Swagger, GraphQL, gRPC/protobuf, AsyncAPI, MCP manifest, or agent tool schemas).
  • You hold a prior chain receipt and need authenticity/lifecycle only (verify_receipt).
  • You need a past decision by id (get_decision_details).

Do not use for a documentation-only change (README, guides, comments) with no contract artifact content change.

Tools

The coderifts MCP server (https://app.coderifts.com/mcp) exposes exactly three tools (names from generated mcp.json — do not invent others):

  • preflight_change_set — Preflight a COMPLETE base→head change set of contract artifacts and return risk score and breaking-change analysis — plus, on the AUTHORIZE path only, a governance decision (ALLOW / WARN / REQUIRE_APPROVAL / BLOCK) and a signed chain-receipt when applicable. ANALYZE returns informational risk only: analysis_outcome, may_execute:false, no decision, no receipt.

    Requires a pending base→head (before/after) contract change you are about to act on (merge, deploy, publish, or register tools). No pending change set → do not call this tool.

Read the full file on GitHub · 89 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. yesterday First seen · 89 lines · 126 tokens per session scan C 5fac6fab69dd

Subscribe to this mod's changes

api-governance is a skill published in the GitHub repository coderifts/api-governance (0 stars, last pushed yesterday), licensed MIT. It adds 126 tokens to every session and 1,081 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.