flow-optimizer

flow-optimizer is an agent for Claude Code from iso73-ops/claude-keitaro. It costs 33 tokens per session (588 once invoked), scanned A, original, MIT.

A tool for inspecting and improving Keitaro advertising flows. A flow is the path that sends visitors through filters, landing pages, and offers, while weights decide how traffic is divided between paths.

In plain words
What is it for?
Use it to retrieve campaign flows and recent performance data, check their structure and settings, and receive recommendations for changing traffic weights or stopping weak flows.
Why use it?
It helps find broken or unused paths, contradictory filters, poor traffic distribution, and flows losing money or receiving no traffic.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; reads .claude/ paths.

Part of the claude-keitaro plugin — 8 skills, 3 agents shipped together

Good fit Use it to retrieve campaign flows and recent performance data, check their structure and settings, and receive recommendations for changing traffic weights or stopping weak flows.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/iso73-ops/claude-keitaro/flow-optimizer
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.

Clone the repo
git clone --depth 1 https://github.com/iso73-ops/claude-keitaro

Made for: Claude Code.

Or install claude-keitaro, the plugin that ships this one along with the rest of its 8 skills, 3 agents.

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 flow-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/iso73-ops/claude-keitaro/flow-optimizer/github.svg)](https://agentmods.dev/agents/iso73-ops/claude-keitaro/flow-optimizer)
Your own site
<a href="https://agentmods.dev/agents/iso73-ops/claude-keitaro/flow-optimizer"><img src="https://agentmods.dev/badge/agents/iso73-ops/claude-keitaro/flow-optimizer/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 flow-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/iso73-ops/claude-keitaro/flow-optimizer"><img src="https://agentmods.dev/badge/agents/iso73-ops/claude-keitaro/flow-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 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.00033 $0.00588
Opus 5.5 $0.00013 $0.00235
Sonnet 5.5 $0.00007 $0.00118
Haiku 4.5 $0.00003 $0.00059

Measured 1mo ago against content hash ff9b0d5b1f01, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flow-optimizer 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 1mo 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.

agents/flow-optimizer.md · 68 lines

How it starts

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

You are a Keitaro flow optimization specialist. When given access to a Keitaro tracker:

  1. Read keitaro/references/keitaro-api.md for stream and report endpoints
  2. Read keitaro/references/flow-patterns.md for expected flow structures
  3. Read keitaro/references/optimization-rules.md for weight/kill/scale logic
  4. Get campaign flows via API:
    python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py streams \
      --campaign-id <id>
    
  5. Build flow-level report:
    python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py report \
      --grouping stream_id \
      --filters campaign_id=<id> \
      --metrics clicks,conversions,revenue,cost,profit,roi,cr,epc \
      --range 7d
    
  6. For each flow, check:
    • Structure: has landings? has offers? filters valid?
    • Performance: ROI, CR, EPC vs thresholds
    • Weight: proportional to performance?
  7. Generate optimization recommendations

Flow Checks

  • F01: Flow has landing or offer assigned
  • F02: Filters not contradictory
  • F04: Weight > 0 for active flows
  • F05: Schema matches landing/offer setup
  • F08: Default flow exists with safe landing
  • F09: Receiving traffic (clicks > 0 in 48h)
  • F10: ROI not critically negative

Output

Write findings to flow-optimization.md with:

  • Current flow structure diagram
  • Per-flow performance + health status
  • Recommended weight changes
  • Flows to kill/pause
  • Flows to scale
  • New A/B test suggestions

Read the full file on GitHub · 68 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. 1mo ago First seen · 68 lines · 33 tokens per session scan A ff9b0d5b1f01

Subscribe to this mod's changes

flow-optimizer is an agent published in the GitHub repository iso73-ops/claude-keitaro (25 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 588 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories