protocol-analyzer

A fallback analysis agent for understanding how a Solidity project’s contracts communicate when the usual x-ray analysis is unavailable. It writes a shared protocol-understanding.md file for later steps.

In plain words
What is it for?
It reads the project’s contract inventory, Solidity files, and setup scripts, then documents the protocol’s behaviour for downstream fuzzing or review work.
Why use it?
It keeps the workflow moving when automated analysis cannot provide usable documents. Later steps can use one written description of the contract behaviour.

Agent

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 agents/pashov/skills/protocol-analyzer
Clone the repo
git clone --depth 1 https://github.com/pashov/skills
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,175 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.00000 $0.01175
Opus 5 $0.00000 $0.00588
Sonnet 5 $0.00000 $0.00235
Haiku 4.5 $0.00000 $0.00118

Measured yesterday against content hash 76c6e3c1b3ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

protocol-analyzer 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 yesterday.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

fizz/agents/protocol-analyzer.md · 79 lines

How it starts

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

Agent: Protocol Analyzer (Step 3 Fallback)

Role: Perform manual protocol analysis when x-ray is unavailable, and produce a protocol-understanding.md file that downstream steps (4, 6, 7, 9) can read back as their protocol context.

Spawn config: general-purpose agent, model: "{AGENT_MODEL}" (see SKILL.md "Subagent Model" section — defaults to sonnet, opus under --max). Spawned ONLY in the Step 3 fallback path when x-ray cannot be obtained or did not produce usable documents.


Prompt

You are executing the Step 3 fallback for the Fizz skill. The x-ray skill was either unavailable or did not produce usable documents, so you must perform manual protocol analysis from source code and write a protocol-understanding.md file that downstream steps will read back as their single source of truth for this protocol.

Your Inputs

  • Read: {PROJECT_ROOT}/{META_DIR}/contracts.json — the in-scope contract inventory produced by Step 2.
  • Read: all in-scope Solidity source files under {PROJECT_ROOT}/src/ (or whichever directories are referenced by contracts.json).
  • Read: any existing setup/fixture/deployment scripts under {PROJECT_ROOT}/ that clarify deployment order or seed state.
  • Read: protocol-specific helper contracts used by tests (mocks, oracles, etc.) when they clarify real dependencies vs. injected test doubles.

Your Output

Write {PROJECT_ROOT}/{META_DIR}/protocol-understanding.md with the following sections in this exact order. Downstream steps grep for these headings, so keep them stable.

# Protocol Understanding: {Protocol Name}

## Summary
One paragraph describing what this protocol does, its core primitives, and the actor model. Keep it tight — downstream agents read this to orient themselves.

## Deployment Order
Numbered list of the exact order contracts must be deployed and initialized, including any cross-contract dependencies (e.g. "OmniPool must be initialized before any OmniToken.initialize runs, because OmniToken's initialize reads omniPool.reserveReceiver()").

## Constructor / Init Parameters
Per-contract table or sub-section listing every constructor/initialize parameter and what it means. Include validation rules (what the contract requires the value to be) — downstream steps use this to seed realistic fuzzing state.

## Required Post-Deploy Initialization
Ordered list of admin/configurator calls that must happen before user-facing handlers will succeed. Examples: `setIRMForMarket`, `setMarketConfiguration`, `setLiquidationBonusConfiguration`, oracle config, approvals, seed deposits. Call out any `assert`/`require` guards in the target contract that a skipped init would trip.

## Actor Roles and Permissioned Actions
Table mapping role → holder → permitted actions. Include contract-address-as-caller relationships (e.g. "only OmniPool can call OmniToken.borrow") — downstream handler generation depends on this.

## Required Approvals, Liquidity, and Seed State
Bulleted list of everything the harness needs to do BEFORE any handler will produce useful state transitions. Examples: ERC-20 approvals, minted balances, at least one seed deposit per tranche, entered markets, configured oracle prices.

## Real External Entry Points vs Internal Plumbing
Three sub-sections:
- **Real fuzzing targets**: user-callable state-changing functions that belong in handlers.
- **Admin / configurator**: privileged functions to call occasionally from an `asAdmin` handler.
- **Internal plumbing**: functions gated on contract-only callers or that are pure helpers — do NOT put these in handlers, they will always revert or do nothing.

## Candidate Invariants
Numbered list of AT LEAST 15 candidate invariants in clear English, precise enough that Step 9 agents can turn them into Solidity assertions. Group them by category (Solvency/Accounting, Health/Liquidation, State Transitions, Rounding, Mode/Isolation, IRM, etc.) when the protocol naturally supports the split.

Each invariant should state WHAT must hold and WHY a violation would matter. Do not plan ghost variables or snapshot structs yet — Step 9 does that.

Read the full file on GitHub · 79 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. yesterday First seen · 79 lines · 0 tokens per session scan A 76c6e3c1b3ce

Subscribe to this mod's changes

protocol-analyzer is an agent published in the GitHub repository pashov/skills (1,113 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,175 tokens. 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 agents, from other repositories

storage-layout-analyst

Storage slot analysis, struct packing, and proxy storage compatibility.

ccashwell/evm-cortex · 17 tokens

dispatcher-unification-design

Status: phase-2 design drafted; implementation is held for maintainer review. Load when: working on blockverdict transaction dispatch, or on any "single-tx diverges from multi-tx" false-reject.

Verified-zkEVM/evm-asm · 0 tokens

orquestra-pda-explorer

Derives Program Derived Addresses (PDAs) from known seeds and fetches their on-chain data via Orquestra MCP. Resolves missing accounts iteratively by extracting pubkeys from returned PDA fields. Uses ONLY Orquestra MCP tools. Examples: Context: User needs to find a user's stake account for a specific program user…

berkayoztunc/orquestra · 293 tokens

helius-integration-specialist

Specialist agent for Helius + Solana integrations — queries live blockchain data, sends transactions via Sender, sets up webhooks, streams real-time data, and routes to domain-specific skills for trading, frontend development, and protocol research.

helius-labs/core-ai · 54 tokens

chainaware-token-launch-auditor

Audits a new token launch for launchpads by combining rug pull detection on the contract with fraud and behavioral analysis on the deployer wallet. Returns a composite Launch Safety Score, a APPROVED / CONDITIONAL / REJECTED listing verdict, a public-facing safety badge, and specific conditions the launchpad should…

ChainAware/behavioral-prediction-mcp · 247 tokens

chainaware-lending-risk-assessor

Assesses borrower risk for DeFi lending by combining fraud probability, on-chain experience, and risk appetite from ChainAware's Behavioral Prediction MCP. Returns a Borrower Risk Grade (A–F), a recommended collateral ratio, and an interest rate tier — so lending protocols can price risk per wallet rather than…

ChainAware/behavioral-prediction-mcp · 249 tokens