Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Basic Ids

ASecurity

How to use @owlmeans/basic-ids — createIdOfLength and createRandomPrefix for random identifiers, uuid for v4 UUIDs, and generateWordSlug / nextSlugCandidate for human-readable two-word slugs. Auto-invoked when importing ID generation utilities or naming a new record, nonce or organization slug.

3 stars
0 votes
0 copies
0 views
Added 9/22/2026
developmenttypescriptkubernetes

Works with

cli

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add owlmeans/common --skill basic-ids --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Basic Ids?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Basic Ids
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/owlmeans-basic-ids-common/badge)](https://www.skillsdirectory.com/skills/owlmeans-basic-ids-common)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: basic-ids
description: How to use @owlmeans/basic-ids — createIdOfLength and createRandomPrefix for random identifiers, uuid for v4 UUIDs, and generateWordSlug / nextSlugCandidate for human-readable two-word slugs. Auto-invoked when importing ID generation utilities or naming a new record, nonce or organization slug.
user-invocable: false
---
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->

# @owlmeans/basic-ids

**Layer:** Core
**Install:** `"@owlmeans/basic-ids": "^0.1.18-rc.27"` in `dependencies`

## Key Exports

| Export | Description |
|--------|-------------|
| `createIdOfLength(length?, style?)` | A random id of exactly `length` characters (default 6) |
| `createRandomPrefix(bytes?, style?)` | Encode `bytes` random bytes (default 6); length varies with the encoding |
| `uuid()` | A v4 UUID string |
| `generateWordSlug()` | A readable two-word slug — `civil-format`, `raised-earth` |
| `nextSlugCandidate(base, attempt)` | The n-th candidate for an occupied slug — `brisk-otter`, `brisk-otter-2` |
| `IdStyle` | `Base58` (default) and `Base64` (url-safe, unpadded) |
| `WORD_SLUG_SEPARATOR` (`'-'`), `WORDLIST_SIZE` (2048) | Slug shape and thesaurus size |
| `WORDLIST_A` / `WORDLIST_B` | The descriptive and subject halves the slug is drawn from |

## Random identifiers

```typescript
import { createIdOfLength, IdStyle, uuid } from '@owlmeans/basic-ids'

const id = createIdOfLength(16)                    // 16 Base58 chars
const nonce = createIdOfLength(32, IdStyle.Base64) // 32 url-safe Base64 chars
const recordId = uuid()
```

`createIdOfLength` asks for twice the bytes and truncates, so the result is exactly the requested
number of characters whatever the encoding — this is the function to use for anything that must be
unguessable. `createRandomPrefix` is the raw form: it encodes the bytes it was given and returns
however many characters that produced.

## Readable slugs

`generateWordSlug` picks one descriptive word and one subject word out of 2048 each, joined by a
hyphen. The result is a valid DNS label and a valid Kubernetes object-name segment, so the same
value can address a host, a namespace and an OIDC client without a second sanitising pass — which
is why an organization entity's `entitySlug` is generated this way rather than as a random string.

Two words carry 22 bits of entropy. That is **not** enough to be unguessable, and deliberately so:
uniqueness is settled by a unique index or a registry claim, never by entropy. Walk
`nextSlugCandidate` until the store accepts one, and never use a slug where a secret is needed.

```typescript
import { generateWordSlug, nextSlugCandidate } from '@owlmeans/basic-ids'

const base = generateWordSlug()
for (let attempt = 1; attempt <= 10; ++attempt) {
  const candidate = nextSlugCandidate(base, attempt)   // attempt 1 is the bare name
  if (await claim(candidate)) return candidate
}
```

## Depends On

- `@noble/hashes` (randomness), `@scure/base` (Base58 / Base64), `uuid`

Attribution

owlmeansowlmeans
View sourceMore from owlmeans →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284072 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →