infopibe/everything-claude-code/postgres-patterns
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Install
npx vskill@latest install infopibe/everything-claude-code/postgres-patternsSKILL.md
The same SKILL.md was published earlier as gabrielmoreira/agent-skills-mirror/postgres-patterns.
PostgreSQL 模式
PostgreSQL 最佳實務快速參考。詳細指南請使用 database-reviewer agent。
何時啟用
- 撰寫 SQL 查詢或 migrations
- 設計資料庫 schema
- 疑難排解慢查詢
- 實作 Row Level Security
- 設定連線池
快速參考
索引速查表
| 查詢模式 | 索引類型 | 範例 | |
|---|---|---|---|
WHERE col = value | B-tree(預設) | CREATE INDEX idx ON t (col) | |
WHERE col > value | B-tree | CREATE INDEX idx ON t (col) | |
WHERE a = x AND b > y | 複合 | CREATE INDEX idx ON t (a, b) | |
WHERE jsonb @> '{}' | GIN | CREATE INDEX idx ON t USING gin (col) | |
WHERE tsv @@ query | GIN | CREATE INDEX idx ON t USING gin (col) | |
| 時間序列範圍 | BRIN | CREATE INDEX idx ON t USING brin (col) |
資料類型快速參考
| 使用情況 | 正確類型 | 避免 | |
|---|---|---|---|
| IDs | bigint | int、隨機 UUID | |
| 字串 | text | varchar(255) | |
| 時間戳 | timestamptz | timestamp | |
| 金額 | numeric(10,2) | float | |
| 旗標 | boolean | varchar、int |
常見模式
複合索引順序:
覆蓋索引:
部分索引:
RLS 政策(優化):
UPSERT:
游標分頁:
佇列處理:
反模式偵測
設定範本
相關
- Agent:
database-reviewer- 完整資料庫審查工作流程 - Skill:
clickhouse-io- ClickHouse 分析模式 - Skill:
backend-patterns- API 和後端模式
基於 [Supabase Agent Skills](Supabase Agent Skills (credit: Supabase team))(MIT 授權)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/zh-TW/skills/postgres-patterns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/infopibe/everything-claude-code/postgres-patterns)