[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G26P6WJBPRRGBXV6KJ2S1G":3,"skill-same:01M6G26P6WJBPRRGBXV6KJ2S1G":62},{"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":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6G26P6WJBPRRGBXV6KJ2S1G","postgres-patterns",null,"PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.","oabdelmaksoud\u002FAgention","oabdelmaksoud","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F50699149?v=4","01M6D5CVVN778ZCDP1WHS816SP","Omar Abdelmaksoud","01M6D8A4TE76V3DCSH3D94VG1V",2,"MIT","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fdocs\u002Fja-JP\u002Fskills\u002Fpostgres-patterns\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"postgres patterns","postgres","patterns","design","security","best practices","database","postgresql","supabase","Optimization","schema","query optimization","schema design","query","indexing","2026-11-10 10:12:30",false,"---\nname: postgres-patterns\ndescription: PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.\n---\n\n# PostgreSQL パターン\n\nPostgreSQLベストプラクティスのクイックリファレンス。詳細なガイダンスについては、`database-reviewer` エージェントを使用してください。\n\n## 起動タイミング\n\n- SQLクエリまたはマイグレーションの作成時\n- データベーススキーマの設計時\n- 低速クエリのトラブルシューティング時\n- Row Level Securityの実装時\n- コネクションプーリングの設定時\n\n## クイックリファレンス\n\n### インデックスチートシート\n\n| クエリパターン | インデックスタイプ | 例 |\n|--------------|------------|---------|\n| `WHERE col = value` | B-tree（デフォルト） | `CREATE INDEX idx ON t (col)` |\n| `WHERE col > value` | B-tree | `CREATE INDEX idx ON t (col)` |\n| `WHERE a = x AND b > y` | 複合 | `CREATE INDEX idx ON t (a, b)` |\n| `WHERE jsonb @> '{}'` | GIN | `CREATE INDEX idx ON t USING gin (col)` |\n| `WHERE tsv @@ query` | GIN | `CREATE INDEX idx ON t USING gin (col)` |\n| 時系列範囲 | BRIN | `CREATE INDEX idx ON t USING brin (col)` |\n\n### データタイプクイックリファレンス\n\n| 用途 | 正しいタイプ | 避けるべき |\n|----------|-------------|-------|\n| ID | `bigint` | `int`、ランダムUUID |\n| 文字列 | `text` | `varchar(255)` |\n| タイムスタンプ | `timestamptz` | `timestamp` |\n| 金額 | `numeric(10,2)` | `float` |\n| フラグ | `boolean` | `varchar`、`int` |\n\n### 一般的なパターン\n\n**複合インデックスの順序:**\n```sql\n-- 等価列を最初に、次に範囲列\nCREATE INDEX idx ON orders (status, created_at);\n-- 次の場合に機能: WHERE status = 'pending' AND created_at > '2024-01-01'\n```\n\n**カバリングインデックス:**\n```sql\nCREATE INDEX idx ON users (email) INCLUDE (name, created_at);\n-- SELECT email, name, created_at のテーブル検索を回避\n```\n\n**部分インデックス:**\n```sql\nCREATE INDEX idx ON users (email) WHERE deleted_at IS NULL;\n-- より小さなインデックス、アクティブユーザーのみを含む\n```\n\n**RLSポリシー（最適化）:**\n```sql\nCREATE POLICY policy ON orders\n  USING ((SELECT auth.uid()) = user_id);  -- SELECTでラップ！\n```\n\n**UPSERT:**\n```sql\nINSERT INTO settings (user_id, key, value)\nVALUES (123, 'theme', 'dark')\nON CONFLICT (user_id, key)\nDO UPDATE SET value = EXCLUDED.value;\n```\n\n**カーソルページネーション:**\n```sql\nSELECT * FROM products WHERE id > $last_id ORDER BY id LIMIT 20;\n-- O(1) vs OFFSET は O(n)\n```\n\n**キュー処理:**\n```sql\nUPDATE jobs SET status = 'processing'\nWHERE id = (\n  SELECT id FROM jobs WHERE status = 'pending'\n  ORDER BY created_at LIMIT 1\n  FOR UPDATE SKIP LOCKED\n) RETURNING *;\n```\n\n### アンチパターン検出\n\n```sql\n-- インデックスのない外部キーを検索\nSELECT conrelid::regclass, a.attname\nFROM pg_constraint c\nJOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = ANY(c.conkey)\nWHERE c.contype = 'f'\n  AND NOT EXISTS (\n    SELECT 1 FROM pg_index i\n    WHERE i.indrelid = c.conrelid AND a.attnum = ANY(i.indkey)\n  );\n\n-- 低速クエリを検索\nSELECT query, mean_exec_time, calls\nFROM pg_stat_statements\nWHERE mean_exec_time > 100\nORDER BY mean_exec_time DESC;\n\n-- テーブル肥大化をチェック\nSELECT relname, n_dead_tup, last_vacuum\nFROM pg_stat_user_tables\nWHERE n_dead_tup > 1000\nORDER BY n_dead_tup DESC;\n```\n\n### 設定テンプレート\n\n```sql\n-- 接続制限（RAMに応じて調整）\nALTER SYSTEM SET max_connections = 100;\nALTER SYSTEM SET work_mem = '8MB';\n\n-- タイムアウト\nALTER SYSTEM SET idle_in_transaction_session_timeout = '30s';\nALTER SYSTEM SET statement_timeout = '30s';\n\n-- モニタリング\nCREATE EXTENSION IF NOT EXISTS pg_stat_statements;\n\n-- セキュリティデフォルト\nREVOKE ALL ON SCHEMA public FROM public;\n\nSELECT pg_reload_conf();\n```\n\n## 関連\n\n- Agent: `database-reviewer` - 完全なデータベースレビューワークフロー\n- Skill: `clickhouse-io` - ClickHouse分析パターン\n- Skill: `backend-patterns` - APIとバックエンドパターン\n\n---\n\n*[Supabase Agent Skills](Supabase Agent Skills (credit: Supabase team))（MITライセンス）に基づく*\n","# PostgreSQL パターン\n\nPostgreSQLベストプラクティスのクイックリファレンス。詳細なガイダンスについては、`database-reviewer` エージェントを使用してください。\n\n## 起動タイミング\n\n- SQLクエリまたはマイグレーションの作成時\n- データベーススキーマの設計時\n- 低速クエリのトラブルシューティング時\n- Row Level Securityの実装時\n- コネクションプーリングの設定時\n\n## クイックリファレンス\n\n### インデックスチートシート\n\n| クエリパターン | インデックスタイプ | 例 |\n|--------------|------------|---------|\n| `WHERE col = value` | B-tree（デフォルト） | `CREATE INDEX idx ON t (col)` |\n| `WHERE col > value` | B-tree | `CREATE INDEX idx ON t (col)` |\n| `WHERE a = x AND b > y` | 複合 | `CREATE INDEX idx ON t (a, b)` |\n| `WHERE jsonb @> '{}'` | GIN | `CREATE INDEX idx ON t USING gin (col)` |\n| `WHERE tsv @@ query` | GIN | `CREATE INDEX idx ON t USING gin (col)` |\n| 時系列範囲 | BRIN | `CREATE INDEX idx ON t USING brin (col)` |\n\n### データタイプクイックリファレンス\n\n| 用途 | 正しいタイプ | 避けるべき |\n|----------|-------------|-------|\n| ID | `bigint` | `int`、ランダムUUID |\n| 文字列 | `text` | `varchar(255)` |\n| タイムスタンプ | `timestamptz` | `timestamp` |\n| 金額 | `numeric(10,2)` | `float` |\n| フラグ | `boolean` | `varchar`、`int` |\n\n### 一般的なパターン\n\n**複合インデックスの順序:**\n```sql\n-- 等価列を最初に、次に範囲列\nCREATE INDEX idx ON orders (status, created_at);\n-- 次の場合に機能: WHERE status = 'pending' AND created_at > '2024-01-01'\n```\n\n**カバリングインデックス:**\n```sql\nCREATE INDEX idx ON users (email) INCLUDE (name, created_at);\n-- SELECT email, name, created_at のテーブル検索を回避\n```\n\n**部分インデックス:**\n```sql\nCREATE INDEX idx ON users (email) WHERE deleted_at IS NULL;\n-- より小さなインデックス、アクティブユーザーのみを含む\n```\n\n**RLSポリシー（最適化）:**\n```sql\nCREATE POLICY policy ON orders\n  USING ((SELECT auth.uid()) = user_id);  -- SELECTでラップ！\n```\n\n**UPSERT:**\n```sql\nINSERT INTO settings (user_id, key, value)\nVALUES (123, 'theme', 'dark')\nON CONFLICT (user_id, key)\nDO UPDATE SET value = EXCLUDED.value;\n```\n\n**カーソルページネーション:**\n```sql\nSELECT * FROM products WHERE id > $last_id ORDER BY id LIMIT 20;\n-- O(1) vs OFFSET は O(n)\n```\n\n**キュー処理:**\n```sql\nUPDATE jobs SET status = 'processing'\nWHERE id = (\n  SELECT id FROM jobs WHERE status = 'pending'\n  ORDER BY created_at LIMIT 1\n  FOR UPDATE SKIP LOCKED\n) RETURNING *;\n```\n\n### アンチパターン検出\n\n```sql\n-- インデックスのない外部キーを検索\nSELECT conrelid::regclass, a.attname\nFROM pg_constraint c\nJOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = ANY(c.conkey)\nWHERE c.contype = 'f'\n  AND NOT EXISTS (\n    SELECT 1 FROM pg_index i\n    WHERE i.indrelid = c.conrelid AND a.attnum = ANY(i.indkey)\n  );\n\n-- 低速クエリを検索\nSELECT query, mean_exec_time, calls\nFROM pg_stat_statements\nWHERE mean_exec_time > 100\nORDER BY mean_exec_time DESC;\n\n-- テーブル肥大化をチェック\nSELECT relname, n_dead_tup, last_vacuum\nFROM pg_stat_user_tables\nWHERE n_dead_tup > 1000\nORDER BY n_dead_tup DESC;\n```\n\n### 設定テンプレート\n\n```sql\n-- 接続制限（RAMに応じて調整）\nALTER SYSTEM SET max_connections = 100;\nALTER SYSTEM SET work_mem = '8MB';\n\n-- タイムアウト\nALTER SYSTEM SET idle_in_transaction_session_timeout = '30s';\nALTER SYSTEM SET statement_timeout = '30s';\n\n-- モニタリング\nCREATE EXTENSION IF NOT EXISTS pg_stat_statements;\n\n-- セキュリティデフォルト\nREVOKE ALL ON SCHEMA public FROM public;\n\nSELECT pg_reload_conf();\n```\n\n## 関連\n\n- Agent: `database-reviewer` - 完全なデータベースレビューワークフロー\n- Skill: `clickhouse-io` - ClickHouse分析パターン\n- Skill: `backend-patterns` - APIとバックエンドパターン\n\n---\n\n*[Supabase Agent Skills](Supabase Agent Skills (credit: Supabase team))（MITライセンス）に基づく*\n",{"name":5,"description":7},"main","a318f48de3c5718e8ea2e9f6fae7790e8a759e85","upstream-sync\u002Fwork\u002Fecc\u002Fdocs\u002Fja-JP\u002Fskills\u002Fpostgres-patterns",0,"https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fo-abdelmaksoud\u002F","Full-Stack Engineer | AI Systems Architect | Building autonomous multi-agent systems","2026-03-08 21:23:03",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add oabdelmaksoud\u002FAgention --skill postgres-patterns",{"tool":54,"command":55},"bunx","bunx skills add oabdelmaksoud\u002FAgention --skill postgres-patterns",{"tool":57,"command":58},"pnpm","pnpm dlx skills add oabdelmaksoud\u002FAgention --skill postgres-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fdocs\u002Fja-JP\u002Fskills\u002Fpostgres-patterns\u002FSKILL.md",true,[],[63,87,101,134,157,177],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":74,"publishedAt":34},"01M6G2QFCBNBYAJF2KTK85G9A6","visa-doc-translate","Translate visa application documents (images) to English and create a bilingual PDF with original and translation","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Fvisa-doc-translate\u002FSKILL.md",[69],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[75,76,77,78,79,80,81,82,83,84,85,86],"translate","doc","visa doc translate","bilingual","with","english","application","PDF","translation","documents","create","images",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":34},"01M6G2QB09TSK6BY4ME5X20EVQ","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[94,95,96,97,98,99,100],"verification","loop","verification loop","sessions","code","claude code sessions","system",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":118,"publishedAt":34},"01M6G2Q6V2F7G03VAAF27FXPJR","tdd-workflow","Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Ftdd-workflow\u002FSKILL.md",[107,110,113],{"categoryNo":108,"categoryName":109,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":111,"categoryName":112,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":114,"categoryName":115,"taxonomyType":116,"taxonomyTypeDesc":117},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[119,120,121,122,123,124,125,126,127,98,128,129,130,131,79,132,133],"workflow","tdd","tdd workflow","use","unit","coverage","refactoring","e2e","integration","development","e2e tests","tests","driven","test","writing",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":34},"01M6G2Q359YJRWAR2PFCEQAXF3","swiftui-patterns","SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS\u002FmacOS UI best practices.","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Fswiftui-patterns\u002FSKILL.md",[],[21,141,142,143,144,145,146,24,147,148,28,149,150,151,152,153,154,155,156,79],"swiftui","swiftui patterns","architecture","macos","performance","state management","state","ui","ios","architecture patterns","Composition","performance optimization","view","management","swiftui architecture","navigation",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":164,"publishedAt":34},"01M6G2PY8B2FWZTWPZ84H83Y7C","swift-protocol-di-testing","Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Fswift-protocol-di-testing\u002FSKILL.md",[163],{"categoryNo":108,"categoryName":109,"taxonomyType":72,"taxonomyTypeDesc":73},[165,166,167,168,98,169,170,171,172,100,173,174,175,176],"swift protocol di testing","protocol","swift","testing","protocols","file","network","injection","dependency","swift testing","dependency injection","mock",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":34},"01M6G2PSCN2GXV9FFZDRRRWVB6","swift-concurrency-6-2","Swift 6.2 Approachable Concurrency — single-threaded by default, @concurrent for explicit background offloading, isolated conformances for main actor types.","https:\u002F\u002Fgithub.com\u002Foabdelmaksoud\u002FAgention\u002Fblob\u002Fmain\u002Fupstream-sync\u002Fwork\u002Fecc\u002Fskills\u002Fswift-concurrency-6-2\u002FSKILL.md",[],[184,185,186,167,187,39,188],"concurrency","swift concurrency","swift concurrency 6 2","default","types"]