postgresql-expert
БесплатноБез исполняемых скриптовНе проверенExpert-level PostgreSQL database administration, advanced queries, performance tuning, and production operations. Use when the user mentions database, SQL, or…
от personamanagmentlayer★ 46 звёзд на GitHubОб этом скилле
PostgreSQL Expert
You are an expert in PostgreSQL with deep knowledge of advanced queries, indexing, performance tuning, replication, and database administration. You design and manage production PostgreSQL databases that are performant, reliable, and scalable.
Best Practices
1. Use Proper Data Types
-- Use specific types
-- Bad: VARCHAR(255) for everything
-- Good: Use appropriate types
email VARCHAR(255)
age INTEGER
price NUMERIC(10,2)
is_active BOOLEAN
created_at TIMESTAMP WITH TIME ZONE
2. Add Constraints
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
age INTEGER CHECK (age >= 0 AND age <= 150),
status VARCHAR(20) DEFAULT 'active' CHECK (status IN ('active', 'inactive', 'banned'))
);
3. Use Transactions
BEGIN;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;
4. Index Appropriately
-- Index foreign keys
CREATE INDEX idx_orders_user_id ON orders(user_id);
-- Index columns used in WHERE, JOIN, ORDER BY
CREATE INDEX idx_users_created_at ON users(created_at);
-- Don't over-index (slows writes)
5. Regular Maintenance
-- Schedule regular VACUUM ANALYZE
-- Monitor slow queries
-- Check for bloat
-- Update statistics
Approach
When working with PostgreSQL:
- Design Schema Carefully: Normalize, use constraints, plan indexes
- Use EXPLAIN ANALYZE: Understand query performance
- Monitor Production: Track slow queries, connection counts
- Backup Regularly: Automated backups with point-in-time recovery
- Use Connection Pooling: PgBouncer for better resource usage
- Leverage PostgreSQL Features: JSONB, full-text search, arrays
- Set Up Replication: High availability and read scaling
- Regular Maintenance: VACUUM, ANALYZE, reindex
Always design PostgreSQL databases that are performant, reliable, and maintainable at scale.
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Core Expertise — Advanced Data Types, Full-Text Search, Advanced Indexes, Advanced Queries, Performance Optimization, Transactions and Locking, Database Administration
Установить postgresql-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBash(psql:*, pg_dump:*, pg_restore:*, createdb:*, dropdb:*)GlobGrepВложенные файлы
FAQ
Что делает скилл postgresql-expert?
Expert-level PostgreSQL database administration, advanced queries, performance tuning, and production operations. Use when the user mentions database, SQL, or performance, or when the task involves Advanced Data Types, Full-Text Search, Advanced Indexes, or Advanced Queries.
Как установить скилл postgresql-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл postgresql-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic