Essential PostgreSQL extensions - pg_stat_statements, pg_trgm, PostGIS
Installs and configures essential PostgreSQL extensions (pg_stat_statements, pg_trgm, PostGIS) for query analysis, fuzzy search, and geospatial data. Use when you need to enable these extensions or query their capabilities.
/plugin marketplace add pluginagentmarketplace/custom-plugin-postgresql/plugin install ultrathink@pluginagentmarketplace-postgresqlThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/extensions-list.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyAtomic skill for essential extensions
Production-ready patterns for installing and using key PostgreSQL extensions.
parameters:
operation:
type: string
required: true
enum: [install, configure, use]
extension:
type: string
enum: [pg_stat_statements, pg_trgm, uuid_ossp, hstore, postgis]
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS uuid_ossp;
CREATE EXTENSION IF NOT EXISTS hstore;
-- Check installed
SELECT extname, extversion FROM pg_extension;
-- Top queries
SELECT query, calls, mean_exec_time
FROM pg_stat_statements
ORDER BY total_exec_time DESC LIMIT 10;
-- Reset stats
SELECT pg_stat_statements_reset();
-- Similarity search
SELECT name, similarity(name, 'postgresql') as sim
FROM products WHERE name % 'postgresql';
-- Create trigram index
CREATE INDEX idx_trgm ON products USING GIN (name gin_trgm_ops);
SELECT uuid_generate_v4();
SELECT 'key=>value'::hstore;
SELECT data->'key' FROM table_with_hstore;
| Extension | Use Case |
|---|---|
| pg_stat_statements | Query analysis |
| pg_trgm | Fuzzy text search |
| uuid-ossp | UUID generation |
| hstore | Key-value pairs |
| postgis | Geospatial data |
| pgcrypto | Encryption |
| Problem | Cause | Solution |
|---|---|---|
| Extension not found | Not installed | apt install postgresql-16-* |
| Permission denied | Not superuser | GRANT CREATE ON DATABASE |
| Version mismatch | Old extension | ALTER EXTENSION ... UPDATE |
Skill("postgresql-extensions")
Use 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.