PostgreSQL Optimization Workflow
SkillDatabases & dataThe postgresql-optimization skill is a PostgreSQL database optimization workflow for query tuning, indexing strategies, performance analysis, and production database management. It lets your agent tune PostgreSQL queries, plan indexes, and analyze database performance. Use it when you need help improving how a PostgreSQL database runs.
Use PostgreSQL Optimization Workflow in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add PostgreSQL Optimization Workflow and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the PostgreSQL Optimization Workflow skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have a PostgreSQL database you can connect to.
What your AI can do with it
- Tune PostgreSQL queries for better performance
- Plan indexing strategies for PostgreSQL tables
- Analyze PostgreSQL database performance
- Manage production PostgreSQL databases
Getting started
- Have a PostgreSQL database you can connect to.
- Add the postgresql-optimization skill to your agent.
- Give the agent access to your database connection details.
- Ask the agent to tune a query, plan an index, or analyze performance.
What this skill tells your AI
The instructions your AI receives, as published by davila7/claude-code-templates in cli-tool/components/skills/database/postgresql-optimization/SKILL.md and read by ahel’s review.
Overview
Specialized workflow for PostgreSQL database optimization including query tuning, indexing strategies, performance analysis, vacuum management, and production database administration.
When to Use This Workflow
Use this workflow when:
- Optimizing slow PostgreSQL queries
- Designing indexing strategies
- Analyzing database performance
- Tuning PostgreSQL configuration
- Managing production databases
Workflow Phases
Phase 1: Performance Assessment
Skills to Invoke
database-optimizer- Database optimizationpostgres-best-practices- PostgreSQL best practices
Actions
- Check database version
- Review configuration
- Analyze slow queries
- Check resource usage
- Identify bottlenecks
Copy-Paste Prompts
Use @database-optimizer to assess PostgreSQL performance
Phase 2: Query Analysis
Skills to Invoke
sql-optimization-patterns- SQL optimizationpostgres-best-practices- PostgreSQL patterns
Actions
- Run EXPLAIN ANALYZE
- Identify scan types
- Check join strategies
- Analyze execution time
- Find optimization opportunities
Copy-Paste Prompts
Use @sql-optimization-patterns to analyze and optimize queries
Phase 3: Indexing Strategy
Skills to Invoke
database-design- Index designpostgresql- PostgreSQL indexing
Actions
- Identify missing indexes
- Create B-tree indexes
- Add composite indexes
- Consider partial indexes
- Review index usage
Copy-Paste Prompts
Use @database-design to design PostgreSQL indexing strategy
Phase 4: Query Optimization
Skills to Invoke
sql-optimization-patterns- Query tuningsql-pro- SQL expertise
Actions
- Rewrite inefficient queries
- Optimize joins
- Add CTEs where helpful
- Implement pagination
- Test improvements
Copy-Paste Prompts
Use @sql-optimization-patterns to optimize SQL queries
Phase 5: Configuration Tuning
Skills to Invoke
postgres-best-practices- Configurationdatabase-admin- Database administration
Actions
- Tune shared_buffers
- Configure work_mem
- Set effective_cache_size
- Adjust checkpoint settings
- Configure autovacuum
Copy-Paste Prompts
Use @postgres-best-practices to tune PostgreSQL configuration
Phase 6: Maintenance
Skills to Invoke
database-admin- Database maintenancepostgresql- PostgreSQL maintenance
Actions
- Schedule VACUUM
- Run ANALYZE
- Check table bloat
- Monitor autovacuum
- Review statistics
Copy-Paste Prompts
Use @database-admin to schedule PostgreSQL maintenance
Phase 7: Monitoring
Skills to Invoke
grafana-dashboards- Monitoring dashboardsprometheus-configuration- Metrics collection
Actions
- Set up monitoring
- Create dashboards
- Configure alerts
- Track key metrics
- Review trends
Copy-Paste Prompts
Use @grafana-dashboards to create PostgreSQL monitoring
Optimization Checklist
- Slow queries identified
- Indexes optimized
- Configuration tuned
- Maintenance scheduled
- Monitoring active
- Performance improved
Quality Gates
- Query performance improved
- Indexes effective
- Configuration optimized
- Maintenance automated
- Monitoring in place
Related Workflow Bundles
database- Database operationscloud-devops- Infrastructureperformance-optimization- Performance
Signals
- GitHub stars
- 32k
- Forks
- 4k
- Last commit
- Oct 2026
Questions
- What is the postgresql claude skill?
- It is a skill that gives your agent a PostgreSQL database optimization workflow for query tuning, indexing strategies, performance analysis, and production database management.
- What can it do for my PostgreSQL database?
- It can tune queries, plan indexing strategies, analyze performance, and help manage production databases.
- Do I need a PostgreSQL database to use it?
- Yes, it works on PostgreSQL databases, so you need one to connect to.
- Does it support other database systems?
- No, it is specifically for PostgreSQL.
Advanced
- Item type
- skill
- Key
postgresql-optimization-davila7- Source
- github.com/davila7/claude-code-templates
github.com/davila7/claude-code-templates
Related picks
Skill · supabase
The pick for Postgressupabase
Skill · supabase
More in Databases & dataconnect
Skill · composiohq
More in Databases & dataanalytics
Skill · coreyhaines31
More in Databases & dataazure-kusto
Skill · microsoft
More in Databases & dataagentic-os
Skill · affaan-m
More in Databases & data