This skill should be used when the user needs to generate IDs for SPECLAN entities, asks to "generate an ID", "new feature ID", "unique requirement ID", "create a collision-free ID", or when any command or agent needs to assign IDs to new SPECLAN entities.
From speclannpx claudepluginhub thlandgraf/cc-marketplace --plugin speclanThis skill uses the workspace's default tool permissions.
references/inline-algorithm.mdscripts/generate-id.mjsscripts/generate-id.shGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Generate unique, collision-free IDs for SPECLAN entities with parent-aware end-biased ordering and automatic collision detection.
--parent flag generates IDs biased after existing siblings, preserving natural ordering| Entity Type | Prefix | Digits | Range | Example |
|---|---|---|---|---|
| goal | G- | 3 | 000-999 | G-142 |
| feature | F- | 4 | 0000-9999 | F-1847 |
| requirement | R- | 4 | 0000-9999 | R-3928 |
| change-request | CR- | 4 | 0000-9999 | CR-7291 |
ID-Based Ordering: Lower IDs = higher priority. The --parent flag generates IDs that come after existing siblings, maintaining natural creation order within a hierarchy.
${CLAUDE_PLUGIN_ROOT}/skills/speclan-id-generator/scripts/generate-id.mjs
node generate-id.mjs --type <entityType> [--parent <id>] [--count <n>] [--speclan-root <path>]
Flags:
--type <type> - Required. One of: goal, feature, requirement, changeRequest (or change-request)--parent <id> - Optional. Parent entity ID for end-biased generation. The parent must exist on disk.--count <n> - Optional. Number of IDs to generate (default: 1, max: 100)--speclan-root <path> - Optional. Path to speclan directory (auto-detected if omitted)Output: JSON to stdout:
{"ok":true,"data":{"type":"feature","ids":["F-1847","F-2934"]}}
Error output: JSON to stdout with exit code 1:
{"ok":false,"error":"PARENT_NOT_FOUND","message":"Parent entity not found: F-9999","context":{"parentId":"F-9999"}}
SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/speclan-id-generator/scripts/generate-id.mjs"
# Generate a single feature ID
node "$SCRIPT" --type feature --speclan-root /path/to/speclan
# {"ok":true,"data":{"type":"feature","ids":["F-1847"]}}
# Generate 3 feature IDs
node "$SCRIPT" --type feature --count 3 --speclan-root /path/to/speclan
# {"ok":true,"data":{"type":"feature","ids":["F-1847","F-2934","F-5621"]}}
# Generate child feature IDs under a parent (end-biased after siblings)
node "$SCRIPT" --type feature --parent F-1847 --count 2 --speclan-root /path/to/speclan
# {"ok":true,"data":{"type":"feature","ids":["F-3012","F-3498"]}}
# Generate requirement IDs under a child feature
node "$SCRIPT" --type requirement --parent F-3012 --count 4 --speclan-root /path/to/speclan
# {"ok":true,"data":{"type":"requirement","ids":["R-4521","R-4832","R-5293","R-5647"]}}
# Extract IDs array with jq
node "$SCRIPT" --type feature --count 3 --speclan-root "$SPECLAN_DIR" | jq -r '.data.ids[]'
# F-1847
# F-2934
# F-5621
When --parent is specified, the generator:
Valid parent relationships:
--type feature --parent F-XXXX → child feature under parent feature--type requirement --parent F-XXXX → requirement under feature--type changeRequest --parent F-XXXX → CR under feature--type changeRequest --parent R-XXXX → CR under requirement--type changeRequest --parent G-XXX → CR under goalImportant: The parent entity must exist on disk before using --parent. For hierarchical creation (like from-speckit conversion), write parent files first, then generate child IDs.
If Node.js is not available, use the bash script:
${CLAUDE_PLUGIN_ROOT}/skills/speclan-id-generator/scripts/generate-id.sh
./generate-id.sh <entity-type> [count] [speclan-dir]
Output: Plain text, one ID per line. No --parent support.
See references/inline-algorithm.md for an inline bash algorithm when neither script is available.
| Exit Code | Meaning |
|---|---|
| 0 | Success - JSON/ID printed to stdout |
| 1 | Error - JSON/message printed to stdout/stderr |
Common errors:
MISSING_TYPE — --type flag not providedINVALID_TYPE — Unknown entity typePARENT_NOT_FOUND — --parent ID not found on diskINVALID_PARENT — Parent type not valid for the requested entity typeID_GENERATION_FAILED — ID space exhausted or collision loop