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.5 | $0.00024 | $0.00248 |
| Sonnet 5.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 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 — 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.
- 2mo 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 (27 stars, last pushed 4mo ago), licensed MIT. It adds 61 tokens to every session and 620 once invoked, about $0.0002 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-30.
ask-database compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ask-databasespencerpauly/skills-repo | Skill | 27 | 4mo ago | MIT | A | 61 | Claude Code, Codex |
| create-prprisma/orm | Skill | 48k | today | Apache-2.0 | A | 47 | Claude Code, Codex |
| schema-explorationlangchain-ai/deepagents | Skill | 31k | today | MIT | A | 57 | Claude Code, Codex |
| atlas-mssqlariga/atlas | Skill | 8.8k | 7d ago | Apache-2.0 | A | 163 | Claude Code |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 115 | Claude Code, Codex |
| nornicdb-cypher-queriesorneryd/NornicDB | Skill | 931 | today | MIT | A | 79 | Claude Code, Codex |
| dsqlawslabs/agent-plugins | Skill | 941 | 2d ago | Apache-2.0 | A | 246 | Claude Code |