Agent Skills: Parameters

Run SQL queries on connected database.

UncategorizedID: rakibdev/dotfiles/database

Install this agent skill to your local

pnpm dlx add-skill https://github.com/rakibdev/dotfiles/tree/HEAD/home/.config/opencode/skill/database

Skill Files

Browse the full folder contents for database.

Download Skill

Loading file tree…

home/.config/opencode/skill/database/SKILL.md

Skill Metadata

Name
database
Description
Run SQL queries on connected database.

Usage

Scripts has database already connected. Run SQL queries directly:

bun scripts/query.ts "<query>"

# Parameters
bun scripts/query.ts "sql\`SELECT * FROM users WHERE active = ${true}\`"

# Batching
bun scripts/query.ts "Promise.all([
  sql\`...\`,
  sql\`...`
])"

Tips

  • sql tag is globally available in query context.
  • Use LIMIT 1 to understand schema or check existence. Don't waste ai tokens.
  • Bun.SQL automatically uses prepared statements for parameterized queries.
  • For bulk inserts, use sql\INSERT INTO table ${sql(arrayOfObjects)}``.