Instrument database queries, connection pools, and detect N+1 queries
Instrument database queries to detect N+1 queries, slow queries, and connection pool exhaustion. Use when executing database operations or monitoring connection pool metrics.
/plugin marketplace add nexus-labs-automation/backend-observability/plugin install nexus-labs-automation-backend-observability@nexus-labs-automation/backend-observabilityThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Database is often the bottleneck. Track queries, pools, and patterns.
| Attribute | Example | Required |
|---|---|---|
db.system | postgresql, mysql | Yes |
db.operation | SELECT, INSERT | Yes |
db.name | orders_db | Yes |
db.sql.table | users | Recommended |
db.statement | SELECT * FROM users WHERE id = ? | Parameterized only! |
| Metric | Type | Description |
|---|---|---|
db.connections.active | Gauge | In use |
db.connections.idle | Gauge | Available |
db.connections.max | Gauge | Pool limit |
db.connections.wait_count | Counter | Had to wait |
db.connections.wait_duration | Histogram | Wait time |
| Issue | Detection | Fix |
|---|---|---|
| N+1 queries | >10 identical queries per request | Use eager loading |
| Slow queries | Duration > p95 threshold | Add indexes, optimize |
| Pool exhaustion | wait_count increasing | Increase pool, fix leaks |
Before: Start span (db.system, db.operation, db.sql.table), start timer
After: Record duration, set db.rows_affected, record errors, end span
Every 10s: Record active, idle, wait_count, wait_duration from pool stats
references/methodology/use-methodology.mdreferences/platforms/{platform}/database.mdUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.