Query the local Postgres database of the active Aspire worktree via psql.

MITAuto-check: notesDevelopment

Install DB Query

skills CLI
$ npx skills add platformplatform/PlatformPlatform --skill db-query -a claude-code

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

GitHub CLI
$ gh skill install platformplatform/PlatformPlatform db-query --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/platformplatform/PlatformPlatform.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/db-query .claude/skills/db-query && 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
db-query
GitHub stars
440
Token cost
~371 tokens
SKILL.md length
161 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Query the local Postgres database of the active Aspire worktree via psql.

  • Tasks that involve Git worktrees
  • SKILL.md covers Prerequisites, Connection and Databases
  • Calls brew, psql and apt

What it does

DB Query is an agent skill from platformplatform/PlatformPlatform. Query the local Postgres database of the active Aspire worktree via psql.

Its SKILL.md is about 370 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 Development, covering Git worktrees. It works with PostgreSQL. The repository describes itself as: A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/db-query”

What it can do on your machine

Read from SKILL.md and the folder at commit 269de1c. 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

    Shell commands in SKILL.md call:

    • brew
    • psql
    • apt
    • winget
    • dotnet

    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

DB Query loads about 371 tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 161 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:20
    > - **Linux**: `sudo apt install postgresql-client`

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 platformplatform/PlatformPlatform at commit 269de1c, republished under its MIT licence (© platformplatform). 161 words, ~371 tokens.

Download SKILL.mdSave it as .claude/skills/db-query/SKILL.md (or your agent's skills folder).
name
db-query
description
Query the local Postgres database of the active Aspire worktree via psql.

Database Query

Port = .workspace/port.txt base + 4. Never trust Aspire MCP for the port — a common critical failure that silently runs SQL on another worktree's database.

Read-only. Every write needs explicit user approval for that exact statement, every time — prior approvals never carry over.

For destructive operations (DROP, TRUNCATE, DELETE, ALTER, or anything that loses data), take extreme care. If anything in the request is even slightly unclear about the scope, target, or intent, stop and ask for clarification before executing. Always assume the most conservative interpretation.

Prerequisites

If psql --version fails, tell the user:

psql is not installed. Install:

  • macOS: brew install libpq && brew link --force libpq
  • Linux: sudo apt install postgresql-client
  • Windows: winget install PostgreSQL.PostgreSQL.17

Connection

Aspire must be running.

  • Host localhost, port = <base> + 4 where <base> is the integer in .workspace/port.txt.
  • User postgres.
  • Password: export PGPASSWORD=$(dotnet user-secrets list --project application/AppHost/AppHost.csproj | sed -n 's/^postgres-password = //p') (keeps it out of shell history).

Databases

Each SCS has its own database. List them:

sql
SELECT datname FROM pg_database WHERE datistemplate = false AND datname <> 'postgres';

© platformplatform, MIT. 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 .claude/skills/db-query of platformplatform/PlatformPlatform.

Open the folder on GitHubat commit 269de1c

Compare with similar skills

DB Query 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.

DB Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
DB Query this skillplatformplatform/PlatformPlatform440—~371Automated safety check: NotesMIT
Dev Instanceyc-software/qm15k—~3.7kAutomated safety check: NotesMIT
Setup Devrelytcloud/pg_ducklake143—~2kAutomated safety check: NotesMIT
Stale Worktree Cleanuptrycompai/comp2k—~1.8kAutomated safety check: NotesAGPL-3.0
Local Stacktheopenco/llmgateway1.7k—~1.6kAutomated safety check: NotesCustom licence
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Dev Instance

    yc-software/qm

    Run the current worktree as a production-shaped local dev instance with web, Slack, or both, on a real LLM + Postgres.

    15k GitHub stars~3.7k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Setup Dev

    relytcloud/pg_ducklake

    Dev environment setup for build tools, PostgreSQL, submodules, and worktrees.

    143 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • A skill your agent uses when cleaning up old git worktrees, removing worktrees whose branches have merged or been abandoned, or dropping orphaned compdev Postgres databases.

    2k GitHub stars~1.8k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Local Stack

    theopenco/llmgateway

    Run an isolated per-worktree LLM Gateway stack — own Postgres, Redis, storage Redis, and app ports — and tear it down safely.

    1.7k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check: notes
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from platformplatform/PlatformPlatform

All 18 skills in this repo
  • Create Prd

    platformplatform/PlatformPlatform

    Create a product requirement document (PRD) for a new feature.

    440 GitHub stars~3k tokensUpdated 13 days ago
    Auto-check passed
  • Rebuild Branch

    platformplatform/PlatformPlatform

    Rebuild a stale branch by cherry-picking each commit onto a fresh branch off main, using a ralph-loop to validate each commit (build, test, format, lint, optional e2e) before moving on.

    440 GitHub stars~2.1k tokensUpdated 13 days ago
    Auto-check: notes
  • Swc Plugin Compatibility

    platformplatform/PlatformPlatform

    Diagnose and fix Lingui SWC plugin compatibility errors with Next.js, Rspack, or other SWC runtimes.

    440 GitHub stars~873 tokensUpdated 13 days ago
    Auto-check passed
  • Aspire Restart

    platformplatform/PlatformPlatform

    Start or restart the .NET Aspire AppHost via the developer CLI.

    440 GitHub stars~415 tokensUpdated 13 days ago
    Auto-check passed
  • Commit

    platformplatform/PlatformPlatform

    Commit session changes to git. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~567 tokensUpdated 13 days ago
    Auto-check passed
  • E2E

    platformplatform/PlatformPlatform

    Run end-to-end Playwright tests via the developer CLI. An agent skill from platformplatform/PlatformPlatform.

    440 GitHub stars~542 tokensUpdated 13 days ago
    Auto-check passed

Works with

Categories

Questions about DB Query

What does DB Query do?

Query the local Postgres database of the active Aspire worktree via psql. DB Query is an agent skill from platformplatform/PlatformPlatform. Query the local Postgres database of the active Aspire worktree via psql.

When should I use DB Query?

DB Query fits situations like: tasks that involve Git worktrees.

How do I install DB Query in Claude Code?

Run `npx skills add platformplatform/PlatformPlatform --skill db-query -a claude-code`. Or copy the skill folder (.claude/skills/db-query in platformplatform/PlatformPlatform) into .claude/skills/db-query in your project. Claude Code loads it when a task matches its description.

How do I install DB Query in Codex?

Run `npx skills add platformplatform/PlatformPlatform --skill db-query -a codex`. Or copy the skill folder (.claude/skills/db-query in platformplatform/PlatformPlatform) into .agents/skills/db-query in your project. Codex loads it when a task matches its description.

Can I use DB Query 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 platformplatform/PlatformPlatform --skill db-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-query, .gemini/skills/db-query, .github/skills/db-query and .opencode/skills/db-query in your project.

What does DB Query need to run?

Going by SKILL.md and its folder, DB Query needs the command-line tools its instructions call (brew, psql, apt, winget and dotnet).

Does DB Query 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 DB Query safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does DB Query use?

DB Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does DB Query use?

About 371 tokens (SKILL.md is roughly 1.5k 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 DB Query?

Skills that share tags, products or a category with DB Query: Dev Instance (yc-software/qm, 15k stars), Setup Dev (relytcloud/pg_ducklake, 143 stars), Stale Worktree Cleanup (trycompai/comp, 2k stars) and Local Stack (theopenco/llmgateway, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains DB Query?

platformplatform (a GitHub organization) maintains it in platformplatform/PlatformPlatform, which has 440 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on September 24, 2026.

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