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 agentmods add skills/deepsqlai/deepsql/bi-querynpx skills add DeepSQLAI/deepsql --skill bi-querygit clone --depth 1 https://github.com/DeepSQLAI/deepsqlWhat 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 | $0.00028 | $0.00925 |
| Opus 5 | $0.00014 | $0.00463 |
| Sonnet 5 | $0.00006 | $0.00185 |
| Haiku 4.5 | $0.00003 | $0.00093 |
Grade A, and why
bi-query 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 2d 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 — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BI Query
Use when the user asks a question whose answer is in the data ("how many bookings last week?", "revenue by region", "top 10 customers"). The output is a number/table, not schema advice.
Procedure
-
Resolve the connection. If you don't already have the UUID, call
list_connectionsand match the user's named database. Pass the UUID to every later call. -
Ground. Call
get_brain_context(connectionId, "<the user's question>"). Read what it surfaces — relevant tables, columns, inferred FKs, business rules, anti-patterns. Do not skip this even if you think you know the table. -
Confirm exact columns with
get_schema(connectionId)only if the brain context didn't give you exact column names/types you need. Don't queryinformation_schema. -
Write ONE statement. Table-qualify every column. Apply every relevant business rule (e.g. cancelled/soft-delete filters) without being asked. Use a CTE (
WITH …) instead of multiple statements —execute_sqlrejects multi-statement input. -
Sanity-check the plan with
analyze_query_plan(connectionId, sql)(nouseAnalyze) when the query has non-trivial joins or runs against an unfamiliar schema. It's cheap and catches bad joins before you show the user a wrong number. -
Run it with
execute_sql(connectionId, sql, limit=…). Remember: default 100 rows, max 1000. For a total,SELECT COUNT(*)rather than counting a truncated result set. -
Answer only. Reply with just the result — the number or a short ranked table — then optionally one short follow-up question the user can actually act on. Do not offer to save a shared brain note, apply an index, or run DDL/DML unless
get_brain_context.callerCapabilitiessays they can. Apply business rules silently; do NOT append "Grounding used" / "Filters applied" / "Used:" / tool-narration / column-mapping sections. Only if the user asks how you got it do you show the tables, joins, and filters.
Guardrails
- Read-only only. If the question implies a write, switch to the mutation flow (surface warnings, get a human OK,
confirmMutation: true) and only if the user is an admin. - If
get_brain_contextreturns nothing useful, do not guess a table from memory. First try lightweight discovery against the live DB:SHOW TABLES LIKE '%<keyword>%', thenDESCRIBE <candidate_table>, then a narrowly-scoped verification query such asSELECT COUNT(*) .... Ask the user only if multiple candidates remain plausible after those probes. - If schema/object metadata is too large or
get_database_objectstimes out, prefer targeted read-only probes over broad catalog dumps. - When the user asks for a chart or ranking and brain context is thin, first identify the fact table and dimension join path with small probes, then run the final aggregation. Example pattern used successfully in
analytics_db:CUSTOMER_ORDERS.customer_id -> CUSTOMERS.idfor city-level booking rollups, andPRICE_BREAKDOWN.booking_id -> CUSTOMER_ORDERS.id -> CUSTOMERS.idfor customer-level room-price averages. - If the user says "active customers" or similar status language, check brain context for status-source rules before using a status column. In
analytics_db,PRODUCT_PRICING.property_statusis the correct source andCUSTOMERS.onboarding_statusis specifically the wrong one. - For chart requests in chat-only environments, still run the real aggregation query first. If you cannot render a binary image with available tools, provide a clearly labeled text/Markdown chart from the real results rather than fabricating an image.
- Never present a truncated (limit-capped) result as a total.
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.
- 2d ago First seen · 41 lines · 28 tokens per session scan A e7816661beaf
bi-query is a skill published in the GitHub repository DeepSQLAI/deepsql (23 stars, last pushed 2d ago), licensed Apache-2.0. It adds 28 tokens to every session and 925 once invoked, about $0.0001 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
configure-nightwatch
Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.
laravel-actions
Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.
debugging-output-and-previewing-html-using-ray
Use when user says "send to Ray," "show in Ray," "debug in Ray," "log to Ray," "display in Ray," or wants to visualize data, debug output, or show diagrams in the Ray desktop application.
fortify-development
ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), passkeys, profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions…
pest-testing
Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to…
configuring-horizon
Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing Horizon (horizon:install, Sail setup), configuring config/horizon.php (supervisor blocks, queue assignments, balancing strategies, minProcesses/maxProcesses), fixing the dashboard…