Agent skill

Database

by iii-hq in iii-hq/workers

Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

Apache-2.0Auto-check passedDatabases

Install Database

skills CLI
$ npx skills add iii-hq/workers --skill database -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install iii-hq/workers database --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/iii-hq/workers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/database/skills .claude/skills/database && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database
GitHub stars
113
Token cost
~1.9k tokens
SKILL.md length
910 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

  • Tasks that involve SQL
  • SKILL.md covers When to Use, Boundaries, Functions and Reacting to writes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Database is an agent skill from iii-hq/workers. Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering SQL. It works with PostgreSQL, SQLite, MySQL and SQL. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve SQL

Example prompts

  • “/database”

What it can do on your machine

Read from SKILL.md and the folder at commit d3c6b85. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database loads about 1.9k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 910 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from iii-hq/workers at commit d3c6b85, republished under its Apache-2.0 licence (© iii-hq). 910 words, ~1,855 tokens.

Download SKILL.mdSave it as .claude/skills/database/SKILL.md (or your agent's skills folder).
name
database
description
Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

database

The database worker connects to PostgreSQL, MySQL, and SQLite through a managed per-database connection pool. Every callable surface lives under the database::* namespace. The driver is chosen from each database URL scheme (sqlite:, postgres://, postgresql://, mysql://).

Runtime settings live in the configuration worker under id database; pools hot-reload when the value changes. SQLite is the recommended starting point. Placeholder syntax: ? for SQLite and MySQL, $1/$2/… for Postgres.

When to Use

  • You need to read rows from a configured database (database::query).
  • You need to insert, update, delete, or run DDL and read affected-row counts or autoincrement ids (database::execute).
  • Several statements must commit or roll back together as one unit (database::transaction, database::executeBatch, or the interactive transaction surface).
  • The same parameterized SQL will run many times and you want to skip per-call parse/plan cost (database::prepareStatement + database::runStatement).
  • You need read-your-writes across round-trips with logic between steps (database::beginTransaction … commitTransaction / rollbackTransaction).

Boundaries

  • Not a migration tool, ORM, or schema designer — pass raw SQL only.
  • Not a general pub/sub bus. database::row-changed reports what THIS worker wrote, on commit (capture: statements, the default) or, on a capture: native database, any client's committed writes.
  • database::query is read-oriented; use database::execute for writes. Keep reads on query: it runs them read-only, execute does not.
  • Prepared handles pin a pool connection until TTL expiry — not transactions. Batch database::transaction / database::executeBatch need every statement up front; use the interactive surface when code must branch between steps.
  • Rows come back from a RETURNING clause written into the SQL (SQLite, Postgres; MySQL has none). The returning option never adds the clause: SQLite rejects it without one, Postgres and MySQL ignore it. SQLite degrades read_committed / repeatable_read isolation to serializable.
  • For filesystem or shell operations, use the shell worker instead.

Functions

  • database::query — run read-only SQL and return rows, row count, and column metadata.
  • database::execute — run write SQL (INSERT/UPDATE/DELETE/DDL) and return affected rows, optional last insert id, and the rows of a RETURNING clause in the SQL.
  • database::executeBatch — convenience form of transaction: statements may be bare SQL strings or {sql, params} objects (prefer params for dynamic values). Same atomic semantics, envelope, and failed_index reporting as transaction.
  • database::prepareStatement — parse and plan SQL once; return a handle that pins a pool connection until TTL expiry.
  • database::runStatement — re-execute a prepared handle with new bind params; response shape matches query.
  • database::transaction — run an ordered batch of statements atomically; rolls back on first failure and reports failed_index.
  • database::beginTransaction — open an interactive transaction and return an id plus expiry deadline.
  • database::transactionQuery — read SQL inside an open interactive transaction; same envelope as query.
  • database::transactionExecute — write SQL inside an open interactive transaction; same envelope as execute. Rejects bare transaction-control SQL — finalize via commitTransaction or rollbackTransaction.
  • database::commitTransaction — commit and finalize an interactive transaction.
  • database::rollbackTransaction — roll back and finalize an interactive transaction.
  • database::listDatabases — every configured database with its driver, credential-redacted URL, pool settings and TLS mode. Config only; use database::health for live state.

Interactive transactions auto-roll back when timeout_ms elapses (default 30 s, max 5 min). Prepared handles default to a 1 h TTL (max 24 h) with no explicit release call — let them expire or stop using them when done.

Show full SKILL.md (397 more words)Show less
Reading the schema

One shape across all three drivers — prefer these over hand-writing sqlite_master / information_schema / PRAGMA.

  • database::listTables — tables and views, with kind and (postgres) schema.
  • database::describeTable — columns with type, nullability, default, primary key and a structured foreign_key of { schema, table, column }; plus indexes and a planner row estimate.
  • database::describeSchema — the same for every table in one pass. Use this rather than looping describeTable.
  • database::schemaDiagram — positioned nodes, routed foreign-key edges, hub degree and isolated tables. For reasoning about a schema's shape, not only for drawing it.
Reading data
  • database::browseTable — paged, sorted, filtered reads with no SQL. Filters are { column, op, value } and total honours them. Follow a foreign key with an equality filter at page_size: 1.
  • database::explain — the plan as a tree with costs and warnings. analyze runs the statement, so it defaults to false and is refused for anything that is not a single read.
  • database::columnStats — planner statistics by default (approximate, labelled source: planner); exact: true scans. To profile rows you already hold, use the fp worker on a browseTable result instead.
Operations and reuse
  • database::health — pool occupancy, active queries, table sizes, locks, cache ratio. Each section is available, unsupported or denied, so a driver gap is never mistaken for an empty result.
  • database::terminateQuery — end a session, or cancel its statement with cancel_only. Takes an id from database::health.
  • database::saveQuery, database::listSavedQueries, database::deleteSavedQuery — named queries per database, kept in the state worker.
  • database::history — recent queries, newest first. Best effort, not an audit log; bind database::row-changed for that.

Reacting to writes

Register a database::row-changed trigger to be told when this worker commits a change, instead of polling:

json
{ "trigger_type": "database::row-changed", "config": { "db": "primary", "table": "orders", "ops": ["insert"] } }

The event is { db, table, op, affected_rows, returning?, truncated?, at }. It fires on commit — an interactive transaction's writes are announced by commitTransaction, and a rollback announces nothing. returning says which rows: on a capture: statements database it is the writer's own RETURNING projection, so write RETURNING <primary key> into the SQL when a listener needs row identity; on a capture: native database (which also hears other clients' writes) it is the changed rows' primary keys, capped at 100 with truncated: true past that. table is null when the statement's table cannot be read off the SQL (a CTE-wrapped write), and runStatement does not fire on the statements path because it has no affected-row count to report. Delivery is best-effort: it is not durable with the commit and has no replay or exactly-once guarantee.

© iii-hq, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in database/skills of iii-hq/workers.

Open the folder on GitHubat commit d3c6b85

Compare with similar skills

Database next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database this skilliii-hq/workers113—~1.9kAutomated safety check: PassApache-2.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT
Golang Databaseunxed/f42402 repos~2.9kAutomated safety check: PassMIT
Database MarchatCod-e-Codes/marchat137—~985Automated safety check: PassMIT
Matlab Use Databasematlab/matlab-agentic-toolkit1.1k—~3.1kAutomated safety check: PassCustom licence

Similar skills

  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 15 days ago
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    240 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Database Marchat

    Cod-e-Codes/marchat

    Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.

    137 GitHub stars~985 tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Matlab Use Database

    matlab/matlab-agentic-toolkit

    Reads from, writes to, and manages relational databases using MATLAB Database Toolbox.

    1.1k GitHub stars~3.1k tokensUpdated 7 days ago
    DatabasesAuto-check passed
  • SQL Expert

    aiskillstore/marketplace

    Expert SQL query writing, optimization, and database schema design with support for PostgreSQL, MySQL, SQLite, and SQL Server.

    430 GitHub stars~3.4k tokensUpdated today
    DatabasesAuto-check passed

More from iii-hq/workers

All 19 skills in this repo
  • Cron

    iii-hq/workers

    Schedule any registered function on a 6- or 7-field cron expression with the standalone cron worker.

    113 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Email

    iii-hq/workers

    Send and read email from the iii engine — SMTP send, IMAP read, and real-time IDLE push as a subscribable trigger type.

    113 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • HTTP

    iii-hq/workers

    Expose registered functions as HTTP endpoints with the standalone http worker.

    113 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Kanban

    iii-hq/workers

    File-backed kanban board: create, read, move and comment on tickets by key or uuid, assign agent profiles, and wake on comments through the kanban:comment trigger instead of polling.

    113 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Pubsub

    iii-hq/workers

    Fire-and-forget topic pub/sub: broadcast an event with publish and every matching subscribe trigger receives it.

    113 GitHub stars~989 tokensUpdated yesterday
    Auto-check passed
  • Release Sync

    iii-hq/workers

    Organize worker release tags into Linear release waves — one team document plus one release/<date label per same-day batch of worker releases, with shipped MOT issues labeled and linked.

    113 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Database

What does Database do?

Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools. Database is an agent skill from iii-hq/workers. Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

When should I use Database?

Database fits situations like: tasks that involve SQL.

How do I install Database in Claude Code?

Run `npx skills add iii-hq/workers --skill database -a claude-code`. Or copy the skill folder (database/skills in iii-hq/workers) into .claude/skills/database in your project. Claude Code loads it when a task matches its description.

How do I install Database in Codex?

Run `npx skills add iii-hq/workers --skill database -a codex`. Or copy the skill folder (database/skills in iii-hq/workers) into .agents/skills/database in your project. Codex loads it when a task matches its description.

Can I use Database in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add iii-hq/workers --skill database -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database, .gemini/skills/database, .github/skills/database and .opencode/skills/database in your project.

What does Database need to run?

SKILL.md names no scripts, command-line tools or credentials: Database is instructions for the agent only.

Does Database access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Database safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Database use?

Database is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Database?

Skills that share tags, products or a category with Database: SQL Database Support for pREST (prest/prest, 4.6k stars), Squix (eduardofuncao/squix, 273 stars), Golang Database (unxed/f4, 240 stars) and Database Marchat (Cod-e-Codes/marchat, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database?

iii-hq (a GitHub organization) maintains it in iii-hq/workers, which has 113 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 6, 2026.

Source: iii-hq/workers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.