Data query

From rajitsaha/100xprism · View interactive version

Data query is an AI agent skill from the GitHub repository rajitsaha/100xprism. Run analytics queries against any database using plain English — BigQuery (bq CLI), PostgreSQL, MySQL, SQLite, or any DB with a CLI/MCP/API. Use when you need to pull metrics, analyze data, or answer business questions without writing SQL.

How to use this skill

Skill file

Query — Plain-English Database Analytics

Describe what you want to know — Claude writes and runs the query.

How to use

Supported interfaces


Phase 1 — Understand the question

Restate the business question in concrete terms. If the schema is ambiguous, inspect it first:

# BigQuery — show table schema
bq show <dataset>.<table>

# PostgreSQL
PGPASSWORD="$DB_PASS" psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" \
  -c "\d <table_name>"

Phase 2 — Write and run the query

Write the SQL for the business question. Run it using the appropriate CLI. Explain the results in plain English.


Phase 3 — Return results

Return:

  1. The SQL written
  2. A plain-English answer to the original question
  3. A table of key numbers

For recurring queries: offer to save as a named script.

Scope vs `/db`

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.