order-management

order-management is a skill for Claude Code, Codex from mercuryPark/oc-setup. It costs 27 tokens per session (315 once invoked), scanned A, original, MIT.

A design and implementation guide for managing an order’s lifecycle, such as moving from pending to paid, shipped, and delivered. It also covers recording status history and preventing conflicting updates.

In plain words
What is it for?
Use it when designing order tables, allowed status changes, cancellation and refund paths, audit records, and concurrent database updates.
Why use it?
It helps keep order changes valid and traceable when business rules apply or multiple processes try to update the same order.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when designing order tables, allowed status changes, cancellation and refund paths, audit records, and concurrent database updates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mercurypark/oc-setup/order-management
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 mercuryPark/oc-setup --skill order-management
Clone the repo
git clone --depth 1 https://github.com/mercuryPark/oc-setup

Made for: Claude Code, Codex.

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 order-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/mercurypark/oc-setup/order-management.svg)](https://agentmods.dev/skills/mercurypark/oc-setup/order-management)
Your own site
<a href="https://agentmods.dev/skills/mercurypark/oc-setup/order-management"><img src="https://agentmods.dev/badge/skills/mercurypark/oc-setup/order-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 315 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.
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.00027 $0.00315
Opus 5 $0.00014 $0.00158
Sonnet 5 $0.00005 $0.00063
Haiku 4.5 $0.00003 $0.00032

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

Security

Grade A, and why

order-management 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 7d 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.

templates/skills/order-management/SKILL.md · 59 lines

What it actually says

Order Management System

State Machine

Order States

pending → paid → preparing → shipped → delivered
   ↓        ↓        ↓          ↓
cancelled  refund  failed     returned

State Transitions

  • Define allowed transitions explicitly
  • Validate business rules before state change
  • Log all state changes with timestamp

Implementation

Database Schema

CREATE TABLE orders (
  id UUID PRIMARY KEY,
  status VARCHAR(20) NOT NULL,
  status_history JSONB DEFAULT '[]',
  version INTEGER DEFAULT 1, -- for optimistic locking
  created_at TIMESTAMP,
  updated_at TIMESTAMP
)

Optimistic Locking

async updateOrderStatus(orderId: string, newStatus: string, currentVersion: number) {
  const result = await db.query(
    `UPDATE orders 
     SET status = $1, version = version + 1
     WHERE id = $2 AND version = $3
     RETURNING *`,
    [newStatus, orderId, currentVersion]
  )
  
  if (result.rowCount === 0) {
    throw new Error('Order was modified by another process')
  }
}

Best Practices

  • Never delete orders (soft delete only)
  • Maintain complete audit trail
  • Handle concurrent modifications
  • Implement idempotent operations
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. 7d ago First seen · 59 lines · 27 tokens per session scan A e71737315108

Subscribe to this mod's changes

order-management is a skill published in the GitHub repository mercuryPark/oc-setup (2 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 315 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

convex-billing

Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).

openclaw/clawhub · 29 tokens

cloudbase-wechat-integration

A guide for connecting CloudBase applications to WeChat services, including payments, official accounts, and user identity.

TencentCloudBase/CloudBase-AI-Toolkit · 94 tokens

commerce-app-business-config

Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…

adobe/skills · 80 tokens

baselinker-webhooks

Receive BaseLinker (Base.com) webhooks. Use when building a BaseLinker order or warehouse callback receiver, because BaseLinker is not a normal webhook source: deliveries arrive as HTTP HEAD requests with NO body, the entire payload is in the query string (observed params: orderid, state), there is NO signature…

hookdeck/webhook-skills · 131 tokens

tiktok-shop-webhooks

Receive and verify TikTok Shop webhooks. Use when setting up TikTok Shop webhook handlers, debugging Authorization-header signature verification, or handling events like ORDERSTATUSCHANGE, PACKAGEUPDATE, RECIPIENTADDRESSUPDATE, PRODUCTSTATUSCHANGE, or SELLERDEAUTHORIZATION.

hookdeck/webhook-skills · 59 tokens

gplay-purchase-verification

Server-side purchase verification for in-app products and subscriptions using Google Play Developer API. Use when implementing receipt validation in your backend.

hanamizuki/solopreneur · 32 tokens