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 23blocks-OS/ai-maestro-plugins --skill agentic-sqlgit clone --depth 1 https://github.com/23blocks-OS/ai-maestro-pluginsWrote 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/23blocks-os/ai-maestro-plugins/agentic-sql)<a href="https://agentmods.dev/skills/23blocks-os/ai-maestro-plugins/agentic-sql"><img src="https://agentmods.dev/badge/skills/23blocks-os/ai-maestro-plugins/agentic-sql/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/23blocks-os/ai-maestro-plugins/agentic-sql"><img src="https://agentmods.dev/badge/skills/23blocks-os/ai-maestro-plugins/agentic-sql.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.00098 | $0.02868 |
| Opus 5.5 | $0.00039 | $0.01147 |
| Sonnet 5.5 | $0.00020 | $0.00574 |
| Haiku 4.5 | $0.00010 | $0.00287 |
Grade A, and why
agentic-sql 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 5d 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
First-Time Setup
On first invocation in a project, the skill auto-extracts these from CLAUDE.md if present, then asks for any missing values. Persist them to .claude/agentic-sql.yml for the session.
| Variable | Purpose | Example |
|---|---|---|
{QUERY_DIR} |
Where saved queries live | sql_library/queries/ |
{INDEX_PATH} |
Markdown index of the library | sql_library/INDEX.md |
{SCHEMA_DOC_PATH} |
Schema reference doc | sql_library/SCHEMA.md |
{DB_ENVS} |
Named environments + connection variables | acme (ACME_DATABASE_URL), files (FILES_DATABASE_URL), … |
{READ_ONLY_ROLE} |
Postgres role with SELECT-only grants the agent connects as | agentic_sql_ro |
{SAFE_PSQL_WRAPPER} |
The wrapper that applies the SQL gate. It ships with this skill as scripts/safe_psql.py; point this at your own only if you replace it |
safe-psql |
{MAX_ROWS} |
Default LIMIT injected when query has none | 1000 |
{STATEMENT_TIMEOUT} |
statement_timeout set on the read-only role |
30s |
{DISPLAY_ROWS} |
Rows shown to the user before offering more | 50 |
{SAFE_PSQL_WRITE} |
The write door (only if data may be changed): ships as scripts/safe_psql_write.py |
safe-psql-write |
{WRITE_SETTINGS} |
Which tables and columns may change, whether hard delete is on | .safe-psql/write.yaml |
Prerequisite: safe-psql must be on the PATH. AI Maestro's installer and updater set it up (a private Python environment with the packages in requirements.txt). Without AI Maestro, create one yourself: python3 -m venv ~/.aimaestro/venvs/agentic-sql && ~/.aimaestro/venvs/agentic-sql/bin/pip install -r <skill dir>/requirements.txt, then run <that venv>/bin/python <skill dir>/scripts/safe_psql.py wherever this skill says safe-psql. The wrapper refuses to run as a role that could write (see reference/run.md), so a wrong setup stops instead of working unsafely. If the wrapper cannot run, stop and tell the user. Never run psql directly against production or staging.
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/write.example.yaml 873 B
- LICENSE 1.0 KB
- reference/add.md 6.6 KB
- reference/audit.md 4.9 KB
- reference/curate.md 6.1 KB
- reference/find.md 4.5 KB
- reference/run.md 9.9 KB
- reference/schema.md 8.0 KB
- reference/write.md 7.6 KB
- requirements.txt 53 B
- scripts/safe_psql_write.py 30 KB runs code
- scripts/safe_psql.py 16 KB runs code
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.
- 5d ago Changed · +2 lines 29cadf02eb6f
- 7d ago Changed · +8 lines · +12 tokens per session 10f0385f39ef
- 9d ago First seen · 104 lines · 86 tokens per session scan A 562298503ff3
agentic-sql is a skill published in the GitHub repository 23blocks-OS/ai-maestro-plugins (11 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 2,868 once invoked, about $0.0004 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-10-11.
Other skills, from other repositories
django-orm-mastery
Master Django ORM patterns: QuerySets, selectrelated, prefetchrelated, F/Q objects, annotations, aggregations, and raw SQL safety. Use when the user writes Django database queries, asks about ORM optimization, encounters N+1 queries, or works with complex filtering and aggregation. Trigger when you see inefficient…
migration-patterns
Guide for database schema migrations with zero-downtime patterns, rollback strategies, data migrations, and migration testing. Use when the user writes database migrations, asks about schema changes in production, needs zero-downtime migration patterns, or plans rollback strategies. Trigger whenever database…
query-optimization
Guide for optimizing SQL queries with EXPLAIN ANALYZE, index tuning, N+1 detection, covering indexes, and query plan analysis. Use when the user has slow database queries, asks about query performance, needs to interpret EXPLAIN output, or wants to eliminate N+1 queries. Trigger whenever query performance, slow…
schema-design-guide
Guide for relational database schema design with normalization, indexing strategy, constraints, naming conventions, and denormalization tradeoffs. Use when the user designs database tables, asks about normalization, needs indexing advice, or defines foreign key relationships. Trigger whenever database schema, table…
caching-strategies
Implement effective caching at every layer: in-memory, Redis, CDN, and browser. Activate whenever the user asks about caching, performance optimization for repeated data access, Redis patterns, CDN configuration, cache invalidation, HTTP cache headers, memoization, or stale-while-revalidate strategies.
database-expert
Use this skill when designing databases, writing queries, optimizing performance, or planning migrations. Covers SQL optimization, schema design, indexing strategies, PostgreSQL patterns, migration...