This skill should be used when the user needs a "unique ID generator", "distributed IDs", a "Snowflake ID", asks "UUID vs auto-increment", wants a "time-sortable ID", a "monotonic sequence", a "ticket server", or "ID generation at scale". It gives a menu of ID schemes (UUID/ULID, Snowflake-style, DB ticket/range) with their causality, ordering, and clock-skew trade-offs. Use it whenever a design needs collision-free identifiers across many nodes, even if the user doesn't say "sequencer".
npx skills add https://github.com/proyecto26/system-design-skills --skill sequencer
Hand out identifiers that are unique across every node without a central
bottleneck — and decide whether those IDs must also be *sortable* or *monotonic*.
Getting this wrong shows up late and hard: collisions corrupt data, a single
allocator caps write throughput, and IDs that leak a creation time or a sequential
count expose business secrets and enable enumeration attacks.
A system writes new records across multiple nodes and each needs a primary key
(orders, messages, uploads, events). Reach for this when a single auto-increment
column would serialize all writes, when IDs must be generated before a DB round
trip (client-side, offline), or when records must be roughly time-ordered without
a separate sort field.
A single relational node still comfortably serves the write load (→
back-of-the-envelope) — then a plain BIGINT AUTO_INCREMENT/SERIAL is the
cheapest correct answer; do not build a distributed ID service for it (YAGNI).
If a natural unique key already exists (email, ISBN, content hash), use it. Don't
demand global monotonicity unless an invariant truly needs it — it is the most
expensive property here and usually only *per-entity* ordering is required.
DB round trip per ID is acceptable.)
monotonic*? Per-entity or global? This is the single biggest fork.
back-of-the-envelope). Sets the bits needed for a sequence counter.
(no coordination ever) vs short URL-safe string?
(enumeration / competitor signal)?
single node owns the writes and you want zero new infrastructure.
zero collision risk. Use when you only need uniqueness and never sort by ID.
timestamp prefix, so IDs sort by creation time. Use when you want UUIDv4's
zero-coordination *and* time-ordering (the modern default for new keys).
a node ID, and a per-ms counter into a sortable 64-bit int. Use at high write
rates where a compact, k-sorted integer key matters.
*blocks* of IDs (e.g. 1000 at a time); each node serves from its block in
memory. Use when you want simple monotonic-ish integers without per-ID
coordination.
| Option | What it solves | What it worsens | Change it when |
|---|---|---|---|
| Auto-increment / sequence | Trivial, monotonic, compact int | Serializes writes; single node caps throughput; leaks count | Writes outgrow one node, or you need client-side IDs → ticket/Snowflake |
| UUIDv4 (random) | Generate anywhere, no coordination, no leakage | 128-bit; random order kills index locality (page splits); not sortable | You need time-ordering → ULID/UUIDv7 |
| ULID / UUIDv7 | Zero coordination + time-sortable + index-friendly | Still 128-bit; only ms-sortable (not strict); leaks creation time | You need a 64-bit key or strict order → Snowflake / sequence |
| Snowflake-style (64-bit) | Compact, k-sorted, ~4M IDs/node/sec | Needs node-ID assignment + clock-skew handling; epoch/bit budget caps lifespan | Clock sync is unreliable, or you can't assign node IDs → ULID |
| DB ticket / range | Monotonic-ish ints, low coordination, simple | Allocator table is a SPOF; gaps on restart; only loosely ordered across nodes | Allocator becomes a bottleneck or SPOF → Snowflake/ULID |
The whole point of distributed ID schemes is to avoid a single allocator, so the
failure modes cluster around *coordination shortcuts*.
one row/node. A spike or its failure stalls all inserts. *Mitigate:* hand out
larger ranges, replicate the allocator, or move to Snowflake/ULID (no central
hop). Larger ranges trade away monotonicity and waste IDs on restart.
backward (NTP correction, VM pause), it can re-emit a timestamp it already used
and collide within its node+sequence space. *Mitigate:* refuse to emit while
now < last_timestamp (block or error), use a monotonic clock source, and alarm
on skew. Never silently trust wall-clock time.
2^seq_bits IDs in one millisecond onone node overflows the counter. *Mitigate:* spin-wait to the next ms, or size
the bit budget to peak rate up front.
autoscaling reuse) and silently mint duplicates. *Mitigate:* lease node IDs from
a coordinator (→ consistency-coordination) instead of static config.
all new writes to one shard. *Mitigate:* hash the key or prefix-shard — the
partitioning fix lives in data-storage.
Monitor: ID issuance rate per node, clock-skew/rewind events, allocator
latency and range-exhaustion rate, and duplicate-key errors (should be zero).
(none / time-sortable / strict; per-entity vs global), peak IDs/sec, the size
budget, and leakage tolerance (see *Clarify first*). If one DB node serves the
writes, stop — use auto-increment (→ back-of-the-envelope).
want time-sortable with zero coordination → ULID/UUIDv7; need a compact 64-bit
k-sorted int at high rate → Snowflake; want simple monotonic ints → ticket/range.
bit split against your node count and peak rate; for ticket pick the block size;
decide the node-ID assignment method (lease vs static); choose the encoding
(raw int, Base62, Crockford Base32).
sequence exhaustion, node-ID collision, allocator failure, and the hot-shard
effect of sequential keys. Confirm a mitigation for each one your profile hits.
the epoch gives enough years; confirm the encoded length fits the key/URL
constraint (→ *Numbers that matter*).
ticket row, or ULID/UUIDv7); only open a provider file if the user named a
cloud (see *Choosing a provider*).
Change it when…` table with one row per choice you made here (e.g. the
option, its store, its failure policy); the last column is a concrete trigger
(a number or observable signal). Then name what breaks first.
Do
time-ordering — it dodges UUIDv4's random-index pain.
required lifespan *before* picking it; write the epoch down.
a P1.
ID when enumeration or leakage matters.
Don't
keep up (YAGNI).
order causes page splits and write amplification.
without replication — it's a SPOF and a write bottleneck.
in data-storage).
A 64-bit Snowflake layout (≈41 timestamp bits + 10 node + 12 sequence) gives ~69
years from its epoch, 1024 nodes, and 4096 IDs/node/ms ≈ 4M IDs/node/sec —
ample for almost any single service. UUID/ULID are 128 bits = 16 bytes (vs 8 for
a 64-bit int), doubling index key size. A ticket block of N IDs cuts allocator
hits by N× but risks losing up to N IDs on a node restart. For peak-rate and
storage sizing, see back-of-the-envelope; restate only the figure a decision
turns on.
An issued ID is a contract. State its width (64 vs 128 bit), its layout
(e.g. Snowflake [timestamp:41 | node:10 | seq:12]), its ordering guarantee
(unordered / k-sorted by ms / strict), and its encoding (raw int, Base62,
Crockford Base32 — case-insensitive, URL-safe). A generator endpoint, if any, is
minimal: next(entity) -> {id, issued_at}. Document whether the ID is the storage
key, the sort key, or both — that choice is consumed by data-storage.
Default to the generic recipe above. If the user names a cloud, read
references/providers/<provider>.md for the managed-service mapping,
quotas/limits, and provider-specific trade-offs. If no file exists for that
provider, the generic recipe is the answer (most clouds have no dedicated ID
service — you run a library or a sequence yourself).
To visualize the issuance path (generator nodes → 64-bit layout → record key) or
the ticket-server block-allocation flow, use the in-plugin architecture-diagram
skill; an inline [ts | node | seq] sketch is enough for quick bit-budget
reasoning. Do not embed Mermaid.
data-storage — *feeds into* it: the ID becomes the primary/sort key, and thesharding/partitioning that a sequential key can hot-spot is owned there.
consistency-coordination — *depends on* it for the causality, ordering, andleader-election theory behind monotonic guarantees and node-ID leasing; link,
don't re-teach.
messaging-streaming — *pairs with* it for message ordering and dedup, wheretime-sortable IDs give a natural sequence and idempotency anchor.
api-design — *pairs with* it: ID generation underpins idempotency keys (ownedthere) for safe retries.
system-design — *owned-concept lives in* the orchestrator: the reasoning loop,the trade-off method, and the ten failure modes.
references/deep-dive.md — Snowflake bit-layout math and epoch choice,clock-skew/monotonic-clock handling, ticket-server range allocation, ULID vs
UUIDv7 byte layout, encoding (Base62/Crockford), and node-ID leasing. Read when
designing the generator in detail.
references/providers/{generic,aws,gcp}.md — library/service mappings,limits, and pitfalls per environment.
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take proyecto26/sequencer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.