phase-contract

phase-contract is a skill for Claude Code, Codex from gtrabanco/agentic-workflow. It costs 52 tokens per session (851 once invoked), scanned A, original, MIT.

An internal rulebook for validating implementation phases in a coding workflow. Each phase must describe one deliverable and one code layer, such as the database, API, user interface, or documentation.

In plain words
What is it for?
It supports feature planning, fix planning, and phase execution by checking every phase against the same eight validation rules.
Why use it?
It prevents planning or execution from starting with phases that mix unrelated work or violate the workflow's structure. Invalid phases are blocked until they are corrected.

Skill for Claude CodeCodex

Part of the agentic-workflow plugin — 35 skills shipped together

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/gtrabanco/agentic-workflow/phase-contract
Any agent
npx skills add gtrabanco/agentic-workflow --skill phase-contract
Clone the repo
git clone --depth 1 https://github.com/gtrabanco/agentic-workflow

Made for: Claude Code, Codex.

Or install agentic-workflow, the plugin that ships this one along with the rest of its 35 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 phase-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/gtrabanco/agentic-workflow/phase-contract.svg)](https://agentmods.dev/skills/gtrabanco/agentic-workflow/phase-contract)
Your own site
<a href="https://agentmods.dev/skills/gtrabanco/agentic-workflow/phase-contract"><img src="https://agentmods.dev/badge/skills/gtrabanco/agentic-workflow/phase-contract.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 851 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.00052 $0.00851
Opus 5 $0.00026 $0.00426
Sonnet 5 $0.00010 $0.00170
Haiku 4.5 $0.00005 $0.00085

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

Security

Grade A, and why

phase-contract 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.

packages/pi-agentic-workflow/skills/phase-contract/SKILL.md · 83 lines

How it starts

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

Phase Contract (internal)

The one authoritative owner of phase shape for this workflow. Planners lint every phase they emit against the eight rules below; execute-phase re-checks the same rules before any edit. Nothing else may define what a valid phase is.

When to use

  • plan-feature-scaffold — lint every phase of a feature plan before emission.
  • plan-fix — lint every phase of a fix SPEC before commit.
  • execute-phase — phase-lint pre-flight guard before editing a phase.
  • Templates store the contract version + fingerprint + lint result, never the eight rules (they point here).

The eight phase-lint rules

Every implementation phase must pass all 8 boxes before it is emitted (planner skills) or executed (execute-phase pre-flight). Fail-closed: any unticked box blocks emission/execution until the phase is re-cut or split.

  1. Title names ONE deliverable — FAIL if it joins nouns with +, ,, &, and/y, or /.
  2. One declared layer — each phase declares exactly one of the fixed enum schema/db | domain | api | ui | config/infra | docs | hardening | close-out; FAIL if any task's target file belongs to another. Tests for the phase's own layer belong to the phase; a test-only phase declares hardening.
  3. ≤ 8 tasks (close-out phase: ≤ 10, only the literal close-out chain).
  4. One checkbox = one deliverable — FAIL if a task contains a chain of implementation steps, enumerates > 3 cases/scenarios, or creates > 1 file of distinct concerns.
  5. Zero decision words — FAIL on Decide, choose, OR between alternatives, If … then <change scope>.
  6. No conditional scope mutation — a task may not move work between phases at runtime.
  7. No external/manual gates inside implementation phases — human/out-of-repo verifications live in the hardening/close-out phase, marked manual.
  8. Machine-checkable done-when — every phase ends with one verifiable invariant (a command + expected outcome).

Read the full file on GitHub · 83 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. 3d ago First seen · 83 lines · 52 tokens per session scan A 7ec17c94ea1c

Subscribe to this mod's changes

phase-contract is a skill published in the GitHub repository gtrabanco/agentic-workflow (20 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 851 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

think-like-me

Personal engineering rules and reasoning patterns the user has curated over time. Consult BEFORE writing, modifying, debugging, or designing any technical feature — rules often cover domain-specific gotchas (e.g., mobile audio timers need background mode) that generic answers miss. Also triggers on /learn-this, "learn…

kakha13/think-like-me · 88 tokens

adapt-architecture

Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as…

pjt222/agent-almanac · 96 tokens

adaptic

Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem…

pjt222/agent-almanac · 96 tokens

add-puzzle-type

Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive…

pjt222/agent-almanac · 100 tokens

add-rcpp-integration

Add Rcpp or RcppArmadillo integration to an R package for high-performance C++ code. Covers setup, writing C++ functions, RcppExports generation, testing compiled code, and debugging. Use when an R function is too slow and profiling confirms a bottleneck, when you need to interface with existing C/C++ libraries, or…

pjt222/agent-almanac · 93 tokens

aikido

Practice aikido as a defensive martial art emphasizing harmony, redirection, and controlled resolution. Covers centering and grounding, ukemi (safe falling and rolling), core techniques (irimi-nage, shiho-nage, kote-gaeshi, ikkyo), blending and tai sabaki (body movement), randori (multiple attacker practice), weapons…

pjt222/agent-almanac · 122 tokens