gap-free-sequences

Official

Gap-free, transaction-safe business numbering

Authorvobase
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Generating human-readable business numbers without gaps or duplicates under concurrent writes is difficult when numbering logic runs outside the database or outside the write transaction. This Skill centralizes sequence allocation so financial and compliance documents receive deterministic, auditable numbers that remain consistent after rollbacks and concurrent operations.

Core Features & Use Cases

  • Atomic, gap-free allocation: Uses a centralized sequences table and an atomic SQL UPSERT to allocate monotonic numbers per prefix.
  • Transaction safety: Designed to be called with the transaction handle so number allocation and record insertion are atomic and rollback-safe.
  • Flexible formatting: Supports pad length, separator, and optional year prefix while keeping the counter keyed by prefix.
  • Use cases: Invoice, order, shipment, purchase order numbering, compliance documents, and automated test validations for concurrency and rollback scenarios.

Quick Start

Generate a gap-free invoice number for prefix INV inside the same transaction and persist it with the invoice record.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: gap-free-sequences
Download link: https://github.com/vobase/vobase/archive/main.zip#gap-free-sequences

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.