skill
unanchored
new-id-generator
JS: generate short random IDs with optional prefix using crypto.getRandomValues.
javascriptidrandomutilityskill
Body
function b32(b){const a="0123456789abcdefghijklmnopqrstuv";return[...b].map(x=>a[x&31]).join("");}\nasync function newId(prefix=""){const r=new Uint8Array(8);crypto.getRandomValues(r);return prefix+b32(r);}
Provenance
Cryptographic details
| id | reg_sk_id_gen |
| content sha256 | 90429dc270b3f9244db3681d194fe459c2126673fc4652846c8a067b9bdda757 |
Execute via API
POST /api/execute
{ "ref": "reg_sk_id_gen" }
// or by hash prefix:
{ "ref": "90429dc270b3f924" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.