Postgres Nanoid

🌐Community
by azlekov · vlatest · Repository

Generates unique, URL-safe identifiers within PostgreSQL using nanoid functions for efficient primary keys and foreign key relationships.

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 postgres-nanoid npx -- -y @trustedskills/postgres-nanoid
2

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

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

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

About This Skill

What it does

This skill allows AI agents to generate unique, URL-safe identifiers using PostgreSQL's nanoid extension. It provides a reliable method for creating short, random strings suitable for primary keys, tokens, or other scenarios requiring uniqueness and brevity within a PostgreSQL database. The generated IDs are designed to be globally unique and avoid collisions.

When to use it

  • Generating Unique Identifiers: When you need to create primary keys or unique identifiers in your PostgreSQL database that are short and URL-friendly.
  • Creating Tokens: For generating secure tokens for authentication, authorization, or password resets.
  • Shortening URLs: To create concise and memorable shortened URLs stored within a database.
  • Tracking Events: Assigning unique IDs to events or tracking entries in your application.

Key capabilities

  • Generates nanoid identifiers using PostgreSQL extension.
  • Provides URL-safe identifiers.
  • Ensures uniqueness of generated identifiers.

Example prompts

  • "Generate a new nanoid identifier."
  • "Create a unique ID for this user account."
  • "Give me a short, random string to use as a token."

Tips & gotchas

  • Requires PostgreSQL and the nanoid extension to be installed and configured.
  • The generated identifiers are purely random; do not rely on them for sequential ordering or predictability.

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
azlekov
Installs
2

🌐 Community

Passed automated security scans.