implementation-protocol

A workflow guide for implementing non-trivial features and endpoints in Python/FastAPI projects. It defines the expected behavior before code is changed and checks that the result is proven.

In plain words
What is it for?
Use it to plan, implement, and verify new features, endpoints, and other substantial code changes.
Why use it?
It reduces overbuilding, invented architecture, and changes that only appear correct without evidence.

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/robhowley/py-pit-skills/implementation-protocol
Any agent
npx skills add robhowley/py-pit-skills --skill implementation-protocol
Clone the repo
git clone --depth 1 https://github.com/robhowley/py-pit-skills

Made for: Claude Code, Codex.

Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,156 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.00116 $0.02156
Opus 5 $0.00058 $0.01078
Sonnet 5 $0.00023 $0.00431
Haiku 4.5 $0.00012 $0.00216

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

Security

Grade A, and why

implementation-protocol 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 2d 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/implementation-protocol/SKILL.md · 194 lines

How it starts

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

implementation-protocol

This skill orchestrates how you turn a feature request into a verified, reviewable change. It is not about writing code — it is about enforcing a contract between intent, change, and proof.

The discipline here exists because the most common failure mode for AI-driven implementation is overbuilding: hallucinated architecture, speculative abstractions, scope creep, and "looks correct" completion without proof. This skill prevents all of that by anchoring every action to observable behavior and failing signals.

When to use

  • User asks you to implement a feature, endpoint, capability, or behavior
  • User describes something they want working and expects you to build it
  • Any non-trivial code change (more than a one-line fix)

When not to use

  • Pure refactoring with no behavior change (use code-quality or simplify)
  • Scaffolding a new project from scratch (use fastapi-init)
  • One-line bug fixes where the fix is obvious

Phase 1 — Define the behavior

Never start with implementation. Start by defining what success looks like in concrete, observable terms.

Before touching any code, establish:

  1. Inputs and outputs — what goes in, what comes out. Be specific: request shape, response shape, status codes, return types.
  2. API contract — if this is an endpoint, what's the route, method, request/response schema?
  3. Side effects — what changes in the world? DB writes, log entries, events emitted, files created.
  4. Error cases — what happens when inputs are invalid, dependencies are unavailable, or preconditions aren't met?

The implementation ledger

Before proceeding, produce a short ledger that makes the rest of the process auditable. Write it in conversation (or in .dev/todos/<feature>.md if the user prefers a file). The ledger has four sections:

## Behaviors
- [ ] B1: POST /items returns 201 with created item
- [ ] B2: POST /items with missing name returns 422
- ...

## Files to change
- src/api/routes/items.py (new router)
- src/models/item.py (new model)
- ...

## Tests to add/update
- tests/test_items.py::test_create_item (B1)
- tests/test_items.py::test_create_item_missing_name (B2)
- ...

## Proof commands
- uv run pytest tests/test_items.py
- uv run pytest tests/ (full suite)
- uv run ruff check .

Read the full file on GitHub · 194 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. 2d ago First seen · 194 lines · 116 tokens per session scan A 88d9bf0d0345

Subscribe to this mod's changes

implementation-protocol is a skill published in the GitHub repository robhowley/py-pit-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 116 tokens to every session and 2,156 once invoked, about $0.0006 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

database

Relational database authority — PostgreSQL, async ORM (SQLAlchemy 2 / asyncpg), Alembic schema migrations, Supabase Python and JS clients, query optimisation, index strategy, connection pooling, transaction patterns, and bulk operations across Python and Node stacks.

LuuOW/meridian-mcp · 54 tokens

crudauth

Use when building or modifying authentication in a FastAPI app with crudauth (the crudauth PyPI package) — covers CRUDAuth, the AuthUserMixin / makeauthidentity user model, IdentityConfig, currentuser(...) gates, session + bearer transports, OAuth (Google/GitHub), email verification / password reset / change, custom…

benavlabs/crudauth · 188 tokens

FastAPI Customer Support Tech Enablement

Comprehensive FastAPI skill for building modern Python web APIs with focus on customer support systems, ticket management, real-time chat, and backend operations.

manutej/luxor-claude-marketplace · 36 tokens

alembic

Comprehensive Alembic database migration management for customer support systems.

manutej/luxor-claude-marketplace · 16 tokens

SQLAlchemy ORM Expert

Comprehensive SQLAlchemy skill for customer support tech enablement, covering ORM patterns, session management, query optimization, async operations, and PostgreSQL integration.

manutej/luxor-claude-marketplace · 34 tokens

fastapi-endpoint

Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests. Uses interview-driven planning to clarify data models, authentication method, pagination strategy, and caching before writing any code.

alirezaebrahimi5/ai-senior-engineer-template · 56 tokens