Design Postgres Tables

🌐Community
by timescale · vlatest · Repository

Helps with design, PostgreSQL as part of working with databases and data persistence workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add design-postgres-tables npx -- -y @trustedskills/design-postgres-tables
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "design-postgres-tables": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/design-postgres-tables"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

The design-postgres-tables skill generates optimized PostgreSQL table schemas based on user requirements and data modeling principles. It automatically handles complex scenarios like partitioning strategies, indexing recommendations, and constraint definitions to ensure high performance.

When to use it

  • Rapidly prototype database structures for new applications without writing raw SQL from scratch.
  • Optimize existing schema designs by requesting specific performance characteristics or storage constraints.
  • Generate compliant schemas that adhere to best practices for data integrity and normalization.
  • Create tailored table definitions for TimeSeries databases when working with TimescaleDB extensions.

Key capabilities

  • Generates complete CREATE TABLE statements including columns, data types, and default values.
  • Automatically suggests appropriate indexes based on query patterns described in the prompt.
  • Implements partitioning strategies (e.g., range, list) to manage large datasets efficiently.
  • Enforces foreign key constraints and unique identifiers to maintain referential integrity.

Example prompts

  • "Create a highly normalized schema for an e-commerce order system with users, products, and orders."
  • "Design a TimeSeries table for storing IoT sensor readings that requires automatic partitioning by date."
  • "Generate a PostgreSQL schema for a financial ledger with strict constraints to prevent negative balances."

Tips & gotchas

Ensure you specify the expected data volume and access patterns in your prompt to receive optimal indexing and partitioning advice. While the skill generates robust schemas, always review generated SQL before production deployment to verify it aligns with specific application logic and security policies.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
timescale
Installs
58

🌐 Community

Passed automated security scans.