analytics-review

analytics-review is a command for Claude Code from alifanov/darkflow. It costs 10 tokens per session (3,299 once invoked), scanned A, original, MIT.

A project command that reviews product analytics and recent code commits, then creates tasks from its findings.

In plain words
What is it for?
Use it to check a defined conversion funnel, inspect recent commits, and turn detected issues into tracked tasks.
Why use it?
It keeps a review grounded in the project's documented metrics and current code changes, while stopping safely when analytics credentials are missing.

Command 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 commands/alifanov/darkflow/analytics-review
Clone the repo
git clone --depth 1 https://github.com/alifanov/darkflow

Made for: Claude Code.

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 analytics-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/alifanov/darkflow/analytics-review.svg)](https://agentmods.dev/commands/alifanov/darkflow/analytics-review)
Your own site
<a href="https://agentmods.dev/commands/alifanov/darkflow/analytics-review"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/analytics-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,299 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00010 $0.03299
Opus 5 $0.00005 $0.01649
Sonnet 5 $0.00002 $0.00660
Haiku 4.5 $0.00001 $0.00330

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

Security

Grade A, and why

analytics-review scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

database) — a few lines of `curl`, deliberately not shipped in this template. It answers the
templates/.claude/commands/darkflow/analytics-review.md · 254 lines

How it starts

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

Step 1 — Config, funnel definition, signal gate

Load the project config (contract in .darkflow.d/claude.mdProject config). Uses: language, minPriority.

Analytics come from ~/.darkflow/openpanel, a read-only CLI over the self-hosted export API. Run it from the project root — that is how it finds the project's credentials (.env, or .claude/settings.local.jsonenv). There is no OpenPanel MCP: openpanel-mcp-server never answers the stdio handshake, so never try to register or reconnect one.

~/.darkflow/openpanel funnel --days 7 --events session_start   # smoke test + the gate number

Exits with missing credentials: … → stop here: write the snapshot (Step 6) with null values, say in one line which variable is missing, and exit without tasks.

Read the project's metrics doc before querying anything (usually docs/state/product/metrics.md; find it via When to read docs in .darkflow.d/claude.md). It defines the canonical funnel, the real event names, and any project quirk that changes how a number is read — events that fire twice per action, test accounts filtered in code rather than in OpenPanel. Never invent event names: a query for an event that does not exist returns no series, which is indistinguishable from a real zero.

Then the gate, before any other query. profiles on the top-of-funnel event is the visitor number. If it is under 100 visitors or the first real funnel step is under 10 entries, the window is noise: write the snapshot (Step 6), append nothing to the log, create no tasks, and say in one line which number failed the gate. Everything below assumes the gate passed.

What the CLI does and does not do:

  • --prev gives the previous equal window in the same command — use it instead of running a second window by hand, and never pass --start end-7 (both ends are inclusive, so that double-counts the boundary day).
  • Event properties are not readable at all. No amount, plan, source, method — the export endpoint does not return them. A question that rests on a property is not measurable here; take it from the billing provider or the database, and never report it as zero.
  • There is no device field — mobile vs desktop reads off os.
  • Every number is counted client-side from raw rows, so cost is real: ~10 requests per 1000 rows per event per window. Stay inside one 7-day window and drop a cut rather than widen the run.

Read the full file on GitHub · 254 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. 4d ago First seen · 254 lines · 10 tokens per session scan A a12f05a11c81

Subscribe to this mod's changes

analytics-review is a command published in the GitHub repository alifanov/darkflow (2 stars, last pushed 5d ago), licensed MIT. It adds 10 tokens to every session and 3,299 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.