data-query-agent

data-query-agent is an agent for coding agents from akashkedian26/claude-code-workspace. It costs 0 tokens per session (396 once invoked), scanned A, original, MIT.

An agent for answering questions about data with SQL, the language used to retrieve information from databases. It searches a data catalogue for tables and schemas, checks their sources and quality, and can run read-only queries when the required tool is available.

In plain words
What is it for?
Use it for SQL queries, data analysis, and product-data questions. It can save query results to a Google Sheet when database-query access is available, or save a SQL file for manual execution otherwise.
Why use it?
It reduces the guesswork involved in finding the right table and understanding what its data means. If direct database access is unavailable, it still produces a query that can be run manually.

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/akashkedian26/claude-code-workspace/data-query-agent
Clone the repo
git clone --depth 1 https://github.com/akashkedian26/claude-code-workspace
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 396 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.00000 $0.00396
Opus 5 $0.00000 $0.00198
Sonnet 5 $0.00000 $0.00079
Haiku 4.5 $0.00000 $0.00040

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

Security

Grade A, and why

data-query-agent 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.

examples/agents/data-query-agent.md · 54 lines

What it actually says

Data Query Agent

Load ONLY when task involves:

  • SQL queries
  • data analysis
  • product data questions

Tools

Data Catalog MCP — table/schema discovery (always used):

  • search_assets to find tables
  • get_table for schema inspection
  • get_table_lineage for source-of-truth verification
  • get_data_quality_tests for quality checks
  • get_tags / get_owners for governance context

SQL MCP — direct SQL execution (used when available):

  • query — execute read-only SQL
  • list_schemas, list_tables, describe_table, table_stats

Sheets MCP — results upload (used in fully automated route):

  • sheets_create_spreadsheet — create new spreadsheet for results
  • sheets_update_range / sheets_batch_update — write data rows
  • sheets_format_cells — format headers

Dual-route behavior

The agent auto-detects which route to use at runtime:

Condition Route Output
SQL MCP available Fully automated Query executed + results in Google Sheets
SQL MCP unavailable Semi-automated SQL query for manual execution

The semi-automated route is always the fallback.

Outputs

Saved to: ~/DataQueries//

  • QUERY.sql
  • ASSUMPTIONS.md (includes Sheets URL if fully automated)
  • ANALYSIS_GUIDE.md

Process

  1. Understand business question
  2. Discover tables via Data Catalog (search_assets, get_table, get_table_lineage)
  3. Analyze schemas and check data quality
  4. Generate SQL → execute via SQL MCP if available, otherwise present for manual execution
  5. If automated: upload results to Google Sheets
  6. Document assumptions, lineage, quality, ownership, and PII warnings
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 · 0 tokens per session scan A dca59df6cc2e

Subscribe to this mod's changes

data-query-agent is an agent published in the GitHub repository akashkedian26/claude-code-workspace (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 396 tokens. 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.

Related

Other agents, from other repositories

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

database-engineer

PostgreSQL specialist: schema design, migrations, query optimization, pgvector/full-text search, Alembic migrations.

yonatangross/orchestkit · 28 tokens

database-architect

Database design, optimization, and operations expert. Use for schema design, migrations, query optimization, indexing, backup/recovery, monitoring, replication. Triggers: database, schema, migration, sql, postgresql, mysql, mongodb, prisma, drizzle, index, query optimization, slow query, backup, recovery.

softspark/ai-toolkit · 67 tokens

db2-dba

DB2 database administration specialist for DB2 for z/OS and DB2 LUW (Linux/Unix/Windows). Use when the task requires schema review, SQL tuning, bind/rebind planning, utility usage (REORG, RUNSTATS, COPY), buffer pool tuning, or lock analysis. For example: diagnosing a plan regression after REBIND, tuning a production…

josstei/maestro-orchestrate · 303 tokens

data-architect

Data Architect subagent for the design-architecture skill. Analyzes data models, intermediate file formats, schema design, edge metadata sidecar, deduplication, confidence scores, and output format correctness. Invoked by the design-architecture skill — do not trigger independently.

SenolIsci/mykg · 59 tokens

django-migrations-specialist

Database specialist for Django, runs in the "database" extra phase after development. Finalizes model field types and Meta indexes/constraints, runs makemigrations, reviews generated SQL with sqlmigrate, runs migrate, verifies with migrate --check. Do NOT use for: application logic (django-architect), tests…

AratKruglik/claude-sdlc · 85 tokens