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.
npx skills add kotaroyamame/formal-agent-contracts --skill define-contractgit clone --depth 1 https://github.com/kotaroyamame/formal-agent-contractsWrote 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.
[](https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/define-contract)<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/define-contract"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/define-contract/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.
<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/define-contract"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/define-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00240 | $0.06518 |
| Opus 5 | $0.00120 | $0.03259 |
| Sonnet 5 | $0.00048 | $0.01304 |
| Haiku 4.5 | $0.00024 | $0.00652 |
Grade A, and why
define-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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 544 lines — stays where its author put it; the contents beside it link to each section on GitHub.
エージェント契約定義スキル (v2.0.0)
形式的エージェント契約を段階的に定義し、VDM-SL(Vienna Development Method Specification Language)仕様と設計文書(PROTOCOL.md、API-SIGNATURES.md)を生成するスキルです。v2.0.0では Phase 1(ドメイン論理)の VDM-SL 仕様に加えて、Phase 2(プロトコル・API 仕様)の設計文書生成に対応し、複雑なマルチエージェントシステムに対応しています。
概要
このスキルは以下のワークフローを実行します:
- ステップ1:エージェントロール抽出 - 対象エージェントの責務と境界を明確化
- ステップ2:データ型定義 - エージェントが扱うデータ構造を形式化(Phase 1: ドメイン論理) 2b. ステップ2b:通信プロトコル層定義(新機能) - 設計文書(PROTOCOL.md、API-SIGNATURES.md)を生成(Phase 2: プロトコル・API仕様)
- ステップ3:契約定義 - 前提条件と後提条件を含む契約を記述(Phase 1: ドメイン論理)
- ステップ4:VDM-SL生成 - Phase 1 VDM-SL仕様書を自動生成
- ステップ5:仕様レビュー - 生成された仕様と設計文書を検証
- ステップ6:契約テスト生成の提案 - 自動テスト生成スキルの実行を提案
ステップ1:エージェントロール抽出
目的:対象エージェントの明確な責務定義
ユーザーに以下の情報を聞き出します:
- エージェント名:e.g.,
HybridJudgeAgent,MessageValidator - 主要責務:このエージェントが何をするか(1-2文)
- 入力の形態:どのようなデータを受け取るか
- 出力の形態:どのようなデータを返すか
- 状態管理:ステートレスか、ステートフルか
- 外部依存:他のエージェントやシステムへの依存関係
出力例:
エージェント:HybridJudgeAgent
責務:チケットの自動返信可否を判定し、処理方法(自動応答/オペレータ連携/オペレータのみ)を決定する
入力:Ticket型(ID、本文、顧客情報、優先度、複雑度スコア)
出力:Action型(<AutoReply> | <OperatorAndLLM> | <OperatorOnly>)
状態:ステートレス(判定時点の入力値のみに依存)
依存:MessageValidator(メッセージ検証)、ScoreCalculator(スコア計算)
ステップ2:データ型定義
目的:エージェントが扱う全データ型を形式化
以下の形式でデータ型を定義します:
-- 基本型
Score = nat1 -- 1から100までのスコア
Priority = <Low> | <Medium> | <High>
-- レコード型
Ticket ::
id : nat1
content : seq of char
priority : Priority
complexity_score : Score
各型について以下を明確にします:
- 型の名前と分類(基本型、レコード型、合成型)
- 不変式(invariant):型が満たすべき制約
- 値域:取り得る値の範囲
- デフォルト値:必要に応じて定義
ユーザーへの質問:
- このエージェントが扱う全てのデータ型は何か?
- 各型にどのような制約があるか?(例:スコアは1-100、優先度は3値)
- これらの型がどのような不変式を満たすべきか?
ステップ2b:通信プロトコル層定義(新機能 v2.0.0)
目的:マルチエージェント間の通信仕様を設計文書として形式化
このステップは複数のエージェント間で通信が存在する場合に適用します。ここで生成される成果物は PROTOCOL.md と API-SIGNATURES.md という設計ドキュメントであり、VDM-SL コードではありません。これらの文書はプロトコル実装エージェントと API 実装エージェントが直接参照します。
2b-1. メッセージ型レジストリ
全てのメッセージ型を正規名として宣言。Markdown テーブル形式で記録:
| メッセージ型(正規名) | 送信元 | 受信先 | 同期/非同期 | 説明 |
|---|---|---|---|---|
TicketCreate |
User | Server | 同期 | ユーザーがチケットを作成 |
TicketUpdate |
User | Server | 同期 | ユーザーがチケットを更新 |
EscalationRequest |
User | Server | 同期 | ユーザーがエスカレーションをリクエスト |
ReplyManual |
Operator | Server | 同期 | オペレータが手動返信 |
TicketCreated |
Server | User | 非同期 | サーバーがチケット作成完了を通知 |
AutoReply |
Server | User | 非同期 | サーバーが自動返信を送信 |
OperatorReply |
Server | User | 非同期 | サーバーがオペレータからの返信を転送 |
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.
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.
- 10d ago First seen · 544 lines · 240 tokens per session scan A 2972f118ee5e
define-contract is a skill published in the GitHub repository kotaroyamame/formal-agent-contracts (1 stars, last pushed 2mo ago), licensed MIT. It adds 240 tokens to every session and 6,518 once invoked, about $0.0012 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.
Other skills, from other repositories
drift-testing
Verifies API implementations against OpenAPI specifications using the Drift CLI, catching spec drift and supporting Bi-Directional Contract Testing (BDCT). Use when the user mentions Drift, API contract testing, provider contract testing, provider verification, spec drift, API conformance testing, OpenAPI…
api-audit
API and endpoint integrity audit across 10 dimensions (D1-D10) plus optional contract stability (D11) and optional OWASP API Security Top 10 (D12: BOLA/BOPLA/BFLA, mass assignment, JWT alg-confusion, GraphQL introspection). Covers validation, payloads, pagination, errors, caching, HTTP semantics, waterfalls, rate…
performance-audit
Full-stack performance health check across 12 dimensions. Rendering, bundles, assets, API/network, algorithms, memory, database, caching, Web Vitals, backend runtime, concurrency, and framework-specific pathologies. Evidence-based Impact Models with confidence tiers and a prioritized optimization roadmap. Switches…
openapi-parser
Parses complex OpenAPI specs and generates Drift test cases from them. Use whenever the user wants to generate, write, or scaffold Drift tests from an OpenAPI spec — especially when the spec contains complex schemas: anyOf/oneOf/allOf, discriminators, polymorphism, inheritance, $ref chains, regex patterns, enums, or…
validate-api
Run the project's Hurl scenarios with an OIDC access token passed as a secret variable.
auth-doctor
Diagnose and fix issues in existing auth setups. Scans environment, files, security, middleware, OAuth, database, and dangerous code patterns. Produces scored health report with actionable fixes.