sharp-db

A command-line database tool for running SQL queries and inspecting table and view structure in PostgreSQL, MySQL, and SQLite databases.

In plain words
What is it for?
Use it to run SELECT, INSERT, UPDATE, or DELETE statements, list database structure, inspect columns, limit returned rows, or export complete query results when needed.
Why use it?
It provides database results and schema details without requiring an interactive database session, while limiting exploratory results by default.

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/beginor/agent-skills/sharp-db
Any agent
npx skills add beginor/agent-skills --skill sharp-db
Clone the repo
git clone --depth 1 https://github.com/beginor/agent-skills

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,858 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00068 $0.01858
Opus 5 $0.00034 $0.00929
Sonnet 5 $0.00014 $0.00372
Haiku 4.5 $0.00007 $0.00186

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

Security

Grade C, and why

sharp-db scanned grade C with 2 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/build.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- macOS/Linux: `curl -fsSL https://dot.net/v1/dotnet-install.sh | bash`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- macOS/Linux: `curl -fsSL https://dot.net/v1/dotnet-install.sh | bash`
skills/sharp-db/SKILL.md · 148 lines

How it starts

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

Sharp-DB

A CLI tool for querying databases and inspecting schema metadata. Supports PostgreSQL, MySQL, and SQLite.

Requirements

You should have dotnet sdk 10.0.x installed. if dotnet does not exist on system, please install it first:

  • macOS/Linux: curl -fsSL https://dot.net/v1/dotnet-install.sh | bash
  • Windows: irm https://dot.net/v1/dotnet-install.ps1 | iex

Setup

Build the tool once before first use:

scripts/build.sh

The binary is at bin/sharp-db (or bin/sharp-db.exe on windows).

Commands

query — Execute SQL

Run a SQL statement and return results as a markdown table.

sharp-db query --db-type <postgres|mysql|sqlite> --connection "<conn-string>" --sql "<sql>" [--limit <n>]

For non-SELECT statements (INSERT, UPDATE, DELETE), returns Rows affected: N.

Row limit. --limit caps the number of rows returned (default 100). A capped result appends _Showing first N rows; result truncated._. Pass --limit 0 to remove the cap (use for exports or when you genuinely need every row). Always prefer the default for exploratory queries so a large table doesn't flood the output; raise the limit deliberately when the user asks for more.

Mutating statements. If the user explicitly asked for the change, run it directly and show the SQL in your report — no confirmation round-trip. Only pause for explicit confirmation when a destructive statement (DROP, TRUNCATE, DELETE/UPDATE without WHERE, ALTER) is not clearly implied by the user's request. SELECT and other read-only statements never require confirmation.

tables — List tables and views

List all tables and views with metadata (primary keys, foreign keys, descriptions, related objects).

sharp-db tables --db-type <postgres|mysql|sqlite> --connection "<conn-string>" [--schema <name>]

If --schema is omitted and the database supports schemas, returns tables from all schemas.

columns — Inspect table columns

List columns for a specific table or view, including data types, character maximum length (for char/varchar types), constraints, nullability, and foreign key references.

Read the full file on GitHub · 148 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. yesterday First seen · 148 lines · 68 tokens per session scan C 22b180499694

Subscribe to this mod's changes

sharp-db is a skill published in the GitHub repository beginor/agent-skills (2 stars, last pushed 13d ago), licensed MIT. It adds 68 tokens to every session and 1,858 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens