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 skills add spencerpauly/skills-repo --skill ask-databasegit clone --depth 1 https://github.com/spencerpauly/skills-repoWrote 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/skills/spencerpauly/skills-repo/ask-database)<a href="https://agentmods.dev/skills/spencerpauly/skills-repo/ask-database"><img src="https://agentmods.dev/badge/skills/spencerpauly/skills-repo/ask-database/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/skills/spencerpauly/skills-repo/ask-database"><img src="https://agentmods.dev/badge/skills/spencerpauly/skills-repo/ask-database.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.00061 | $0.00620 |
| Opus 5 | $0.00030 | $0.00310 |
| Sonnet 5 | $0.00012 | $0.00124 |
| Haiku 4.5 | $0.00006 | $0.00062 |
Grade A, and why
ask-database 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 12d 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ask Database
Translate a question into SQL, run it through QueryBear's read-only gateway, and return the answer in plain language.
When to use
- The user asks a question whose answer is stored in their database: "how many active subscriptions do we have", "which users haven't logged in in 30 days", "what's the median order value last week".
- The user pastes a SQL question or asks "can you run this query".
QueryBear is read-only — never propose this skill for INSERT/UPDATE/DELETE/DDL. Mutations will be rejected by the gateway.
Steps
-
Pick a connection.
- If the user has only one database, skip discovery and call
get_schemaandrun_querywith noconnectionargument. - If they have multiple and you don't know which, call
list_connectionsonce and ask the user to pick (or infer from context: "production" vs "staging").
- If the user has only one database, skip discovery and call
-
Read the schema once per task with
get_schema. Note the relevant tables and column types before writing SQL. Don't guess column names. -
Write a focused SELECT.
- Always include a
LIMIT— usually 100 — unless the user explicitly asks for everything. - Aggregate when the question is a count, sum, average, or distribution.
- Prefer one query that answers the question over five exploratory queries.
- Always include a
-
Run it via
run_query. If QueryBear rejects the query (blocked column, blocked table, row-limit hit, timeout), surface the error message verbatim — don't paraphrase or guess around it. -
Translate the result back to English. Lead with the answer. Show the underlying SQL underneath in a code block so the user can audit it. If the result is a list of more than ~10 rows, summarize patterns and offer to drill in.
Output format
**Answer:** <one sentence with the number/list/whatever>
```sql
<the query you ran>
| col | col |
|---|---|
| ... | ... |
## Don't
- Don't try to mutate. QueryBear blocks it; even attempting wastes a turn.
- Don't `SELECT *` on a wide table without a `LIMIT`.
- Don't guess column names. Re-read the schema if you're unsure.
- Don't return a 500-row table inline. Summarize and offer the full export.
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.
- 12d ago First seen · 59 lines · 61 tokens per session scan A 1914289b9ed4
ask-database is a skill published in the GitHub repository spencerpauly/skills-repo (25 stars, last pushed 2mo ago), licensed MIT. It adds 61 tokens to every session and 620 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-30.
Other skills, from other repositories
create-pr
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request, open a PR, or submit changes for review.
schema-exploration
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
nornicdb-cypher-queries
Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.
supabase
Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…
volcengine-rds-postgresql
A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.