agent-health
Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified…
Provides SQL optimization patterns for query performance, indexing strategies, schema design, and database tuning. Use when optimizing slow queries, designing indexes, or tuning database performance.
Claude Code
$ npx -y skills add tranhieutt/software_development_department --skill sql-optimization-patterns --agent claude-code
Codex
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a codex -y
Cursor
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a cursor -y
Gemini CLI
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a gemini-cli -y
GitHub Copilot
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a github-copilot -y
OpenCode
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a opencode -y
Windsurf
$ npx skills add tranhieutt/software_development_department --skill sql-optimization-patterns -a windsurf -y
name: sql-optimization-patterns type: reference description: "Provides SQL optimization patterns for query performance, indexing strategies, schema design, and database tuning. Use when optimizing slow queries, designing indexes, or tuning database performance." paths: ["**/*.sql", "**/migrations/**"] effort: 3 allowed-tools: Read, Glob, Grep, Bash user-invocable: true when_to_use: "When optimizing slow SQL queries, designing indexes, or tuning database performance"
Query optimization, indexing, and performance tuning for PostgreSQL, MySQL, and SQLite.
\`\`\`sql -- High selectivity columns (many unique values) CREATE INDEX idx_orders_user_id ON orders(user_id);
-- Composite index: order matters (equality first, then range) CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DESC);
-- Covering index (includes all needed columns) CREATE INDEX idx_orders_covering ON orders(user_id, status) INCLUDE (total, created_at); \`\`\`
\`\`\`sql -- Bad SELECT * FROM orders WHERE user_id = 1;
-- Good (select only needed columns) SELECT id, total, status FROM orders WHERE user_id = 1; \`\`\`
\`\`\`sql -- Bad: N+1 queries from application -- Good: Single query with JOIN SELECT o.id, o.total, u.name FROM orders o JOIN users u ON o.user_id = u.id WHERE o.status = 'pending'; \`\`\`
\`\`\`sql -- Bad: OFFSET scans all skipped rows SELECT * FROM orders ORDER BY id LIMIT 20 OFFSET 10000;
-- Good: Keyset pagination SELECT * FROM orders WHERE id > 10000 ORDER BY id LIMIT 20; \`\`\`
\`\`\`sql EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = 1 AND status = 'pending'; \`\`\`
Read output:
| Anti-Pattern | Problem | Fix | |-------------|---------|-----| | EAV (Entity-Attribute-Value) | No type safety, slow queries | Use JSONB or proper columns | | God table | Too many columns | Normalize into related tables | | No constraints | Data integrity issues | Add CHECK, FK, UNIQUE constraints | | String dates | Sorting/filtering issues | Use TIMESTAMP type |
\`\`\` App → Pool (min: 5, max: 20) → PostgreSQL \`\`\`
Tools: PgBouncer (PostgreSQL), ProxySQL (MySQL).
Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified…
Provides the vendored agent-style v0.3.5 prose rule pack as a portable Claude skill. Use when installing, syncing, applying, or…
Provides Angular best practices for components, modules, services, and reactive patterns. Use when working with Angular…
Records unexpected API behaviors, undocumented caveats, version bugs, or non-obvious workarounds into…
Defines REST and GraphQL API contracts including endpoints, request/response schemas, auth flows, and versioning strategy. Use…
Manages the ADR (Architecture Decision Record) registry. Use when recording tech-stack choices, design patterns, or…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.