72
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill aidotnet/moyucode --skill uuid-generator- SKILL.md891 B
Overview
This skill generates universally unique identifiers (UUIDs) and other compact unique IDs including UUID v1, v4, v5, ULID, and nanoid. It exposes a simple command (e.g., /uuid) and CLI options to create single or batch IDs with configurable formats and lengths. The tool is implemented in TypeScript and designed for quick integration into scripts and development workflows.
How this skill works
The generator creates IDs on demand using the appropriate algorithm: v1 (time + node), v4 (cryptographically random), v5 (SHA-1 namespace-based), ULID (time-ordered 128-bit), and nanoid (short, URL-safe). CLI flags control count, type, namespace/name for v5, and custom length for short IDs. Outputs are plain text, one ID per line, suitable for piping into files or other tools.
When to use it
- Assigning unique primary keys for distributed systems
- Creating session tokens, API keys, or file names
- Generating deterministic IDs tied to a namespace (v5)
- Producing sortable IDs for event streams or logs (ULID)
- Creating compact IDs for client-side use or URLs (nanoid)
Best practices
- Select the right ID type: v4 for strong randomness, v1/ULID for time-ordering, v5 for deterministic namespace-based IDs
- Avoid exposing raw node or MAC info from v1 in public contexts; prefer v4 or ULID for privacy
- When using v5, pick stable namespaces and canonical names to ensure reproducible results
- Generate IDs in batches only as needed and rely on cryptographic RNG for high-concurrency systems
- Store IDs as strings using canonical formatting (lowercase hex with dashes for UUIDs) to avoid normalization bugs
Example use cases
- Database primary keys for microservices where global uniqueness is required
- Session or API tokens that must be hard to guess (use v4 or nanoid)
- Deterministic resource IDs for external integrations using UUID v5 and a fixed namespace
- Time-ordered event IDs for ingestion systems or analytics using ULID
- Short, URL-safe identifiers for links or client-side entities using nanoid
FAQ
v4 is random and best for general-purpose unique tokens; v1 is time-based and can expose node/time information; v5 is deterministic, computing an ID from a namespace and name using SHA-1.
When should I use ULID or nanoid instead of UUID?
Use ULID when you want time-ordered, sortable identifiers. Use nanoid for compact, URL-safe IDs with configurable length when brevity matters.