Token导航 LogoToken导航

Agent Skill · 前端设计

postgresql(PostgreSQL 数据库)

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

postgresql 是前端设计类 Agent Skill,可用宿主为 Local Agent,通过unknown获取,权限为需要联网;许可证信息还不明确,暂无第三方扫描结果,按安装量在前端设计类的 10,216 个 Skill 里排第 7,824。

总安装 339周安装 14下载 111核验 2026-05-01
前端设计需要联网unknown未标认证来源可访问许可证需确认审计未展示Local Agent

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:postgresql(PostgreSQL 数据库)
来源仓库:https://smithery.ai
仓库路径:postgresql
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助数据库表结构和查询语句处理。适合分析 schema、编写 SQL 或排查查询问题。使用时需明确数据库类型和连接环境。postgresql 属于前端设计类 Skill,可作为该场景下的辅助能力补充。涉及删除、更新或迁移时应优先 dry-run 或备份。区分只读分析与写入变更,避免误操作。

来源仓库内路径:postgresql

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Local Agent;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    没有现成安装命令,按unknown的说明从来源页面获取,仓库路径是 postgresql。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

postgresql 怎么安装?

公开资料没有给出可以直接复制的命令,需要按来源页面说明手动安装,仓库内路径为 postgresql。

postgresql 支持哪些 AI 工具?

公开资料标注支持 Local Agent。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

postgresql 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

postgresql 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

postgresql 用的人多吗?

公开数据是累计安装 339 次,近一周安装 14 次,下载 111 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

postgresql 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 Local Agent 一种宿主,触发方式和使用习惯不用来回切换。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Local Agent,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
postgresql

PostgreSQL 数据库 · 本页

339—需要联网未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PostgreSQL Skill

Comprehensive PostgreSQL 18 documentation covering SQL syntax, database administration, PL/pgSQL programming, and development best practices. Generated from official PostgreSQL documentation.

When to Use This Skill

This skill should be activated when:

Database Design & Schema

  • Creating tables, views, indexes, and constraints
  • Designing foreign key relationships
  • Implementing table inheritance
  • Planning database architecture

SQL Queries

  • Writing SELECT, INSERT, UPDATE, DELETE statements
  • Performing JOIN operations (INNER, LEFT OUTER, RIGHT OUTER, FULL)
  • Using aggregate functions and GROUP BY
  • Building complex queries with subqueries and CTEs

Transactions & Data Integrity

  • Managing transactions with BEGIN, COMMIT, ROLLBACK
  • Implementing savepoints for partial rollbacks
  • Understanding ACID properties
  • Handling concurrent access

PL/pgSQL Programming

  • Creating stored functions and procedures
  • Writing triggers
  • Implementing complex business logic in the database
  • Performance optimization through server-side computation

Administration

  • Installing and configuring PostgreSQL
  • Running regression tests
  • Managing users, roles, and permissions
  • Backup and recovery operations
  • Understanding Write-Ahead Logging (WAL)

Key Concepts

ACID Properties

PostgreSQL is fully ACID-compliant:

  • Atomicity: Transactions are all-or-nothing operations
  • Consistency: Database moves from one valid state to another
  • Isolation: Concurrent transactions don't see each other's incomplete changes
  • Durability: Committed transactions survive system failures via WAL

Write-Ahead Logging (WAL)

Changes are logged before being applied to data files. This enables:

  • Crash recovery without data loss
  • Point-in-time recovery
  • Online backup and replication
  • Reduced disk I/O (sequential log writes vs. random data page writes)

PL/pgSQL Advantages

Server-side procedural language that:

  • Eliminates client/server round trips
  • Avoids transferring intermediate results
  • Reduces query parsing overhead
  • Can use all SQL data types and functions

Quick Reference

Creating Tables

Basic table creation (from official docs):

CREATE TABLE my_first_table (
    first_column text,
    second_column integer
);

Table with foreign key constraint (from official docs):

CREATE TABLE cities (
    name     varchar(80) PRIMARY KEY,
    location point
);

CREATE TABLE weather (
    city      varchar(80) REFERENCES cities(name),
    temp_lo   int,
    temp_hi   int,
    prcp      real,
    date      date
);

Table inheritance (from official docs):

CREATE TABLE cities (
    name       text,
    population real,
    elevation  int     -- (in ft)
);

CREATE TABLE capitals (
    state      char(2) UNIQUE NOT NULL
) INHERITS (cities);

Querying Data

Basic SELECT (from official docs):

SELECT * FROM weather;

SELECT city, temp_lo, temp_hi, prcp, date FROM weather;

Computed columns with aliases (from official docs):

SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, date FROM weather;

JOIN operations (from official docs):

-- Inner join
SELECT * FROM weather JOIN cities ON city = name;

-- Explicit column selection with qualified names
SELECT weather.city, weather.temp_lo, weather.temp_hi,
       weather.prcp, weather.date, cities.location
    FROM weather JOIN cities ON weather.city = cities.name;

Creating Views

Encapsulate complex queries (from official docs):

CREATE VIEW myview AS
    SELECT name, temp_lo, temp_hi, prcp, date, location
        FROM weather, cities
        WHERE city = name;

SELECT * FROM myview;

Creating Indexes

Basic index creation (from official docs):

CREATE TABLE test1 (
    id integer,
    content varchar
);

CREATE INDEX test1_id_index ON test1 (id);

Modifying Data

UPDATE statement (from official docs):

UPDATE weather
    SET temp_hi = temp_hi - 2,  temp_lo = temp_lo - 2
    WHERE date > '1994-11-28';

INSERT statement (from official docs):

INSERT INTO weather VALUES ('Berkeley', 45, 53, 0.0, '1994-11-28');

Transactions

Basic transaction block (from official docs):

BEGIN;
UPDATE accounts SET balance = balance - 100.00
    WHERE name = 'Alice';
-- ... more operations ...
COMMIT;

Using savepoints (from official docs):

BEGIN;
UPDATE accounts SET balance = balance - 100.00
    WHERE name = 'Alice';
SAVEPOINT my_savepoint;
UPDATE accounts SET balance = balance + 100.00
    WHERE name = 'Bob';
-- oops ... forget that and use Wally's account
ROLLBACK TO my_savepoint;
UPDATE accounts SET balance = balance + 100.00
    WHERE name = 'Wally';
COMMIT;

Embedded SQL (ECPG)

Prepared statements in C (from official docs):

EXEC SQL BEGIN DECLARE SECTION;
const char *stmt = "INSERT INTO test1 VALUES(?, ?);";
EXEC SQL END DECLARE SECTION;

EXEC SQL PREPARE mystmt FROM :stmt;
EXEC SQL EXECUTE mystmt USING 42, 'foobar';

Database Administration

Creating a database (from official docs):

$ createdb mydb

Removing a database (from official docs):

$ dropdb mydb

Setting up shared libraries (from official docs):

LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH

Running Tests

Parallel regression tests (from official docs):

make check        # Against temporary installation
make installcheck # Against running server
make check-world  # All test suites

Reference Files

This skill includes comprehensive documentation in references/:

getting_started.md

Source: Official PostgreSQL 18 Documentation Confidence: Medium Pages: 46 Content:

  • Installation requirements and procedures
  • Creating databases and connecting
  • SQL tutorial (tables, queries, joins)
  • Transactions and savepoints
  • Views, foreign keys, inheritance
  • Running regression tests

sql.md

Source: Official PostgreSQL 18 Documentation Confidence: Medium Pages: 1088 Content:

  • Complete SQL command reference
  • PL/pgSQL procedural language
  • User-defined functions and procedures
  • Security labels and permissions
  • Dynamic SQL with ECPG
  • Information schema details

index.md

Source: Official PostgreSQL 18 Documentation Confidence: Medium Content:

  • Documentation category index
  • Navigation guide to reference files

Working with This Skill

For Beginners

  1. Start with references/getting_started.md for installation and basic SQL
  2. Follow the tutorial sections (Chapter 2: SQL Language, Chapter 3: Advanced Features)
  3. Practice with the weather/cities example tables from the docs
  4. Learn transaction basics with BEGIN/COMMIT/ROLLBACK

For Intermediate Users

  1. Explore references/sql.md for complete SQL command syntax
  2. Study PL/pgSQL for server-side programming (Section 41)
  3. Learn about indexes and query optimization (Chapter 11)
  4. Understand views and foreign keys for better schema design

For Advanced Users

  1. Deep dive into PL/pgSQL for complex stored procedures
  2. Study Write-Ahead Logging for understanding durability
  3. Explore embedded SQL (ECPG) for C applications
  4. Reference the information schema for metadata queries

Navigation Tips

  • Use section numbers (e.g., "31.1", "41.1") to locate specific topics
  • The URL patterns follow PostgreSQL docs structure (e.g., /docs/18/tutorial-select.html)
  • Code examples are language-tagged for proper syntax highlighting
  • Look for "Examples:" sections for practical code samples

Common Patterns

Pattern: Referential Integrity with Foreign Keys

Ensure data consistency by declaring foreign key constraints:

CREATE TABLE orders (
    order_id    serial PRIMARY KEY,
    customer_id integer REFERENCES customers(id),
    order_date  date
);

Pattern: Safe Updates with Transactions

Wrap related changes in a transaction block:

BEGIN;
-- Multiple related operations
UPDATE inventory SET quantity = quantity - 1 WHERE product_id = 123;
INSERT INTO order_items (order_id, product_id) VALUES (456, 123);
COMMIT;

Pattern: Query Encapsulation with Views

Hide complexity behind a view interface:

CREATE VIEW active_customers AS
    SELECT c.*, COUNT(o.order_id) as order_count
    FROM customers c
    LEFT JOIN orders o ON c.id = o.customer_id
    WHERE c.status = 'active'
    GROUP BY c.id;

Pattern: Performance with Indexes

Create indexes on frequently queried columns:

CREATE INDEX idx_orders_customer ON orders(customer_id);
CREATE INDEX idx_orders_date ON orders(order_date);

Error Handling

Foreign Key Violation

ERROR:  insert or update on table "weather" violates foreign key constraint
DETAIL:  Key (city)=(Berkeley) is not present in table "cities".

Solution: Insert the referenced row first, or use ON DELETE/UPDATE actions.

Transaction Aborted

After an error in a transaction, you must either:

  • ROLLBACK to abort and start fresh
  • ROLLBACK TO savepoint to return to a known good state

Resources

references/

Organized documentation extracted from official PostgreSQL sources:

  • Detailed explanations with context
  • Code examples with language annotations
  • Links to original documentation URLs
  • Hierarchical table of contents

scripts/

Add helper scripts for common automation tasks:

  • Database migration scripts
  • Backup and restore procedures
  • Performance testing utilities

assets/

Add templates and examples:

  • Schema templates
  • Sample data files
  • Configuration examples

Notes

  • This skill was generated from PostgreSQL 18 official documentation
  • Reference files preserve original structure and examples
  • Code examples include language tags for syntax highlighting
  • Examples prioritize practical, real-world patterns from official docs
  • PL/pgSQL is installed by default since PostgreSQL 9.0

Updating

To refresh this skill with updated documentation:

  1. Re-run the scraper with the PostgreSQL configuration
  2. The skill will be rebuilt with the latest information
  3. Check for new features in major version releases

Source Information

Primary Source: PostgreSQL 18 Official Documentation Documentation URL: https://www.postgresql.org/docs/18/ Source Confidence: Medium (official documentation) Last Updated: Generated from current documentation

平台分布

Local Agent

79.68%
按下载量换算88

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills