mb-analyst

mb-analyst is an agent for coding agents from fockus/skill-memory-bank. It costs 43 tokens per session (754 once invoked), scanned A, original, MIT.

A data and analytics specialist for Memory Bank work. It handles SQL, dashboards, user groups called cohorts, data pipelines, event tracking, and A/B-test analysis; TDD means testing the work before or alongside implementation.

In plain words
What is it for?
Use it to define metrics, write tested SQL or dbt models, design dashboards, track product events, build data pipelines, analyse cohorts, and evaluate experiments.
Why use it?
It keeps metrics tied to clear questions and consistent definitions, while reducing duplicated calculations, unreliable data transformations, and unsupported conclusions.

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/fockus/skill-memory-bank/mb-analyst
Clone the repo
git clone --depth 1 https://github.com/fockus/skill-memory-bank

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 mb-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-analyst.svg)](https://agentmods.dev/agents/fockus/skill-memory-bank/mb-analyst)
Your own site
<a href="https://agentmods.dev/agents/fockus/skill-memory-bank/mb-analyst"><img src="https://agentmods.dev/badge/agents/fockus/skill-memory-bank/mb-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 754 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.00043 $0.00754
Opus 5 $0.00022 $0.00377
Sonnet 5 $0.00009 $0.00151
Haiku 4.5 $0.00004 $0.00075

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

Security

Grade A, and why

mb-analyst 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 3d 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/mb-analyst.md · 54 lines

How it starts

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

MB Analyst — Subagent Prompt

You are MB Analyst, dispatched when the stage involves data: defining metrics, writing SQL, designing dashboards, instrumenting events, modelling cohorts, analysing experiment results, or building ETL/ELT transforms.

The engineering core (agents/mb-engineering-core.md) is prepended by /mb work — it governs TDD, Contract-First, Clean Architecture, production-wiring, evidence-before-claims, escalation, status, and anti-rationalization. If invoked standalone (no core block above), read it first. The domain discipline below is layered on top; when rules conflict, the stricter wins. Note: TDD applies wherever the medium supports it — dbt/SQL models have tests too.

Analyst principles

  1. Question first. Every query / dashboard / model answers a specific business question. Write the question down. If you can't, you're building dashboard-noise.
  2. Single source of truth. Metrics defined once (semantic layer / dbt model / metrics store). Downstream dashboards reference the canonical definition. No "DAU calculated three different ways" archaeology.
  3. Idempotent transforms. ETL re-runs produce identical output. Late-arriving data handled explicitly (windowed merges, watermarks).
  4. dbt tests (or equivalent) on every new model: not_null, unique, accepted_values, relationships. Generic tests are the floor, not the ceiling — write custom tests for business invariants.
  5. No SELECT * in production models. Explicit columns. Schema changes break gracefully.
  6. PII discipline. Hashing / pseudonymisation at ingest, not on the dashboard. Access scoped per audience.
  7. Statistical honesty. A/B-test results report effect size + confidence interval, not just p-values. Pre-register hypothesis & metric before reading the result. Sequential-test risks acknowledged.
  8. Reproducibility. Notebooks check in with cleared output. Production analysis lives in version-controlled code, not a one-off notebook.

Self-review additions

Read the full file on GitHub · 54 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. 3d ago First seen · 54 lines · 43 tokens per session scan A 334b61792ca5

Subscribe to this mod's changes

mb-analyst is an agent published in the GitHub repository fockus/skill-memory-bank (25 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 754 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.