Skip to main content

Agent Skills

Pre-built skills that teach an AI coding agent to use the Treasures APIs correctly.

Treasures' agent skills repository provides structured context that AI coding agents load when building on Treasures. Each skill is a SKILL.md file plus a set of reference documents: endpoint playbooks, signing code, first-time traps, error tables and rate limits, all written to be consumed by an agent rather than read by a person. Install a skill and your agent knows how to discover tokenized stocks, quote, sign, submit, poll and read holdings without you pasting API docs into a prompt.

The skills are the deep end of the Treasures documentation for agents. This site is the human-readable layer; the skills carry the detail an agent needs to execute.

Available skills​

treasures-b2b-api​

Build an agent on the public B2B API for a single end-user wallet pair. This is the starting point for any agent that holds or is granted the user's own wallet keys.

AreaWhat the skill covers
DiscoverGET /stocks/tickers and GET /stocks/prices: listings per chain, tradability warnings, live tradfi and on-chain prices, share multipliers
QuotePOST /quote/buy and POST /quote/sell: chain and protocol selection, priority: "speed", warnings[] and the acknowledgement token, quote TTLs
Sign and submitEvery signable payload type, the one-time ERC-20 approvals, POST /trade/submit, buy-one-leg versus sell-all-legs, broadcast_unknown handling
BridgePOST /bridge/quote and status polling, EVM and Solana sign-and-broadcast, the nonce=0 trap
ReadGET /portfolio, GET /trades, GET /settlements and GET /stocks/{ticker} with their semantics and caching
Ownership proofThe canonical challenge, base64 Ed25519 and EIP-191 signing, embedded-wallet pitfalls, test vectors
Errors and limitsThe HTTP error matrix with backoff policies, rate limits per endpoint, native gas floors, simulate-before-broadcast
VenuesRobinhood Chain (USDG-priced, sign-only), Base (supply-gated B20 tokens), the speed route with its cross-chain legs, sells that pay out on another chain (payout_chain), and the sponsored user-operation lane

Install:

npx skills add treasures-io/treasures-finance-agent-skills --skill treasures-b2b-api

treasures-wallet​

Operate a Treasures delegated wallet over HTTPS with only an API key. The agent never signs: Treasures signs as a delegated signer scoped strictly to tokenized-stock trades. No web3 libraries, no private keys, no RPC.

AreaWhat the skill covers
OnboardProvision a wallet and mint a scoped twk_ API key in one call; store the key once, it is never shown again
QuoteBuy and sell previews, including multi-leg sells split across venues
TradeAsync buys and sells with an Idempotency-Key, per-leg job polling, partial fills as a real outcome
ReadBalances, portfolio, trade history and P&L for the wallet
KeysScopes, caps, and what a revoked key looks like

Install:

npx skills add treasures-io/treasures-finance-agent-skills --skill treasures-wallet

Not sure which one you need? If the user brings their own wallet and your agent will sign with it, use treasures-b2b-api. If you want Treasures to hold and operate a wallet on the user's behalf behind an API key, use treasures-wallet.

How skills work​

Skills use the open Agent Skills format that the skills CLI installs for 70+ coding agents. Each skill is a SKILL.md file with structured frontmatter (name, description, metadata.version, tags) and Markdown content the agent loads as context, with longer reference files it reads on demand. Every skill is a plain folder you can read yourself.

When you install a skill it is added to your project or your agent's global skills directory, so your coding agent (Claude Code, Codex, Cursor, Copilot, Windsurf and others) can reference it when writing or running code. The agent uses the skill to pick the right endpoint, build correct requests, sign correctly and handle errors the way the API expects.

# Install both Treasures skills (requires Node.js)
npx skills add treasures-io/treasures-finance-agent-skills

# Target specific agents
npx skills add treasures-io/treasures-finance-agent-skills -a claude-code -a codex -a cursor

Claude Code users can also install the repo as a plugin marketplace:

/plugin marketplace add treasures-io/treasures-finance-agent-skills
/plugin install treasures-finance-agent-skills@treasures-finance-agent-skills

Prefer a manual copy? Clone the repo and drop skills/<name> into your agent's skills directory (for example ~/.claude/skills/).

skill.md​

This site also serves a machine-readable navigator at docs.treasures.io/skill.md. It is a short file that points an agent at the available skills and what each one does, for agents that discover capabilities from a docs URL rather than a package.

Versioning​

Each skill declares a metadata.version, and the API can read it. The treasures-b2b-api skill sends two request headers on every call:

X-Treasures-Skill: treasures-b2b-api
X-Treasures-Skill-Version: 1.16.0

They are optional on every route. A caller that omits them (a direct REST integration, an enterprise backend, a hand-written script) is a generic client: never gated, never blocked, never warned. Sending them opts the agent into early warning as the API evolves:

SignalMeaningWhat the skill does
X-Treasures-Skill-Latest response header, on every quote, trade and bridge responseThe published version of each skillTells the user once that an update exists. Never blocks or changes a trade decision
Deprecation, Sunset, Warning, Link response headersYour skill is ageing; Sunset is the date it stops working when one is publishedFinishes the current operation, then tells the user to update
426 skill_version_unsupported, before any fund movesYour skill is past its sunsetStops. Surfaces the response's upgrade command and does not retry or trade

No version is gated today; every release so far has been additive on the request, so an older skill keeps working. Releases are listed newest first in the repo's CHANGELOG, with entries that need action marked Action. The API Changelog on this site tracks the same surface from the API's side.

To update an installed skill, run the install command again, or /plugin marketplace update in Claude Code.

Contributing​

The skills repository is open source under the MIT licence. Open an issue or a pull request at treasures-io/treasures-finance-agent-skills to report a gap, improve a reference, or adapt a skill for your own use.