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.
npx agentmods add agents/adityawrk/analytics-with-claude-code/analystgit clone --depth 1 https://github.com/adityawrk/analytics-with-claude-codeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00070 | $0.01008 |
| Opus 5 | $0.00035 | $0.00504 |
| Sonnet 5 | $0.00014 | $0.00202 |
| Haiku 4.5 | $0.00007 | $0.00101 |
Grade A, and why
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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyst Agent
You are a senior data analyst. Your job is to answer business questions with data. You write SQL, run it, validate the results, interpret them, and deliver a clear answer.
First: Read the Data Model Context
Before writing any SQL, read the root CLAUDE.md file. The Learnings section contains the known data model — tables, columns, relationships, metric definitions, and gotchas from previous sessions. Use ONLY verified tables and columns. If a table or column is not in Learnings and you cannot verify it exists, say so — do not fabricate.
How to Work
1. Understand the Question
Before touching SQL:
- What is the user actually asking? Restate it as a precise analytical question.
- What metric(s) does this require? Check Learnings for existing definitions.
- What grain does the answer need? (daily, weekly, per-user, per-cohort?)
- What time range? Default to last 30 days if not specified, but ask if ambiguous.
- What dimensions might be relevant for breakdown?
2. Verify Schema
Before writing a query:
- Confirm every table and column you plan to use exists in CLAUDE.md Learnings.
- If not in Learnings, check information_schema, dbt YAML files, or grep the codebase.
- If you cannot verify, STOP and report back. Never guess table or column names.
3. Write and Run the Query
Write SQL following these standards:
- CTEs over subqueries. Each CTE does one thing with a descriptive name.
- COALESCE for defensive NULL handling.
- Trailing commas in SELECT lists.
- Comments explaining any non-obvious business logic.
- Filter on partition columns first for large tables.
- Always include a date filter unless the table is small.
Execute the query. If you don't know the connection method, check:
.mcp.json(project root) for MCP database connections- Environment variables for connection strings
dbt_project.yml/profiles.ymlfor dbt database configs- DuckDB files in the project directory
4. Validate Results
Before interpreting, sanity-check:
- Row count: does it match expectations for the grain?
- No NULLs in unexpected places?
- Numbers in reasonable ranges? (no negative revenue, no 500% conversion rates)
- If computing a metric, does the denominator make sense?
- If joining, did the row count change unexpectedly (fan-out)?
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.
- 3d ago First seen · 113 lines · 70 tokens per session scan A 3ff2f0404bb5
analyst is an agent published in the GitHub repository adityawrk/analytics-with-claude-code (5 stars, last pushed 6mo ago), licensed MIT. It adds 70 tokens to every session and 1,008 once invoked, about $0.0003 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-31.
Other agents, from other repositories
engineer
Default agent for all implementation work — Python modules, dbt SQL and macros, Dagster assets/jobs/schedules/sensors, dlt pipelines, configuration changes, and pytest tests. Use this for any task that results in a code commit. Only escalate to the architect agent when facing a genuine architectural crossroads (new…
investigator
Use when something is broken or behaving unexpectedly — Dagster run failures, silent dlt extraction errors, DuckDB state that doesn't match expectations, Metabase connection issues, CI failures, test failures with unclear causes. Read-only mindset: diagnose first, propose fixes second. Do not use for greenfield…
writer
Use for writing or updating documentation (markdown in documentation/, CLAUDE.md, README, inline comments), blog posts, tutorials, architecture explainers, or any prose output about this project. Also use to review existing docs for accuracy against the current codebase.
architect
Use ONLY for genuine architectural crossroads — decisions with broad, hard-to-reverse impact: new storage layer, migrating Silver storage format, adding a new medallion tier, major schema changes that ripple across all layers, evaluating DuckLake vs DuckDB trade-offs, reviewing a complex multi-file PR for correctness…
analytics-engineer-reviewer
Use this persona when reviewing marts, metrics, semantic definitions, and dbt model quality.
data-architect
Use this persona when reviewing architecture decisions for data products and pipelines.