Borrowing it
Nothing to install: this file belongs to adityawrk/analytics-with-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/adityawrk/analytics-with-claude-code/main/.claude/agents/analyst.mdgit clone --depth 1 https://github.com/adityawrk/analytics-with-claude-codeWrote 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.
[](https://agentmods.dev/agents/adityawrk/analytics-with-claude-code/analyst)<a href="https://agentmods.dev/agents/adityawrk/analytics-with-claude-code/analyst"><img src="https://agentmods.dev/badge/agents/adityawrk/analytics-with-claude-code/analyst/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.
<a href="https://agentmods.dev/agents/adityawrk/analytics-with-claude-code/analyst"><img src="https://agentmods.dev/badge/agents/adityawrk/analytics-with-claude-code/analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.01008 |
| Opus 5.5 | $0.00028 | $0.00403 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (6 stars, last pushed 8mo ago), licensed MIT. It adds 70 tokens to every session and 1,008 once invoked, about $0.0003 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-31.
Other agents, from other repositories
database-cloud-optimization-database-architect
Expert database architect specializing in data layer design from scratch, technology selection, schema modeling, and scalable database architectures. Masters SQL/NoSQL/TimeSeries database selection, normalization strategies, migration planning, and performance-first design. Handles both greenfield architectures and…
sql-pro
Master modern SQL with cloud-native databases, OLTP/OLAP optimization, and advanced query techniques. Expert in performance tuning, data modeling, and hybrid analytical systems. Use PROACTIVELY for database optimization or complex analysis.
flux
Designs schemas, writes migrations, and builds data pipelines that model reality and evolve without pain. Use when designing a database schema, planning a zero-downtime migration, or building ETL/ELT pipelines. Trigger with "design database schema", "write zero-downtime migration".
database-reviewer
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
doctrine-performance-optimizer
Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.
cqrs-expert
CQRS pattern specialist for command/query separation architectures.