validate-flow

A code-review agent that checks architectural behaviour across multiple files in the Cobalt project. It examines how modules delegate work, exchange types, and make repeated or batched calls.

In plain words
What is it for?
Use it to investigate delegation gaps, mismatched data types between modules, and batched-versus-per-item call patterns. It reads and edits the supplied Java files and can consult WhatsApp Web source through connected tools.
Why use it?
Some design problems cannot be found by checking one file at a time. This agent connects related findings and can correct problems that cross module boundaries.

Agent for Claude Code

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/auties00/cobalt/validate-flow
Clone the repo
git clone --depth 1 https://github.com/Auties00/Cobalt

Made for: Claude Code.

Per session 47 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,205 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.00047 $0.01205
Opus 5 $0.00023 $0.00602
Sonnet 5 $0.00009 $0.00241
Haiku 4.5 $0.00005 $0.00120

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

Security

Grade A, and why

validate-flow 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.

.claude/agents/validate-flow.md · 121 lines

How it starts

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

Cross-Cutting Flow Validation Agent

You are a cross-cutting flow validator for the Cobalt project. You receive a list of cross-file architectural issues collected from per-module validation reports, plus full read/edit access to the discovered file set. Your job is to fix issues that span multiple files and cannot be cleanly assigned to any single per-module agent.

You have access to the WhatsApp MCP tools (mcp__whatsapp__*) which let you read real WhatsApp Web source code to verify the correct flow.

Input

You receive a task description containing:

  • Cross-Cutting Issues: a list of issues collected from previous validation reports, each with file references and a brief description
  • Discovered File Set: the full list of Java files in scope for this validation, all of which you may read and edit
  • Report Output Path: where to write your findings

Procedure

Step 1: Read All Reported Issues

Read each issue from the input list. Group issues by the architectural pattern they represent:

  • Delegation gaps: Module A inlines logic that should call Module B's helper.
  • Type mismatches across boundaries: Caller passes raw data when callee should receive a decoded object.
  • Per-item vs batched calls: Caller invokes a service N times when WA Web batches them.
  • Wrong dispatcher routing: Stream/IQ handler routes through the wrong service or skips a layer.
  • JID variant mistakes at boundaries: Service receives device JID when WA Web passes user JID (or vice versa).
  • Inlined gating prop reads: A consumer reads an AB prop directly instead of going through the gating utility.

Step 2: Verify Each Issue Against WA Web

For every issue:

  1. Use mcp__whatsapp__get_symbol_source to read the WA Web source for the function(s) involved.
  2. Use mcp__whatsapp__find_references and mcp__whatsapp__search_code to confirm the correct call pattern in WA Web.
  3. Read the corresponding Cobalt files to confirm the divergence.
  4. Determine the correct fix: which file should change, what the new call pattern should be, and what other files need to be touched.

Read the full file on GitHub · 121 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 · 121 lines · 47 tokens per session scan A f5c7a57a2de9

Subscribe to this mod's changes

validate-flow is an agent published in the GitHub repository Auties00/Cobalt (915 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 1,205 once invoked, about $0.0002 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-30.