prefixed-ids

prefixed-ids is a skill for Claude Code from oborchers/fractional-cto. It costs 69 tokens per session (2,919 once invoked), scanned A, original, MIT.

A guide to creating identifiers that reveal the type of resource they refer to, such as a customer or order. It covers prefixed IDs, UUIDs, KSUIDs, ULIDs, generation, and validation.

In plain words
What is it for?
Use it to choose an ID format, define prefixes, generate collision-resistant IDs, validate them, and design type-safe identifiers for an API.
Why use it?
It makes IDs easier to understand in logs and debugging and helps systems validate and route different resource types consistently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the api-design-principles plugin — 13 skills, 1 command, 1 agent shipped together

Good fit Use it to choose an ID format, define prefixes, generate collision-resistant IDs, validate them, and design type-safe identifiers for an API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oborchers/fractional-cto/prefixed-ids
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add oborchers/fractional-cto --skill prefixed-ids
Clone the repo
git clone --depth 1 https://github.com/oborchers/fractional-cto

Made for: Claude Code.

Or install api-design-principles, the plugin that ships this one along with the rest of its 13 skills, 1 command, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prefixed-ids

README.md
[![agentmods](https://agentmods.dev/badge/skills/oborchers/fractional-cto/prefixed-ids/github.svg)](https://agentmods.dev/skills/oborchers/fractional-cto/prefixed-ids)
Your own site
<a href="https://agentmods.dev/skills/oborchers/fractional-cto/prefixed-ids"><img src="https://agentmods.dev/badge/skills/oborchers/fractional-cto/prefixed-ids/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prefixed-ids

Your own site · 80×15
<a href="https://agentmods.dev/skills/oborchers/fractional-cto/prefixed-ids"><img src="https://agentmods.dev/badge/skills/oborchers/fractional-cto/prefixed-ids.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,919 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.02919
Opus 5 $0.00034 $0.01460
Sonnet 5 $0.00014 $0.00584
Haiku 4.5 $0.00007 $0.00292

Measured 10d ago against content hash 070768d1243c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

prefixed-ids scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

api-design-principles/skills/prefixed-ids/SKILL.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Every ID Should Declare Its Type

When a support engineer sees cus_NffrFeUfNV2Hib in a log line, they know it is a customer. When they see 550e8400-e29b-41d4-a716-446655440000, they know nothing. Stripe prefixes every ID with a short type indicator, and that seemingly small decision compounds across debugging, routing, type safety, log analysis, and cross-service communication. Adopt this pattern for every resource in your API.

The Prefix Pattern

Every ID follows the format {type}_{random}:

cus_NffrFeUfNV2Hib          -- customer
ord_01HXK3GJ5V8WJKPT2MNR   -- order
pi_3MtwBwLkdIwHu7ix28a3     -- payment intent

The prefix is a short, lowercase abbreviation of the resource type. The underscore is a fixed separator. The random part is a collision-resistant, alphanumeric string.

Format Rules

Follow these constraints for every prefixed ID:

  • Prefix length: 2-5 lowercase characters. Short enough to read at a glance, long enough to be unambiguous.
  • Separator: Always a single underscore. Never a hyphen, colon, or dot.
  • Random part: Base62 characters (a-zA-Z0-9). URL-safe, no special characters. 14-27 characters depending on the generation strategy.
  • Total length: 18-30 characters. Short enough to paste in Slack, long enough to be collision-free.

Prefix Catalog

Define a canonical prefix for every resource type in your API. Maintain this as a living registry -- never reuse a prefix for a different resource.

Prefix Resource Example
usr_ User usr_01HXK3GJ5V8WJKP
org_ Organization org_2ZutauDiLLuKvLgb
ord_ Order ord_01ARZ3NDEKTSV4RR
prod_ Product prod_NWjs8kKbJWmuuc
inv_ Invoice inv_1MtHbELkdIwHu7ix
pay_ Payment pay_3MtwBwLkdIwHu7ix
sub_ Subscription sub_1MowQVLkdIwHu7ix
wh_ Webhook Endpoint wh_1MqVTHLkdIwHu7ix
evt_ Event evt_9Kx2mPbQ7rTvYw4j
sess_ Session sess_2dH3VUuCJRx7wnlv
tok_ Token tok_1MioVOLkdIwHu7ix
key_ API Key key_4eC39HqLyjWDarjt
cus_ Customer cus_NffrFeUfNV2Hib
price_ Price price_1MoBy5LkdIwHu7ix
txn_ Transaction txn_3MmlLrLkdIwHu7ix

Read the full file on GitHub · 193 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 193 lines · 69 tokens per session scan A 070768d1243c

Subscribe to this mod's changes

prefixed-ids is a skill published in the GitHub repository oborchers/fractional-cto (29 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 2,919 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agui-dotnet-streaming-chat

Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…

ag-ui-protocol/ag-ui · 223 tokens

azure-mgmt-apicenter-dotnet

Azure API Center SDK for .NET. Centralized API inventory management with governance, versioning, and discovery. Use for creating API services, workspaces, APIs, versions, definitions, environments, deployments, and metadata schemas. Triggers: "API Center", "ApiCenterService", "ApiCenterWorkspace", "ApiCenterApi", "API…

microsoft/skills · 97 tokens

azure-communication-chat-java

Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.

microsoft/skills · 41 tokens

grpc

Build or review gRPC services and clients in .NET. USE FOR: ASP.NET Core gRPC, protobuf contracts, unary or streaming RPC, gRPC client factory, interceptors, deadlines, cancellation, channel reuse, backend service integration. DO NOT USE FOR: broad browser-facing APIs without gRPC-Web tradeoff review, SignalR realtime…

managedcode/dotnet-skills · 95 tokens

azure-messaging-webpubsubservice-py

Real-time messaging with WebSocket connections at scale.

benjaminasterA/antigravity-awesome-skills · 0 tokens

minimal-api

.NET 10 minimal APIs — the default for building HTTP endpoints. Covers MapGroup, endpoint filters, TypedResults, OpenAPI metadata, parameter binding, and route conventions. Load this skill when creating API endpoints, configuring routing, setting up OpenAPI documentation, or when the user mentions "endpoint"…

codewithmukesh/dotnet-claude-kit · 101 tokens