Community程式設計與開發github.com

github/postgresql-optimization

專注於 PostgreSQL 特有功能、進階資料型別及獨家能力的開發助手。涵蓋 JSONB 操作、陣列型別、自訂型別、範圍/幾何型別、全文檢索、視窗函數及 PostgreSQL 擴充套件生態系統。

postgresql-optimization 是什麼?

此技能專為 PostgreSQL 開發者設計,協助他們有效運用 PostgreSQL 特有的強大功能。它涵蓋了 JSONB 的高效操作、陣列型別與自訂型別的靈活定義、範圍型別與幾何型別的空間與時間資料處理、全文檢索的實作,以及視窗函數的進階分析查詢。此外,技能還深入介紹了 PostgreSQL 擴充套件生態系統,例如 `pgcrypto`、`PostGIS` 等,幫助開發者擴充資料庫功能。支援平台包括 Claude Code、Cursor、Codex 等 AI 代理工具,透過詳細的 Markdown 文件與範例程式碼,提供即時、準確的 PostgreSQL 開發指導,顯著提升開發效率與資料庫設計品質。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/github/awesome-copilot/tree/main/skills/postgresql-optimization

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

postgresql-optimization 是做什麼的?

專注於 PostgreSQL 特有功能、進階資料型別及獨家能力的開發助手。涵蓋 JSONB 操作、陣列型別、自訂型別、範圍/幾何型別、全文檢索、視窗函數及 PostgreSQL 擴充套件生態系統。

概述

此技能專為 PostgreSQL 開發者設計,協助他們有效運用 PostgreSQL 特有的強大功能。它涵蓋了 JSONB 的高效操作、陣列型別與自訂型別的靈活定義、範圍型別與幾何型別的空間與時間資料處理、全文檢索的實作,以及視窗函數的進階分析查詢。此外,技能還深入介紹了 PostgreSQL 擴充套件生態系統,例如 pgcrypto、PostGIS 等,幫助開發者擴充資料庫功能。支援平台包括 Claude Code、Cursor、Codex 等 AI 代理工具,透過詳細的 Markdown 文件與範例程式碼,提供即時、準確的 PostgreSQL 開發指導,顯著提升開發效率與資料庫設計品質。

核心功能

  • JSONB 操作:提供高效的 JSON 資料查詢與索引技巧,包括 ->, ->>, @>, ? 等運算子。
  • 陣列型別:支援陣列建立、元素存取、陣列函數如 unnest() 與 array_agg()。
  • 自訂型別:使用 CREATE TYPE 定義複合型別、列舉型別與範圍型別。
  • 範圍型別:處理日期、時間與數值範圍,使用 @>, &&, << 等運算子。
  • 幾何型別:支援點、線、多邊形等幾何資料,搭配 ST_* 函數(需擴充套件 PostGIS)。
  • 全文檢索:建立 tsvector 與 tsquery,使用 @@ 運算子進行高效文字搜尋。
  • 視窗函數:應用 ROW_NUMBER(), RANK(), LAG(), LEAD() 等進行分析查詢。
  • 擴充套件生態系統:列出常見擴充套件如 pgcrypto、hstore、pg_stat_statements,並提供安裝與使用範例。

使用方式

在支援的 AI 代理工具中,直接詢問 PostgreSQL 相關問題,技能將根據 SKILL.md 文件提供最佳實踐與程式碼範例。例如:

  • 「如何在 PostgreSQL 中使用 JSONB 進行高效查詢?」
  • 「示範一個使用視窗函數計算累計總和的範例。」
  • 「列出常用的 PostgreSQL 擴充套件及其用途。」

範例

JSONB 操作

SELECT id, data->'name' AS name
FROM users
WHERE data @> '{"age": 30}';

全文檢索

SELECT title, ts_rank(body_tsv, query) AS rank
FROM articles, to_tsquery('english', 'postgreSQL & optimization') AS query
WHERE body_tsv @@ query
ORDER BY rank DESC;

視窗函數

SELECT
  department,
  employee_name,
  salary,
  RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS salary_rank
FROM employees;

資源


此技能文件會持續更新以反映最新的 PostgreSQL 功能和最佳實踐。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

github/acquire-codebase-knowledge

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

github/add-educational-comments

Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.

github/agent-governance

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

github/agentic-eval

Patterns and techniques for evaluating and improving AI agent outputs. Use this skill when: - Implementing self-critique and reflection loops - Building evaluator-optimizer pipelines for quality-critical generation - Creating test-driven code refinement workflows - Designing rubric-based or LLM-as-judge evaluation systems - Adding iterative improvement to agent outputs (code, reports, analysis) - Measuring and improving agent response quality

github/agent-owasp-compliance

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

github/ai-prompt-engineering-safety-review

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations with extensive frameworks, testing methodologies, and educational content.

github/appinsights-instrumentation

Instrument a webapp to send useful telemetry data to Azure App Insights

github/apple-appstore-reviewer

Serves as a reviewer of the codebase with instructions on looking for Apple App Store optimizations or rejection reasons.

github/architecture-blueprint-generator

Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.

github/arch-linux-triage

Triage and resolve Arch Linux issues with pacman, systemd, and rolling-release best practices.

github/arize-ai-provider-integration

Creates, reads, updates, and deletes Arize AI integrations that store LLM provider credentials used by evaluators and other Arize features. Supports any LLM provider (e.g. OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Vertex AI, Gemini, NVIDIA NIM). Use when the user mentions AI integration, LLM provider credentials, create integration, list integrations, update credentials, delete integration, or connecting an LLM provider to Arize.

github/arize-annotation

Creates and manages annotation configs (categorical, continuous, freeform label schemas) and annotation queues (human review workflows) on Arize. Applies human annotations to project spans via the Python SDK. Use when the user mentions annotation config, annotation queue, label schema, human feedback, bulk annotate spans, update_annotations, labeling queue, annotate record, or human review.

github/arize-dataset

Creates, manages, and queries Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI. Use when the user needs test data, evaluation examples, or mentions create dataset, list datasets, export dataset, append examples, dataset version, golden dataset, or test set.

github/arize-evaluator

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

github/arize-experiment

Creates, runs, and analyzes Arize experiments for evaluating and comparing model performance. Covers experiment CRUD, exporting runs, comparing results, and evaluation workflows using the ax CLI. Use when the user mentions create experiment, run experiment, compare models, model performance, evaluate AI, experiment results, benchmark, A/B test models, or measure accuracy.

github/arize-instrumentation

Adds Arize AX tracing to an LLM application for the first time. Follows a two-phase agent-assisted flow to analyze the codebase then implement instrumentation after user confirmation. Use when the user wants to instrument their app, add tracing from scratch, set up LLM observability, integrate OpenTelemetry or openinference, or get started with Arize tracing.

github/arize-link

Generates deep links to the Arize UI for traces, spans, sessions, datasets, labeling queues, evaluators, and annotation configs. Produces clickable URLs for sharing Arize resources with team members. Use when the user wants to link to or open a trace, span, session, dataset, evaluator, or annotation config in the Arize UI.

github/arize-prompt-optimization

Optimizes, improves, and debugs LLM prompts using production trace data, evaluations, and annotations. Extracts prompts from spans, gathers performance signal, and runs a data-driven optimization loop using the ax CLI. Use when the user mentions optimize prompt, improve prompt, make AI respond better, improve output quality, prompt engineering, prompt tuning, or system prompt improvement.

github/arize-trace

Downloads, exports, and inspects existing Arize traces and spans to understand what an LLM app is doing or debug runtime issues. Covers exporting traces by ID, spans by ID, sessions by ID, and root-cause investigation using the ax CLI. Use when the user wants to look at existing trace data, see what their LLM app is doing, export traces, download spans, investigate errors, or analyze behavior regressions.

github/aspire

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

相關技能