スキル一覧に戻る
pluginagentmarketplace

postgresql-fundamentals

by pluginagentmarketplace

PostgreSQL developer roadmap plugin with database patterns and query optimization

1🍴 0📅 2026年1月5日
GitHubで見るManusで実行

SKILL.md


name: postgresql-fundamentals description: Master PostgreSQL SQL fundamentals - data types, tables, constraints, schema design version: "3.0.0" sasmp_version: "1.3.0" bonded_agent: 01-postgresql-fundamentals bond_type: PRIMARY_BOND category: database difficulty: beginner estimated_time: 2h

PostgreSQL Fundamentals Skill

Atomic skill for SQL foundations and schema design

Overview

Production-ready patterns for PostgreSQL 16+ data modeling, including type selection, constraint design, and schema organization.

Prerequisites

  • PostgreSQL 16+ installed
  • Basic SQL knowledge
  • Database access with CREATE privileges

Parameters

parameters:
  operation:
    type: string
    required: true
    enum: [create_table, add_constraint, select_type, design_schema]
  table_name:
    type: string
    pattern: "^[a-z][a-z0-9_]*$"
  schema:
    type: string
    default: "public"

Quick Reference

Data Type Selection

Use CaseRecommendedAvoid
Primary keyBIGINT GENERATED ALWAYS AS IDENTITYSERIAL
MonetaryNUMERIC(19,4)FLOAT
TimestampsTIMESTAMPTZTIMESTAMP
UUIDUUIDVARCHAR(36)
JSON dataJSONBJSON

Table Template

CREATE TABLE schema_name.table_name (
    id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

Constraint Patterns

-- Foreign key
CONSTRAINT fk_name FOREIGN KEY (col) REFERENCES other(id) ON DELETE CASCADE;
-- Check
CONSTRAINT chk_positive CHECK (amount > 0);
-- Unique
CONSTRAINT uq_email UNIQUE (email);

Validation Rules

RulePattern
Table names^[a-z][a-z0-9_]{2,62}$
Column names^[a-z][a-z0-9_]{1,62}$

Test Template

DO $$ BEGIN
    DROP TABLE IF EXISTS test_users;
    CREATE TABLE test_users (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY);
    ASSERT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'test_users');
    DROP TABLE test_users;
END $$;

Troubleshooting

ErrorCauseSolution
42P07Table existsUse IF NOT EXISTS
23505Duplicate keyCheck constraints
42703Column not foundVerify names

Usage

Skill("postgresql-fundamentals")

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です