Agent skill

Type Enforced Ordering

by celeriant in celeriant/celeriant-db

Building and refactoring safe, honest functions. An agent skill from celeriant/celeriant-db.

Apache-2.0Auto-check passedDevelopment

Install Type Enforced Ordering

skills CLI
$ npx skills add celeriant/celeriant-db --skill type-enforced-ordering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install celeriant/celeriant-db type-enforced-ordering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/celeriant/celeriant-db.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/type-enforced-ordering .claude/skills/type-enforced-ordering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
type-enforced-ordering
GitHub stars
114
Token cost
~614 tokens
SKILL.md length
324 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

Building and refactoring safe, honest functions. An agent skill from celeriant/celeriant-db.

  • Tasks that involve Refactoring
  • SKILL.md covers Choose the mechanism, Design receipts, Design typestate and Design cleanup
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Type Enforced Ordering is an agent skill from celeriant/celeriant-db. Building and refactoring safe, honest functions. Enforce call ordering and cleanup when designing stateful APIs, receipt tokens, or Drop implementations.

Its SKILL.md is about 610 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. The repository describes itself as: Fast, distributed per-aggregate event log with strict ordering and optimistic concurrency control. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/type-enforced-ordering”

What it can do on your machine

Read from SKILL.md and the folder at commit d071a6d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Type Enforced Ordering loads about 614 tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 324 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~614

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from celeriant/celeriant-db at commit d071a6d, republished under its Apache-2.0 licence (© celeriant). 324 words, ~614 tokens.

Download SKILL.mdSave it as .claude/skills/type-enforced-ordering/SKILL.md (or your agent's skills folder).
name
type-enforced-ordering
description
Building and refactoring safe, honest functions. Enforce call ordering and cleanup when designing stateful APIs, receipt tokens, or Drop implementations.

Enforce ordering

Choose the mechanism

  • Merge operations that always run consecutively.
  • Return a receipt when a later operation requires an earlier result.
  • Use typestate for a small, fixed set of phases with costly ordering failures.
  • Use RAII guards for scope-bound cleanup. It's not just about memory, the pattern can be used for a lot of things.
  • Return typed errors for invalid runtime states when static enforcement adds excessive complexity.

Design receipts

  • Restrict construction with private fields.
  • Carry the data established by the issuing operation.
  • Consume one-shot receipts by value; omit Clone and Copy.
  • Check issuer identity and freshness when required. A token from a.prepare() can otherwise be passed to b.commit(token).
  • Treat #[must_use] as a diagnostic, not proof of consumption. Define behavior for abandoned receipts; avoid panic-based cleanup during unwind.

Design typestate

  • Consume the old state during transitions.
  • Expose operations only on valid states.
  • Use &mut self for operations that remain in the same state.
  • Define failure ownership explicitly. Return the previous state only if its invariants still hold; otherwise close the resource or return a failed state.
  • Account for partial I/O and cancellation before permitting retries.
  • Use an enum at collection boundaries when states must coexist.
  • Share state-independent methods through a sealed marker trait when needed.

Design cleanup

  • Use guards for locks, pool checkouts, counters, gauges, and temporary resources.
  • Return a pooled resource only when it is still usable; discard it when the guard observed a fault.
  • Provide an explicit fallible or async close when cleanup must report failure or await I/O. Keep Drop as a synchronous fallback.
  • Keep destructors short. Avoid blocking I/O and locks that can stall an executor.
  • Preserve memory safety even when destructors never run, including forgotten values, cycles, and process termination.
  • Distinguish dropping a future from detaching its task. Do not assume detached or leaked work releases resources promptly.
  • Account for reverse declaration order for locals and declaration order for fields. Do not depend on closure capture drop order.

© celeriant, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/type-enforced-ordering of celeriant/celeriant-db.

Open the folder on GitHubat commit d071a6d

Compare with similar skills

Type Enforced Ordering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Type Enforced Ordering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Type Enforced Ordering this skillceleriant/celeriant-db114—~614Automated safety check: PassApache-2.0
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed

More from celeriant/celeriant-db

All 13 skills in this repo
  • Error Handling

    celeriant/celeriant-db

    Error handling patterns in Celeriant. An agent skill from celeriant/celeriant-db.

    114 GitHub stars~550 tokensUpdated 9 days ago
    Auto-check passed
  • Testing

    celeriant/celeriant-db

    How to write and run tests in Celeriant. An agent skill from celeriant/celeriant-db.

    114 GitHub stars~951 tokensUpdated 9 days ago
    Auto-check passed
  • Understanding Celeriant Structure

    celeriant/celeriant-db

    Celeriant codebase architecture, crate responsibilities, and how they fit together.

    114 GitHub stars~803 tokensUpdated 9 days ago
    Auto-check passed
  • Extract A Type

    celeriant/celeriant-db

    Refactor a named Rust type or its surrounding code with an agreed scope.

    114 GitHub stars~934 tokensUpdated 9 days ago
    Auto-check passed
  • Client Server Protocol

    celeriant/celeriant-db

    Celeriant's client-server protocol invariants, network behavior, failure modes, and shard routing.

    114 GitHub stars~1.6k tokensUpdated 9 days ago
    Auto-check passed
  • Database Architecture

    celeriant/celeriant-db

    Core architecture invariants for Celeriant. An agent skill from celeriant/celeriant-db.

    114 GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Type Enforced Ordering

What does Type Enforced Ordering do?

Building and refactoring safe, honest functions. An agent skill from celeriant/celeriant-db. Type Enforced Ordering is an agent skill from celeriant/celeriant-db. Building and refactoring safe, honest functions.

When should I use Type Enforced Ordering?

Type Enforced Ordering fits situations like: tasks that involve Refactoring.

How do I install Type Enforced Ordering in Claude Code?

Run `npx skills add celeriant/celeriant-db --skill type-enforced-ordering -a claude-code`. Or copy the skill folder (.claude/skills/type-enforced-ordering in celeriant/celeriant-db) into .claude/skills/type-enforced-ordering in your project. Claude Code loads it when a task matches its description.

How do I install Type Enforced Ordering in Codex?

Run `npx skills add celeriant/celeriant-db --skill type-enforced-ordering -a codex`. Or copy the skill folder (.claude/skills/type-enforced-ordering in celeriant/celeriant-db) into .agents/skills/type-enforced-ordering in your project. Codex loads it when a task matches its description.

Can I use Type Enforced Ordering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add celeriant/celeriant-db --skill type-enforced-ordering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/type-enforced-ordering, .gemini/skills/type-enforced-ordering, .github/skills/type-enforced-ordering and .opencode/skills/type-enforced-ordering in your project.

What does Type Enforced Ordering need to run?

SKILL.md names no scripts, command-line tools or credentials: Type Enforced Ordering is instructions for the agent only.

Does Type Enforced Ordering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Type Enforced Ordering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Type Enforced Ordering use?

Type Enforced Ordering is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Type Enforced Ordering use?

About 614 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Type Enforced Ordering?

Skills that share tags, products or a category with Type Enforced Ordering: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 156k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars) and ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Type Enforced Ordering?

celeriant (a GitHub organization) maintains it in celeriant/celeriant-db, which has 114 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 28, 2026.

Source: celeriant/celeriant-db on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.