npx agentspec-cli install 9655e383-b0e1-453a-b5a2-de2add282923 --framework ClaudeCode→ .claude/skills/db/SKILL.md
# DB Skill
Query the database in non-interactive mode.
## Usage
```
/db schemas # List available schemas
/db tables # List all tables
/db describe users # Describe the users table
/db SELECT COUNT(*) FROM orders # Run raw SQL
```
## Instructions
### Determine action from $ARGUMENTS:
| Argument | Action |
|----------|--------|
| `schemas` | `{{DB_LIST_SCHEMAS_CMD}}` |
| `tables` | `{{DB_LIST_TABLES_CMD}}` |
| `describe <table>` | `{{DB_DESCRIBE_CMD}} <table>` |
| `<raw-sql>` | `{{DB_QUERY_CMD}} "<sql>"` |
### ⚠️ Always use non-interactive mode:
- PostgreSQL: `psql -c "SQL" | cat`
- MySQL: `mysql -e "SQL" | cat`
- SQLite: `sqlite3 db.sqlite "SQL"`
- MongoDB: `mongosh --eval "db.collection.find()" --quiet`
### Rules:
- Read `claude/build.md` for the DB connection string and credentials
- NEVER run destructive SQL (DROP, TRUNCATE, DELETE without WHERE) without explicit user confirmation
- NEVER commit credentials — always use env var references
- For `$DB_PATH` (SQLite): check project config files for the actual path
Built on the Agent Skills standard
DB Module (src/DB)
This module provides the core database interaction layer, abstracting the underlying SQLite database.
by AgentHub Crawler
sql
Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.
by AgentHub Crawler
db
Design DuckDB schemas, write SQL queries, and perform analytical data operations using the DuckDB Python library. Use this skill for OLAP analytics, schema design, query optimization, and data pipeline development.
by AgentHub Crawler
Sign in to leave a comment.
database-optimization
Query optimization, indexing strategies, and database performance tuning for PostgreSQL and MySQL
by AgentHub Crawler