[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CC8H0TS2RJ240VT232K46T":3,"skill-same:01M7CC8H0TS2RJ240VT232K46T":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M7CC8H0TS2RJ240VT232K46T","postgres-pro",null,"Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fjeffallan-claude-skills\u002Fpostgres-pro\u002Fskills\u002Fpostgres-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: postgres-pro\ndescription: Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring.\nlicense: MIT\nmetadata:\n  author: https:\u002F\u002Fgithub.com\u002FJeffallan\n  version: \"1.1.0\"\n  domain: infrastructure\n  triggers: PostgreSQL, Postgres, EXPLAIN ANALYZE, pg_stat, JSONB, streaming replication, logical replication, VACUUM, PostGIS, pgvector\n  role: specialist\n  scope: implementation\n  output-format: code\n  related-skills: database-optimizer, devops-engineer, sre-engineer\n---\n\n# PostgreSQL Pro\n\nSenior PostgreSQL expert with deep expertise in database administration, performance optimization, and advanced PostgreSQL features.\n\n## When to Use This Skill\n\n- Analyzing and optimizing slow queries with EXPLAIN\n- Implementing JSONB storage and indexing strategies\n- Setting up streaming or logical replication\n- Configuring and using PostgreSQL extensions\n- Tuning VACUUM, ANALYZE, and autovacuum\n- Monitoring database health with pg_stat views\n- Designing indexes for optimal performance\n\n## Core Workflow\n\n1. **Analyze performance** — Run `EXPLAIN (ANALYZE, BUFFERS)` to identify bottlenecks\n2. **Design indexes** — Choose B-tree, GIN, GiST, or BRIN based on workload; verify with `EXPLAIN` before deploying\n3. **Optimize queries** — Rewrite inefficient queries, run `ANALYZE` to refresh statistics\n4. **Setup replication** — Streaming or logical based on requirements; monitor lag continuously\n5. **Monitor and maintain** — Track VACUUM, bloat, and autovacuum via `pg_stat` views; verify improvements after each change\n\n### End-to-End Example: Slow Query → Fix → Verification\n\n```sql\n-- Step 1: Identify slow queries\nSELECT query, mean_exec_time, calls\nFROM pg_stat_statements\nORDER BY mean_exec_time DESC\nLIMIT 10;\n\n-- Step 2: Analyze a specific slow query\nEXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)\nSELECT * FROM orders WHERE customer_id = 42 AND status = 'pending';\n-- Look for: Seq Scan (bad on large tables), high Buffers hit, nested loops on large sets\n\n-- Step 3: Create a targeted index\nCREATE INDEX CONCURRENTLY idx_orders_customer_status\n  ON orders (customer_id, status)\n  WHERE status = 'pending';  -- partial index reduces size\n\n-- Step 4: Verify the index is used\nEXPLAIN (ANALYZE, BUFFERS)\nSELECT * FROM orders WHERE customer_id = 42 AND status = 'pending';\n-- Confirm: Index Scan on idx_orders_customer_status, lower actual time\n\n-- Step 5: Update statistics if needed after bulk changes\nANALYZE orders;\n```\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Performance | `references\u002Fperformance.md` | EXPLAIN ANALYZE, indexes, statistics, query tuning |\n| JSONB | `references\u002Fjsonb.md` | JSONB operators, indexing, GIN indexes, containment |\n| Extensions | `references\u002Fextensions.md` | PostGIS, pg_trgm, pgvector, uuid-ossp, pg_stat_statements |\n| Replication | `references\u002Freplication.md` | Streaming replication, logical replication, failover |\n| Maintenance | `references\u002Fmaintenance.md` | VACUUM, ANALYZE, pg_stat views, monitoring, bloat |\n\n## Common Patterns\n\n### JSONB — GIN Index and Query\n\n```sql\n-- Create GIN index for containment queries\nCREATE INDEX idx_events_payload ON events USING GIN (payload);\n\n-- Efficient JSONB containment query (uses GIN index)\nSELECT * FROM events WHERE payload @> '{\"type\": \"login\", \"success\": true}';\n\n-- Extract nested value\nSELECT payload->>'user_id', payload->'meta'->>'ip'\nFROM events\nWHERE payload @> '{\"type\": \"login\"}';\n```\n\n### VACUUM and Bloat Monitoring\n\n```sql\n-- Check tables with high dead tuple counts\nSELECT relname, n_dead_tup, n_live_tup,\n       round(n_dead_tup::numeric \u002F NULLIF(n_live_tup + n_dead_tup, 0) * 100, 2) AS dead_pct,\n       last_autovacuum\nFROM pg_stat_user_tables\nORDER BY n_dead_tup DESC\nLIMIT 20;\n\n-- Manually vacuum a high-churn table and verify\nVACUUM (ANALYZE, VERBOSE) orders;\n```\n\n### Replication Lag Monitoring\n\n```sql\n-- On primary: check standby lag\nSELECT client_addr, state, sent_lsn, write_lsn, flush_lsn, replay_lsn,\n       (sent_lsn - replay_lsn) AS replication_lag_bytes\nFROM pg_stat_replication;\n```\n\n## Constraints\n\n### MUST DO\n- Use `EXPLAIN (ANALYZE, BUFFERS)` for query optimization\n- Verify indexes are actually used with `EXPLAIN` before and after creation\n- Use `CREATE INDEX CONCURRENTLY` to avoid table locks in production\n- Run `ANALYZE` after bulk data changes to refresh statistics\n- Monitor autovacuum; tune `autovacuum_vacuum_scale_factor` for high-churn tables\n- Use connection pooling (pgBouncer, pgPool)\n- Monitor replication lag via `pg_stat_replication`\n- Use prepared statements to prevent SQL injection\n- Use `uuid` type for UUIDs, not `text`\n\n### MUST NOT DO\n- Disable autovacuum globally\n- Create indexes without first analyzing query patterns\n- Use `SELECT *` in production queries\n- Ignore replication lag alerts\n- Skip VACUUM on high-churn tables\n- Store large BLOBs in the database (use object storage)\n- Deploy index changes without verifying the planner uses them\n\n## Output Templates\n\nWhen implementing PostgreSQL solutions, provide:\n1. Query with `EXPLAIN (ANALYZE, BUFFERS)` output and interpretation\n2. Index definitions with rationale and pre\u002Fpost verification\n3. Configuration changes with before\u002Fafter values\n4. Monitoring queries for ongoing health checks\n5. Brief explanation of performance impact\n\n## Knowledge Reference\n\nPostgreSQL 12-16, EXPLAIN ANALYZE, B-tree\u002FGIN\u002FGiST\u002FBRIN indexes, JSONB operators, streaming replication, logical replication, VACUUM\u002FANALYZE, pg_stat views, PostGIS, pgvector, pg_trgm, WAL archiving, PITR\n\n[Documentation](https:\u002F\u002Fjeffallan.github.io\u002Fclaude-skills\u002Fskills\u002Finfrastructure\u002Fpostgres-pro\u002F)\n","# PostgreSQL Pro\n\nSenior PostgreSQL expert with deep expertise in database administration, performance optimization, and advanced PostgreSQL features.\n\n## When to Use This Skill\n\n- Analyzing and optimizing slow queries with EXPLAIN\n- Implementing JSONB storage and indexing strategies\n- Setting up streaming or logical replication\n- Configuring and using PostgreSQL extensions\n- Tuning VACUUM, ANALYZE, and autovacuum\n- Monitoring database health with pg_stat views\n- Designing indexes for optimal performance\n\n## Core Workflow\n\n1. **Analyze performance** — Run `EXPLAIN (ANALYZE, BUFFERS)` to identify bottlenecks\n2. **Design indexes** — Choose B-tree, GIN, GiST, or BRIN based on workload; verify with `EXPLAIN` before deploying\n3. **Optimize queries** — Rewrite inefficient queries, run `ANALYZE` to refresh statistics\n4. **Setup replication** — Streaming or logical based on requirements; monitor lag continuously\n5. **Monitor and maintain** — Track VACUUM, bloat, and autovacuum via `pg_stat` views; verify improvements after each change\n\n### End-to-End Example: Slow Query → Fix → Verification\n\n```sql\n-- Step 1: Identify slow queries\nSELECT query, mean_exec_time, calls\nFROM pg_stat_statements\nORDER BY mean_exec_time DESC\nLIMIT 10;\n\n-- Step 2: Analyze a specific slow query\nEXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)\nSELECT * FROM orders WHERE customer_id = 42 AND status = 'pending';\n-- Look for: Seq Scan (bad on large tables), high Buffers hit, nested loops on large sets\n\n-- Step 3: Create a targeted index\nCREATE INDEX CONCURRENTLY idx_orders_customer_status\n  ON orders (customer_id, status)\n  WHERE status = 'pending';  -- partial index reduces size\n\n-- Step 4: Verify the index is used\nEXPLAIN (ANALYZE, BUFFERS)\nSELECT * FROM orders WHERE customer_id = 42 AND status = 'pending';\n-- Confirm: Index Scan on idx_orders_customer_status, lower actual time\n\n-- Step 5: Update statistics if needed after bulk changes\nANALYZE orders;\n```\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Performance | `references\u002Fperformance.md` | EXPLAIN ANALYZE, indexes, statistics, query tuning |\n| JSONB | `references\u002Fjsonb.md` | JSONB operators, indexing, GIN indexes, containment |\n| Extensions | `references\u002Fextensions.md` | PostGIS, pg_trgm, pgvector, uuid-ossp, pg_stat_statements |\n| Replication | `references\u002Freplication.md` | Streaming replication, logical replication, failover |\n| Maintenance | `references\u002Fmaintenance.md` | VACUUM, ANALYZE, pg_stat views, monitoring, bloat |\n\n## Common Patterns\n\n### JSONB — GIN Index and Query\n\n```sql\n-- Create GIN index for containment queries\nCREATE INDEX idx_events_payload ON events USING GIN (payload);\n\n-- Efficient JSONB containment query (uses GIN index)\nSELECT * FROM events WHERE payload @> '{\"type\": \"login\", \"success\": true}';\n\n-- Extract nested value\nSELECT payload->>'user_id', payload->'meta'->>'ip'\nFROM events\nWHERE payload @> '{\"type\": \"login\"}';\n```\n\n### VACUUM and Bloat Monitoring\n\n```sql\n-- Check tables with high dead tuple counts\nSELECT relname, n_dead_tup, n_live_tup,\n       round(n_dead_tup::numeric \u002F NULLIF(n_live_tup + n_dead_tup, 0) * 100, 2) AS dead_pct,\n       last_autovacuum\nFROM pg_stat_user_tables\nORDER BY n_dead_tup DESC\nLIMIT 20;\n\n-- Manually vacuum a high-churn table and verify\nVACUUM (ANALYZE, VERBOSE) orders;\n```\n\n### Replication Lag Monitoring\n\n```sql\n-- On primary: check standby lag\nSELECT client_addr, state, sent_lsn, write_lsn, flush_lsn, replay_lsn,\n       (sent_lsn - replay_lsn) AS replication_lag_bytes\nFROM pg_stat_replication;\n```\n\n## Constraints\n\n### MUST DO\n- Use `EXPLAIN (ANALYZE, BUFFERS)` for query optimization\n- Verify indexes are actually used with `EXPLAIN` before and after creation\n- Use `CREATE INDEX CONCURRENTLY` to avoid table locks in production\n- Run `ANALYZE` after bulk data changes to refresh statistics\n- Monitor autovacuum; tune `autovacuum_vacuum_scale_factor` for high-churn tables\n- Use connection pooling (pgBouncer, pgPool)\n- Monitor replication lag via `pg_stat_replication`\n- Use prepared statements to prevent SQL injection\n- Use `uuid` type for UUIDs, not `text`\n\n### MUST NOT DO\n- Disable autovacuum globally\n- Create indexes without first analyzing query patterns\n- Use `SELECT *` in production queries\n- Ignore replication lag alerts\n- Skip VACUUM on high-churn tables\n- Store large BLOBs in the database (use object storage)\n- Deploy index changes without verifying the planner uses them\n\n## Output Templates\n\nWhen implementing PostgreSQL solutions, provide:\n1. Query with `EXPLAIN (ANALYZE, BUFFERS)` output and interpretation\n2. Index definitions with rationale and pre\u002Fpost verification\n3. Configuration changes with before\u002Fafter values\n4. Monitoring queries for ongoing health checks\n5. Brief explanation of performance impact\n\n## Knowledge Reference\n\nPostgreSQL 12-16, EXPLAIN ANALYZE, B-tree\u002FGIN\u002FGiST\u002FBRIN indexes, JSONB operators, streaming replication, logical replication, VACUUM\u002FANALYZE, pg_stat views, PostGIS, pgvector, pg_trgm, WAL archiving, PITR\n\n[Documentation](https:\u002F\u002Fjeffallan.github.io\u002Fclaude-skills\u002Fskills\u002Finfrastructure\u002Fpostgres-pro\u002F)\n",{"name":5,"license":15,"metadata":24,"description":7},{"role":25,"scope":26,"author":27,"domain":28,"version":29,"triggers":30,"output-format":31,"related-skills":32},"specialist","implementation","https:\u002F\u002Fgithub.com\u002FJeffallan","infrastructure","1.1.0","PostgreSQL, Postgres, EXPLAIN ANALYZE, pg_stat, JSONB, streaming replication, logical replication, VACUUM, PostGIS, pgvector","code","database-optimizer, devops-engineer, sre-engineer","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fjeffallan-claude-skills\u002Fpostgres-pro\u002Fskills\u002Fpostgres-pro",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill postgres-pro",{"tool":47,"command":48},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill postgres-pro",{"tool":50,"command":51},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill postgres-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fjeffallan-claude-skills\u002Fpostgres-pro\u002Fskills\u002Fpostgres-pro\u002FSKILL.md",true,[],[56,63,68,75,80,87],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":64,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":76,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":88,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]