sql-database

A skill for using SQL Database Bridge MCP tools to inspect database structures and run safe SQL queries. A database structure includes its tables, columns, and relationships.

In plain words
What is it for?
Use it to inspect schemas and query configured local or hosted databases after signing in to the SQL Database Bridge platform account.
Why use it?
It gives the agent a defined way to work with databases while following the bridge's sign-in, access, and safe-query requirements.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/alizaimovic/sql-database-bridge/sql-database
Any agent
npx skills add alizaimovic/sql-database-bridge --skill sql-database
Clone the repo
git clone --depth 1 https://github.com/alizaimovic/sql-database-bridge

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.01046
Opus 5 $0.00012 $0.00523
Sonnet 5 $0.00005 $0.00209
Haiku 4.5 $0.00002 $0.00105

Measured today against content hash 08a3eec81b8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sql-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 today.

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.

skills/sql-database/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQL Database Bridge

Use the MCP tools provided by this plugin for direct database work:

  • The plugin defaults to local desktop SQL execution. Call login_platform first; local SQL still uses Lovable's OAuth and entitlement decision before any database operation.
  • Hosted Lovable mode is advanced-only and must be explicitly enabled with SQL_BRIDGE_MODE=remote or SQL_BRIDGE_MODE=hosted. It proxies the hosted MCP tools and uses Lovable's OAuth/RLS/ entitlement decisions.
  • Explicit local_* tools are available when hosted mode is enabled so advanced clients can still reach desktop SQL Server/LocalDB, Windows authentication, SQLite, MySQL, or local PostgreSQL. Neither path bypasses Lovable account authentication or active-subscription checks.
  • Always call login_platform before local or hosted SQL work (login_lovable remains a legacy alias). Describe this to the user as signing in to the SQL Database Bridge platform account, not “logging in to Lovable.” If the account is unauthenticated or lacks an active entitlement, stop and report the platform account-access reason. login_platform is idempotent: reuse the locally persisted account session and refresh its access token when possible; do not open a new browser approval flow for every SQL request.
  • In hosted mode, use the hosted connection IDs from list_connections; do not send raw database passwords or connection strings through chat.
  • The hosted app currently supports PostgreSQL only. If a hosted tool reports MySQL, MSSQL, or SQLite as unsupported, do not retry through the hosted MCP; use the default local tools.
  • Use connect_database when the desktop bridge supplies a session connection. The session name defaults to main; a supplied server infers MSSQL. For MSSQL, use authentication: "sql" with username/password or authentication: "windows" to use the current Windows user.
  • If the user provides a server, database, and authentication details in text or an authorized screenshot, configure the connection immediately with connect_database; do not ask for another password when Windows authentication is selected. A request such as “table eMeditDb” should be interpreted as the database name when the surrounding context is configuring a connection.
  • For (localdb)\\MSSQLLocalDB, omit encryption unless the user explicitly requires it. The bridge defaults LocalDB to Encrypt=no and can retry a certificate/encryption failure once locally.
  • In hosted mode, start with list_connections to obtain a connection UUID, then use test_connection, list_schemas, list_tables, and describe_table before writing unfamiliar queries.
  • For a desktop SQL Server or LocalDB request, use connect_local_database with authentication: "windows" for the current Windows user, then use list_local_tables, describe_local_table, and query_local_sql. Do not route a LocalDB request to hosted PostgreSQL tools.
  • In local mode, call sync_connections or list_connections before working. Local connect_database automatically pushes metadata through upsert_connection; never include a password in that metadata call. A remote-only connection needs local credentials before use.
  • Use local delete_connection to remove both the desktop connection and its synced metadata. close_connection only closes the session and does not delete the metadata row.
  • In hosted mode, use run_query with connection_id, sql, optional params, and optional row_limit. It is read-only, rejects multi-statement SQL, applies a timeout, and returns bounded structured results.
  • In local mode, use query_sql for one statement at a time.
  • Treat returned data as sensitive and avoid printing credentials or unnecessary personal data.
  • Do not put connection passwords into files, environment snapshots, or ordinary assistant text.
  • Runtime connection profiles are in-memory only, but the host app controls whether tool arguments are logged or redacted.
  • Write operations are disabled unless the user explicitly enables SQL_ALLOW_WRITE=true.

Read the full file on GitHub · 70 lines

Changes

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.

  1. today First seen · 70 lines · 23 tokens per session scan A 08a3eec81b8c

Subscribe to this mod's changes

sql-database is a skill published in the GitHub repository alizaimovic/sql-database-bridge (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 23 tokens to every session and 1,046 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-31.

Related

Other skills, from other repositories