360 Secure SkillHub
360 安全技能中心

Uuid Toolkit

该 Skill 提供一个无外部依赖的 Python 命令行脚本,可按类型生成 UUIDv1/v3/v4/v5、ULID、NanoID 与 Nil UUID,支持批量与大小写选项;也可解析标识符提取版本、变体、时间戳、节点等信息,校验格式,并在标准、无连字符、URN、整数、base64 等表示之间转换。

johnnywang2001
johnnywang2001
热度 80.55
最近更新 2026-05-11 17:32:28
分类:效率依赖:代码执行应用场景:数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add uuid-toolkit
Metadata
name
uuid-toolkit
description
Generate, parse, validate, and convert UUIDs (v1/v3/v4/v5), ULIDs, and NanoIDs. Use when creating unique identifiers, parsing existing UUIDs to extract version/timestamp/node info, validating identifier formats, converting between UUID representations (hex, base64, URN, integer), or generating bulk IDs. No external dependencies.

UUID Toolkit

Generate, parse, validate, and convert UUIDs, ULIDs, and NanoIDs. Zero dependencies (Python 3.9+).

Quick Start

# Generate a UUIDv4
python3 scripts/uuid_toolkit.py generate uuid4

# Generate 10 ULIDs
python3 scripts/uuid_toolkit.py generate ulid --count 10

# Parse a UUID
python3 scripts/uuid_toolkit.py parse 550e8400-e29b-41d4-a716-446655440000

Commands

generate

Create identifiers of any type:

python3 scripts/uuid_toolkit.py generate uuid4                      # Random UUID
python3 scripts/uuid_toolkit.py generate uuid1                      # Time-based UUID
python3 scripts/uuid_toolkit.py generate uuid5 --name example.com   # Deterministic
python3 scripts/uuid_toolkit.py generate ulid                       # Sortable ULID
python3 scripts/uuid_toolkit.py generate nanoid --size 16           # Short NanoID
python3 scripts/uuid_toolkit.py generate uuid4 --count 100 --upper  # Bulk, uppercase
python3 scripts/uuid_toolkit.py generate nil                        # Nil UUID

Types: uuid4, uuid1, uuid3, uuid5, ulid, nanoid, nil.

parse

Extract detailed info from an identifier:

python3 scripts/uuid_toolkit.py parse 550e8400-e29b-41d4-a716-446655440000
python3 scripts/uuid_toolkit.py parse 01ARYZ6S41T1ZTXYZ1234ABCDE  # ULID

Shows version, variant, timestamp (v1/ULID), node/MAC (v1), hex, integer.

validate

Check if identifiers are valid:

python3 scripts/uuid_toolkit.py validate 550e8400-e29b-41d4-a716-446655440000 not-a-uuid

convert

Convert UUID between representations:

python3 scripts/uuid_toolkit.py convert 550e8400-e29b-41d4-a716-446655440000

Outputs: standard, uppercase, no-dashes, URN, integer, base64, bytes-LE, braces.