db-tool
db-tool (Database)
Database query tool — SQL execution and schema introspection. Part of @blogic-cz/agent-tools.
How to Run
Run via bun db-tool (requires @blogic-cz/agent-tools as a dev dependency).
NEVER run bare psql — the credential guard will block it.
Auth: env var defined by passwordEnvVar in config (e.g. AGENT_TOOLS_DB_PASSWORD).
Commands
bun db-tool sql --env local --sql "SELECT * FROM users LIMIT 5"
bun db-tool sql --env test --sql "SELECT count(*) FROM organizations"
bun db-tool schema --env local --mode tables # List tables
bun db-tool schema --env local --mode columns --table users # Show table schema
Environment is any string (e.g. local, test, prod). Set defaultEnvironment in agent-tools.json5 to skip --env on every call.
Tips
- Use
--helpon any subcommand for full options. - Error responses include
hint,nextCommand, andretryablefields — always check them on failure. - Prefer CLI tool over MCP tools — more efficient, doesn't load extra context.
More from blogic-cz/agent-tools
git-workflow
Automates the full PR lifecycle — create or update a pull request, then aggressively monitor CI checks and review feedback in a continuous loop, fixing failures and addressing comments until the PR is fully green. Also covers push, branch creation, and branch sync workflows.
60update-packages
This skill should be used when upgrading dependencies, bumping packages, resolving outdated dependencies, or performing dependency updates. It guides safe Bun-based package upgrades with breaking-change handling, runtime pin alignment, and grouped version coordination.
40code-review
This skill should be used when running a code review or pre-PR review in template-ts repositories. It provides a severity-based checklist for architecture, security, performance, and testing quality gates.
40testing-patterns
This skill should be used when implementing or reviewing testing workflows in template-ts projects, especially for testing, Vitest, Playwright, integration test, and mocking scenarios.
36tdd
This skill should be used when a task explicitly asks for TDD, test-first development, or the Red-Green-Refactor cycle. It guides incremental implementation with concrete Red-Green-Refactor examples, including Effect service patterns with mock layers.
31agent-tools
LOAD THIS SKILL when: using CLI wrapper tools (gh-tool, observability-tool, db-tool, k8s-tool, az-tool, logs-tool, session-tool), working with observability, databases, GitHub PRs, Kubernetes, Azure DevOps, or application logs. Contains tool overview, usage patterns, and project-specific aliases.
28