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.
npx skills add mphinance/alpha-skills --skill order-lifecycle-safetygit clone --depth 1 https://github.com/mphinance/alpha-skillsWrote 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.
[](https://agentmods.dev/skills/mphinance/alpha-skills/order-lifecycle-safety)<a href="https://agentmods.dev/skills/mphinance/alpha-skills/order-lifecycle-safety"><img src="https://agentmods.dev/badge/skills/mphinance/alpha-skills/order-lifecycle-safety/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.
<a href="https://agentmods.dev/skills/mphinance/alpha-skills/order-lifecycle-safety"><img src="https://agentmods.dev/badge/skills/mphinance/alpha-skills/order-lifecycle-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.00810 |
| Opus 5.5 | $0.00029 | $0.00324 |
| Sonnet 5.5 | $0.00015 | $0.00162 |
| Haiku 4.5 | $0.00007 | $0.00081 |
Grade A, and why
order-lifecycle-safety 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 21d 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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Order Lifecycle Safety
Pure markdown. No dependencies, no code to install. These are the rules an order path must own itself; do not assume an external approval gate exists.
1. Unique client_order_id on every order
- Every order carries a
client_order_idgenerated by your code, once, before the first send. - It must be unique per intended order and stable across retries of that same order.
- Persist it (audit log) before sending, so a crash cannot lose it.
- Respect broker length/charset limits: see
references/broker-caveats.md.
2. Same terms vs different terms (REPLAY / ID_REUSED)
| Repeat of an existing id | Correct behaviour | Label |
|---|---|---|
| Same id, same terms | Return the first result; do not create a second order | REPLAY |
| Same id, different terms | Refuse; never mutate or resubmit under that id | ID_REUSED |
Implement this in your own layer (compare a hash of symbol, side, qty, type, price, TIF). Do not rely on the broker to do it; broker behaviour varies (see caveats).
3. Unknown outcome: reconcile before retry
A timeout, 5xx, dropped connection, or crash after send means the outcome is unknown, not failed.
- Mark the order
UNKNOWNin the audit log. - Look the order up by client id (or list recent orders and match).
- Found → adopt its status. Not found after the broker's lookup is known consistent → only then may you resend with the same client id.
- Lookup itself fails → stay
UNKNOWN, alert a human. Never blind-retry.
4. Audit before forward
- Decide (allow/refuse).
- Write the decision, with the client id and terms, to an append-only audit log before forwarding.
- Forward to the broker.
- If forwarding raises or times out, append
UNKNOWN(notFAILED) and go to section 3. - Redact credentials from log lines.
If the audit write fails, do not forward: fail closed.
5. Environment-proof preflight
Never infer paper vs live from config, env var names, base URLs, or account-number shape. Config can be wrong or edited.
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.
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.
- 21d ago First seen · 64 lines · 73 tokens per session scan A bd4afc38aa8e
order-lifecycle-safety is a skill published in the GitHub repository mphinance/alpha-skills (34 stars, last pushed 22d ago), licensed MIT. It adds 73 tokens to every session and 810 once invoked, about $0.0003 per session on Opus 5.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-11-13.
order-lifecycle-safety compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| order-lifecycle-safetymphinance/alpha-skills | Skill | 34 | 22d ago | MIT | A | 73 | Claude Code |
| sector-rotationHKUDS/Vibe-Trading | Skill | 40k | yesterday | MIT | A | 39 | Claude Code, Codex |
| strategy-pivot-designertradermonty/claude-trading-skills | Skill | 9.7k | yesterday | MIT | A | 28 | Claude Code, Codex |
| twitter-readerhimself65/finance-skills | Skill | 3.6k | 1mo ago | MIT | A | 110 | Claude Code |
| energy-procurementhashgraph-online/awesome-codex-plugins | Skill | 1.6k | yesterday | Apache-2.0 | A | 93 | Claude Code, Codex |
| airdrop-hunting-guidenirholas/three.ws | Skill | 289 | today | Apache-2.0 | A | 54 | Claude Code, Codex |
| cim-teardownmicrosoft/cat-agent-skills | Skill | 124 | today | MIT | A | 139 | Claude Code, Codex |