reverse-workflow

reverse-workflow is a skill for Claude Code from kotaroyamame/formal-agent-contracts. It costs 139 tokens per session (4,184 once invoked), scanned A, original, MIT.

A workflow for reverse-engineering existing software: it extracts a provisional specification, improves it through discussion, and checks the code against the agreed description.

In plain words
What is it for?
Use it to document unfamiliar code, clarify what a system should do, and reconcile implementation with the agreed requirements. It can also connect to later verification, proof, generation, and testing steps.
Why use it?
It helps when code exists but its intended behavior is unclear or poorly documented. The process turns scattered implementation details into a confirmed specification.

Skill for Claude Code

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

Part of the formal-agent-contracts plugin — 15 skills shipped together

Good fit Use it to document unfamiliar code, clarify what a system should do, and reconcile implementation with the agreed requirements. It can also connect to later verification, proof, generation, and testing steps.

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

Made for: Claude Code.

Or install formal-agent-contracts, the plugin that ships this one along with the rest of its 15 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 reverse-workflow

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/reverse-workflow"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/reverse-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,184 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.00139 $0.04184
Opus 5 $0.00069 $0.02092
Sonnet 5 $0.00028 $0.00837
Haiku 4.5 $0.00014 $0.00418

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

Security

Grade A, and why

reverse-workflow 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 9d 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/reverse-workflow/SKILL.md · 426 lines

How it starts

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

Reverse Workflow — Spec Extraction, Refinement, & Code Reconciliation

Overview

This skill orchestrates the full reverse engineering pipeline for formalizing existing code: Extract → Refine → Reconcile → (optionally) Verify → Prove → Generate → Test

Each phase invokes an existing skill, with automated handoff, error recovery, and a final session report summarizing all results.

この skill は既存コードを形式化するためのリバースエンジニアリング pipeline 全体をオーケストレートする。 各フェーズは既存スキルを呼び出し、フェーズ間の自動ハンドオフ、エラー回復、 最終セッションレポートの生成を行う。

┌─────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ 1. EXTRACT  │────>│ 2. REFINE    │────>│ 3. RECONCILE │────>│ 4. VERIFY    │
│ 仮仕様抽出   │     │ 対話的磨き上げ │     │ コード照合     │     │ (既存スキル)  │
└─────────────┘     └──────────────┘     └──────────────┘     └──────────────┘
                          ▲  │                                      │
                          │  ▼                                      ▼
                     収束するまで                              既存フォワード
                     サイクルを回す                            パイプラインへ接続
                                                               (verify/prove/generate/test)

Trigger Conditions

Activate this skill when the user says any of:

  • 「リバースワークフローで」「既存のコードから仕様を起こして」
  • "Run reverse workflow", "extract and refine spec from code"
  • 「コードの仕様を明確にしたい」「このコードを形式的に整理したい」
  • "Reverse engineer this code", "formalize the existing implementation"
  • 「既存コードをVDM-SLで仕様化して」「コードベースをリバースエンジニアリングして」
  • Explicitly requests extraction, refinement, and/or reconciliation in sequence

Workflow Phases

┌──────────┐    ┌──────────┐    ┌────────────┐    ┌──────────┐    ┌──────────┐
│ 1.EXTRACT│───>│ 2.REFINE │───>│ 3.RECONCILE│───>│ 4.VERIFY │───>│ 5.PROVE  │
│ 抽出      │    │ 磨き上げ  │    │ 照合       │    │ 検証     │    │ 証明     │
└──────────┘    └──────────┘    └────────────┘    └──────────┘    └──────────┘
                      ▲ │
                      └─┘
                   収束ループ
                  (forward pipeline
                   に接続可能)

Read the full file on GitHub · 426 lines

Files

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.

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. 9d ago First seen · 426 lines · 139 tokens per session scan A 006a5ea7f40b

Subscribe to this mod's changes

reverse-workflow is a skill published in the GitHub repository kotaroyamame/formal-agent-contracts (1 stars, last pushed 2mo ago), licensed MIT. It adds 139 tokens to every session and 4,184 once invoked, about $0.0007 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

debugger

Systematic debugging method: 5-step root-cause analysis (capture, isolate, hypothesize, investigate, fix & verify) plus common bug-pattern reference. Use when errors, exceptions, test failures, or unexpected behavior appear. Loaded automatically by the debugger agent.

claude-world/director-mode-lite · 56 tokens

mcp-check

Validate MCP configuration and suggest improvements. Use when MCP servers fail to load, after editing .mcp.json, or when the user runs /mcp-check.

claude-world/director-mode-lite · 36 tokens

project-health-check

Audit project health across 7 dimensions (documentation, test coverage, security, code quality, dependencies, database, build/deploy) producing a scored report with prioritized fixes. Use for periodic checkups, before releases, or when the user runs /project-health-check.

claude-world/director-mode-lite · 57 tokens

doctor

Diagnose Cladding runtime health — Claude Code hook liveness and version, CI package pinning, lifecycle governance, and sentinel-miss frequency by phase × cause × fallback. Use when hooks may be silent, CI may float across Cladding releases, scan or run results look thinner than expected, or before tuning the host…

qwerfunch/cladding · 93 tokens

debug

Systematic bug investigation with a five-phase framework: reproduce, narrow, diagnose, fix, verify. Supports automated regression bisect via --regression flag. Produces a structured debug report with root cause analysis, regression test, and CQ/Q self-evaluations.

greglas75/zuvo · 55 tokens

mobile-flows-maestro

This skill should be used when Maestro is explicitly requested or already present and the task is to author, run, or debug iOS/Android Maestro flows; use Maestro MCP; or handle Maestro selectors, system UI, permissions, Keychain, JavaScript, waits, device state, flakiness, or CI. Evidence includes a .maestro directory…

johnkozaris/jko-claude-plugins · 102 tokens