home / skills / dkyazzentwatwa / chatgpt-skills / uuid-generator

uuid-generator skill

/uuid-generator

This skill generates UUIDs in multiple formats (UUID4, UUID1, namespace) for unique identifiers across databases, APIs, and distributed systems.

npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill uuid-generator

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.3 KB
---
name: uuid-generator
description: Use when asked to generate UUIDs, GUIDs, unique identifiers in various formats (UUID1, UUID4, etc.).
---

# UUID Generator

Generate universally unique identifiers (UUIDs) in various formats for distributed systems, databases, and APIs.

## Purpose

UUID generation for:
- Database primary keys
- API resource identifiers
- Distributed system coordination
- Session tokens and tracking
- File naming and versioning

## Features

- **Multiple Versions**: UUID1 (time-based), UUID4 (random), UUID5 (namespace)
- **Bulk Generation**: Generate thousands of UUIDs
- **Custom Formats**: Hyphenated, compact, URN format
- **Namespace UUIDs**: Deterministic UUIDs from names
- **Validation**: Check UUID format and version
- **Export**: CSV, JSON, plain text

## Quick Start

```python
from uuid_generator import UUIDGenerator

# Generate UUID4 (random)
gen = UUIDGenerator()
uuid = gen.generate()  # 'a1b2c3d4-e5f6-4789-g0h1-i2j3k4l5m6n7'

# Bulk generation
uuids = gen.generate_bulk(count=1000, version=4)

# Namespace UUID (deterministic)
uuid = gen.generate_namespace('example.com', namespace='dns')
```

## CLI Usage

```bash
# Generate single UUID
python uuid_generator.py

# Generate 1000 UUIDs
python uuid_generator.py --count 1000 --output uuids.txt

# Generate namespace UUID
python uuid_generator.py --namespace dns --name example.com
```

Overview

This skill generates universally unique identifiers (UUIDs/GUIDs) in multiple formats and versions for reliable identification across systems. It supports single or bulk generation, deterministic namespace-based IDs, and several output formats (hyphenated, compact, URN). The tool includes validation and export options for easy integration into databases, APIs, and workflows.

How this skill works

Call the generator with a chosen version (UUID1 time-based, UUID4 random, UUID5 namespace) to produce one or many identifiers. Options let you select formatting (hyphens, compact, URN), supply a namespace and name for deterministic UUIDs, and validate existing IDs. Bulk generation streams results or writes to CSV/JSON/plain text for downstream use.

When to use it

  • Create primary keys for distributed databases where collision resistance is required
  • Assign resource IDs for APIs and services to avoid coordination bottlenecks
  • Generate deterministic IDs for namespaced resources (domains, users, files)
  • Produce session tokens, file names, or versioned artifacts that must be unique
  • Bulk-generate identifiers for data migration, testing, or load simulation

Best practices

  • Prefer UUID4 for most random-unique needs; use UUID1 only when time-based ordering is helpful
  • Use UUID5 (namespace) when you need the same input to always yield the same ID
  • Avoid embedding sensitive information in UUID-creation input to prevent information leaks
  • Choose compact or URN formats based on storage and interchange requirements
  • Validate UUIDs on input to ensure correct version and formatting before use

Example use cases

  • Generate 1,000 UUID4 values to populate test records for performance benchmarking
  • Create a UUID5 from a domain name to deterministically map a hostname to an identifier
  • Export a list of UUIDs to CSV for bulk import into a database as primary keys
  • Produce hyphen-free compact UUIDs for URL-safe resource identifiers
  • Generate sequential UUID1 values when ordering by creation time simplifies queries

FAQ

Which UUID version should I choose for general use?

Choose UUID4 for random, non-predictable identifiers. Use UUID1 when you need time-based ordering, and UUID5 for deterministic IDs tied to a namespace and name.

Can I generate thousands of UUIDs quickly and export them?

Yes. The skill supports bulk generation and can stream or write output to CSV, JSON, or plain text to handle thousands of IDs efficiently.