aftermath-perpetuals

aftermath-perpetuals is a skill for Claude Code, Codex from clawd-aftermath/nunchi-for-aftermath. It costs 41 tokens per session (1,700 once invoked), scanned A, original, MIT.

A guide for connecting applications to Aftermath Perpetuals, a platform for perpetual futures trading, using its native API, compatible endpoints, or TypeScript SDK.

In plain words
What is it for?
Use it when integrating Aftermath trading features, handling perpetuals or compatible exchange endpoints, using the SDK, or implementing related monitoring and safeguards.
Why use it?
It helps developers choose the appropriate integration path and locate guidance for API errors, trading safeguards, orders, staking, pools, and prices.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/clawd-aftermath/nunchi-for-aftermath/api
Any agent
npx skills add clawd-aftermath/nunchi-for-aftermath --skill api
Clone the repo
git clone --depth 1 https://github.com/clawd-aftermath/nunchi-for-aftermath

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 aftermath-perpetuals

README.md
[![agentmods](https://agentmods.dev/badge/skills/clawd-aftermath/nunchi-for-aftermath/api.svg)](https://agentmods.dev/skills/clawd-aftermath/nunchi-for-aftermath/api)
Your own site
<a href="https://agentmods.dev/skills/clawd-aftermath/nunchi-for-aftermath/api"><img src="https://agentmods.dev/badge/skills/clawd-aftermath/nunchi-for-aftermath/api.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,700 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.01700
Opus 5 $0.00020 $0.00850
Sonnet 5 $0.00008 $0.00340
Haiku 4.5 $0.00004 $0.00170

Measured 4d ago against content hash f2d0bcb48b53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

aftermath-perpetuals 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check_api_changes.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

AFTERMATH_SKILLS_REF/skills/api/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Aftermath Perpetuals Skill

Production OpenAPI: https://aftermath.finance/api/openapi/spec.json Last validated: 2026-07-28 Canonical docs UI: https://aftermath.finance/docs

Fast Routing

Choose one file first; do not load everything by default.

Default preference: start with native perpetuals endpoints (/api/perpetuals/*) because they expose the full Aftermath feature set. Use CCXT endpoints when you specifically need exchange-style compatibility.

  1. CCXT endpoint work -> ccxt.md
  2. Native perpetuals endpoint work -> native.md
  3. SDK method usage -> sdk-reference.md
  4. API failures/retries -> error-handling.md
  5. Trading safeguards -> safety-and-risk.md
  6. DCA and spot limit orders -> dca-and-limit-orders.md
  7. Staking -> staking.md
  8. AMM pools -> pools.md
  9. Coin and LP prices -> prices.md
  10. Builder codes/gas pool/referrals/rewards/rebates/router/metastable/birdeye/dynamic gas/zkLogin/coins -> auxiliary-endpoints.md
  11. Monitoring examples -> monitoring-patterns.md
  12. Edge-case pitfalls -> gotchas.md

Integration Modes

Preferred by default: Native perpetuals (/api/perpetuals/*) for complete API coverage.

Mode Best for Primary file
CCXT compatibility (/api/ccxt/*) Exchange-style payloads and build-sign-submit bots ccxt.md
Native perpetuals (/api/perpetuals/*) Full account/vault previews + tx builders native.md
TypeScript SDK (@aftermath-finance/sdk) Typed app integrations sdk-reference.md

High-Risk Guardrails

  • Sign signingDigest, not transactionBytes.
  • Keep ID types strict: CCXT write accountId (object ID) vs native accountId (numeric).
  • Send native BigInt fields using their exact "...n" wire format where required.
  • Treat preview responses as success/error unions.
  • Re-sync snapshots after stream reconnect before applying deltas.
  • Serialize coin/gas-object-sensitive operations to avoid version conflicts.

Recent API Updates

Breaking (v3.0.0):

Read the full file on GitHub · 118 lines

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. 4d ago First seen · 118 lines · 41 tokens per session scan A f2d0bcb48b53

Subscribe to this mod's changes

aftermath-perpetuals is a skill published in the GitHub repository clawd-aftermath/nunchi-for-aftermath (2 stars, last pushed 16d ago), licensed MIT. It adds 41 tokens to every session and 1,700 once invoked, about $0.0002 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.