repo-contracts-and-boundaries

repo-contracts-and-boundaries is a skill for Claude Code from yfge/agent-harness-skills. It costs 41 tokens per session (933 once invoked), scanned A, original, MIT.

A set of repository checks that turn architecture rules, ownership, dependency direction, schemas, and quality limits into enforceable rules.

In plain words
What is it for?
Use it to check dependencies and directory ownership, review structural changes, enforce quality thresholds, compare against baselines, and audit schema or generated snapshot changes.
Why use it?
It prevents new code from breaking the intended structure and makes gradual cleanup measurable instead of relying on reminders in documentation.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-harness-skills plugin — 5 skills shipped together

Good fit Use it to check dependencies and directory ownership, review structural changes, enforce quality thresholds, compare against baselines, and audit schema or generated snapshot changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yfge/agent-harness-skills/repo-contracts-and-boundaries
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 yfge/agent-harness-skills --skill repo-contracts-and-boundaries
Clone the repo
git clone --depth 1 https://github.com/yfge/agent-harness-skills

Made for: Claude Code.

Or install agent-harness-skills, the plugin that ships this one along with the rest of its 5 skills.

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 repo-contracts-and-boundaries

README.md
[![agentmods](https://agentmods.dev/badge/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries/github.svg)](https://agentmods.dev/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries)
Your own site
<a href="https://agentmods.dev/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries"><img src="https://agentmods.dev/badge/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries/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 repo-contracts-and-boundaries

Your own site · 80×15
<a href="https://agentmods.dev/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries"><img src="https://agentmods.dev/badge/skills/yfge/agent-harness-skills/repo-contracts-and-boundaries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 933 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.00041 $0.00933
Opus 5 $0.00020 $0.00466
Sonnet 5 $0.00008 $0.00187
Haiku 4.5 $0.00004 $0.00093

Measured 12d ago against content hash 8bd3fbe51533, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

repo-contracts-and-boundaries 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 12d 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/repo-contracts-and-boundaries/SKILL.md · 107 lines

How it starts

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

Repo Contracts And Boundaries

Overview

Convert architectural and structural-quality intent into checks that prevent new drift instead of relying on repeated prose warnings.

This skill owns both repository contracts and quality gardening because both use the same mechanism: collectible rules, diff gates, audit reports, baselines, and gradual debt reduction. For shared harness terms, see ../../references/harness-patterns.md; when contract files are absent, use references/build-when-missing.md; for schema, fixture, and golden-payload contracts, see references/schema-fixture-contracts.md; for metrics and generated snapshots, see references/quality-policy.md.

When To Use

  • The user asks to define, protect, audit, or encode architecture boundaries, directory ownership, choke points, allowlists, baselines, or contracts.
  • The repository has layering rules, but agents still add bypass calls or wrong dependencies.
  • The user asks for structural metrics, quality reports, debt thresholds, regression budgets, or a gradual cleanup loop.
  • You need to distinguish diff checks from full audit checks.

Inputs Needed

  • Architecture docs or expected layering.
  • Current directory structure and known historical debt.
  • Rules to protect: dependency direction, file size, public entrypoints, data access, interface boundaries, or similar constraints.
  • Existing quality reports, generated snapshots, and CI or scheduled-run policy.

Execution Order

  • First: Read architecture docs, current code, existing checks, reports, and baselines to identify real boundaries and debt.
  • Then: Design mechanical rules, collectible metrics, diff checks, audit reports, baselines, and allowlists.
  • Finally: Output executable contracts, generated evidence, and a gradual convergence strategy.

Step-by-Step Process

  1. Search for ARCHITECTURE.md, contract docs, lint scripts, baseline files, and allowlists.
  2. List protected rules; each rule must be checkable by script or review.
  3. If architecture or contract surfaces are missing, bootstrap the minimum files and checker shape from references/build-when-missing.md.
  4. Separate new drift from historical debt: new drift should fail, historical debt should enter a baseline.
  5. Add only metrics tied to a concrete structural risk; keep them automatically collectible and avoid aggregate quality scores.
  6. Design --mode diff for changed files and --mode audit for full-repository reports.
  7. For each violation, output path, rule or metric, current value, threshold, reason, and suggested direction.
  8. Define when baselines or allowlists may change, who owns generated snapshots, and what repayment note is required.

Read the full file on GitHub · 107 lines

Files

What ships with it

3 files 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. 12d ago First seen · 107 lines · 41 tokens per session scan A 8bd3fbe51533

Subscribe to this mod's changes

repo-contracts-and-boundaries is a skill published in the GitHub repository yfge/agent-harness-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 933 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

readonly-review

Run a no-network read-only review practice with two explorer steps and one synthesis step.

Ranvier-Technologies/pixir · 20 tokens

agentplane-task-closure-recovery

Use when Agentplane task completion, direct finish, branchpr integration, hosted-close, close-tail PRs, PR metadata, dirty task artifacts, or remote branch divergence need diagnosis or recovery.

basilisk-labs/agentplane · 46 tokens

reviewing-code-quality

Reviews a diff or module for slipping standards, favoring deletion over rearranging, and ends in one honest verdict. Use when a change risks oversized files, needless layers, feature logic leaking into shared code, or clever indirection. Do not use for a trivial obvious edit, or for a check that is only about whether…

FlyFission/nuclear-grade-context-engineering · 73 tokens

review-deep

Drive the deep-review phase of an automated PR review. Consumes the walkthrough, runs the deterministic deep-review workflow (parallel lenses → adversarial validation → code-enforced threshold/caps), drafts the surviving findings, and completes the review run.

ShreyPaharia/octomux · 52 tokens

review-orchestrator

Drive an automated PR review. Produces a structured walkthrough plus inline draft comments via the octomux review CLI. NEVER posts to GitHub directly — publishing is human-gated.

ShreyPaharia/octomux · 41 tokens

audit

Use for PACEflow internal full audit: run five independent review agents, verify evidence from code/tests/logs, de-duplicate findings, and produce a severity-ranked report for release gates or comprehensive code review.

paceaitian/paceflow · 44 tokens