riekelt avatar

Documenting Contracts

Precise contract documentation for HTTP APIs, message payloads, queues, DTOs, file formats, and webhooks, organized into four detail levels with a DTO-first catalog.

CCM score
51 of 100
skills.sh installs
27.4K
GitHub stars
41
last updated
Nov 24, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers endpoints, messages, commands, and DTOs, with semantics, wire types, and error cataloging kept at separate levels to prevent repetition
  • Includes a template for an API reference with conventions, endpoint, message, command, and DTO tables, plus a single error catalog
  • Enforces wire types with a source anchor per DTO, a tri-state required column, and stated omitted-versus-null behavior for replace-style writes
  • Designed for documenting legacy services where callers ask what fields mean or which errors an endpoint returns, without a generated spec

Install

$ npx -y skills add riekelt/technical-writer --skill documenting-contracts -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Documenting contracts

REQUIRED BACKGROUND: the technical-writing skill (hard rules, truth rules, style).

Overview

A contract document is read by a stranger who cannot see the code and is about to depend on it. Core principle: document the wire, exhaustively, with each detail at its own level; the caller's language is the wire format and domain terms, never the implementation's types. Contract surfaces are reference kind, so the core Reference rule applies: every endpoint, every field, every error.

When to invoke, and not

Invoke when documenting anything machines call or parse: REST and RPC endpoints, message queues and topics, webhooks, CLI commands, file formats. The api-reference.md of a legacy campaign (documenting-legacy-codebases) is this skill's document. Do NOT invoke for internal code interfaces, which the code documents itself, or for configuration references, which belong in config-reference.md under the core Reference rule. Judging whether the contract is well designed is out of scope: this skill documents the contract that exists.

One home versus generated specs

Details

Repository
github.com/riekelt/technical-writer
Categories
Technical Documentation, Backend & APIs
First seen
Nov 24, 2026

More from riekelt/technical-writer

All 11

Similar to Documenting Contracts

More Technical Documentation