postgres-perf
PostgreSQL performance optimization and best practices. Use when writing SQL queries, designing schemas, implementing indexes, or debugging database performance. Covers query optimization, connection management, schema design, and RLS.
Why use this skill?
Master PostgreSQL performance with the postgres-perf skill. Get expert help with query optimization, indexing strategies, RLS, and connection pooling.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/kjaylee/postgres-perfWhat This Skill Does
The postgres-perf skill is a specialized technical assistant designed to optimize PostgreSQL databases, ensuring peak performance, security, and scalability. It provides comprehensive guidance on SQL query optimization, database schema architecture, advanced indexing strategies, and connection pool management. Whether you are debugging slow queries using EXPLAIN ANALYZE, designing robust RLS (Row Level Security) policies, or managing concurrency in high-traffic environments, this skill delivers expert-level insights aligned with industry best practices.
Installation
You can install the skill by executing the following command in your terminal within the OpenClaw environment:
clawhub install openclaw/skills/skills/kjaylee/postgres-perf
Use Cases
- Query Optimization: Analyzing slow SELECT, UPDATE, or DELETE operations to identify bottlenecks like sequential scans.
- Schema Architecture: Deciding between normalized designs or strategic denormalization and implementing efficient indexing strategies like partial or composite indexes.
- Security Hardening: Configuring Row Level Security (RLS) policies for multi-tenant applications while ensuring performance overhead is minimized.
- Concurrency Management: Refactoring long-running transactions to avoid lock contention and deadlocks in highly concurrent environments.
- Connection Tuning: Guidance on implementing pgBouncer or serverless connection pooling to prevent exhaustion.
Example Prompts
- "My query to fetch active user orders is taking over 2 seconds; can you help me optimize the schema or the SQL using EXPLAIN ANALYZE?"
- "I need to implement RLS for my multi-tenant blog system. How can I ensure the policies don't degrade the performance of the index lookups?"
- "Is it better to use UUIDs or sequence integers for my primary keys in a distributed system, and how does this affect indexing overhead?"
Tips & Limitations
- Habitual Profiling: Always use
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)during development to understand how Postgres executes your logic. - Selective Indexing: Avoid 'index everything' syndrome. Excess indexes degrade write performance and increase storage costs. Utilize partial indexes (
WHEREclauses) for frequently queried subsets. - Connection Discipline: Never connect directly to the DB in serverless environments; always use connection poolers like pgBouncer.
- Transaction Management: Keep transactions as short as possible to prevent row locks from affecting other sessions.
- Limitations: This skill is a consultant tool; it cannot directly execute DDL/DML commands on your production database without your explicit authorization and review of the proposed migrations.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-kjaylee-postgres-perf": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution
Related Skills
ui-ux-pro-max
UI/UX design intelligence and implementation guidance for building polished interfaces. Use when the user asks for UI design, UX flows, information architecture, visual style direction, design systems/tokens, component specs, copy/microcopy, accessibility, or to generate/critique/refine frontend UI (HTML/CSS/JS, React, Next.js, Vue, Svelte, Tailwind). Includes workflows for (1) generating new UI layouts and styling, (2) improving existing UI/UX, (3) producing design-system tokens and component guidelines, and (4) turning UX recommendations into concrete code changes.
ralph-loop
AI 자율 구현 방법론. 구현/개발/코딩 요청 시 자동 적용. 메인은 마더 서브에이전트를 spawn하고, 마더가 워커들을 관리. specs/ → IMPLEMENTATION_PLAN.md → 1태스크씩 구현 → 2단계 리뷰 → 테스트 → 반복.
game-dev-rust-godot
Game development workflow using Rust+WASM or Godot 4.x for HTML5 games. Use when creating new games, implementing game mechanics, or porting existing games. Follows TDD-based production pipeline v3.1 with asset-first approach. Covers Rust(Macroquad/Bevy), Godot HTML5 Export, asset acquisition, test case writing, and QA automation. Master directive (2026-02-06) - ONLY Rust+WASM or Godot allowed, JS/TS frameworks prohibited.
subagent-dev
Execute implementation plans using fresh subagents per task with two-stage review (spec compliance + code quality). Use when executing multi-task plans with independent work units. Enhances ralph-loop methodology.
systematic-debugging
Root-cause-first debugging methodology. Use when encountering any bug, test failure, or unexpected behavior BEFORE proposing fixes. Prevents random fix attempts that waste time and create new bugs.