Skip to content

Set up your coding assistant

An assistant that has never seen Mishmar will write a bot that holds an exchange key, treats a decision as a fill and sends prices as floats. The files on this page tell it the three things that matter (the bot holds no key, an order comes back with one of three verdicts, numbers are decimal strings) and where the docs are as Markdown. Each is a few lines. Add the one for your assistant to the bot’s repo.

The skill, which Claude Code loads on its own when a task touches Mishmar:

Terminal window
mkdir -p .claude/skills/mishmar && curl -fsSL https://raw.githubusercontent.com/mishmar-io/mishmar/main/skills/mishmar/SKILL.md -o .claude/skills/mishmar/SKILL.md

Or the plugin, which brings the same skill and the MCP server together, from inside Claude Code:

/plugin install mishmar --marketplace mishmar-io/mishmar

On a Claude Code older than 2.1.275 it is two steps: /plugin marketplace add mishmar-io/mishmar, then /plugin install mishmar@mishmar.

Either way, the snippet below also belongs in the repo’s CLAUDE.md, so it is read on every task, not only when the skill triggers.

A rule that applies to every file:

Terminal window
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/mishmar-io/mishmar/main/kit/mishmar.mdc -o .cursor/rules/mishmar.mdc

Codex, Copilot, Gemini CLI, Windsurf, Aider and the rest

Section titled “Codex, Copilot, Gemini CLI, Windsurf, Aider and the rest”

They read AGENTS.md. Append the snippet:

Terminal window
curl -fsSL https://raw.githubusercontent.com/mishmar-io/mishmar/main/kit/AGENTS.md >> AGENTS.md

This is what it says:

## Trading through Mishmar
This bot trades through [Mishmar](https://mishmar.io), a risk management layer for trading bots and AI agents: every order is checked against the owner's limits before it reaches the exchange, large orders wait for the owner's approval, and no key can trade alone.
- The bot holds no exchange key. Orders go through the Mishmar SDK's `Signer` (Python: `from mishmar import Signer`; TypeScript: `import { Signer } from "mishmar"`), which runs the agent's signer as a child process from `~/.mishmar/agent.json` (or the file named in `MISHMAR_AGENT_CONFIG`). Never put an exchange API key, an agent secret (`msk_…`) or the signer config into this repo, a log line or a prompt.
- An order comes back as a decision with a `verdict`: `allow`, `require_approval` or `block`. Handle all three. On `require_approval`, wait for the decision (`wait`) or carry on and read it later. On `block`, read the rule evaluations on the decision and do not resend the same order.
- Sizes and prices are decimal strings, never floats. Size and price from the venue rules the signer returns (`venue_rules` / `venueRules`: tick size, step size, minimums).
- Never call the exchange's order endpoints directly; every order goes through the signer. The signer and Mishmar each hold half of the trading key, so a direct call could not be signed anyway.
- `mishmar mcp` is the same signer as an MCP server, for an agent that is a language model.
- The setup steps, the rules and the API, as Markdown: https://docs.mishmar.io/llms.txt (all pages in one file: https://docs.mishmar.io/llms-full.txt). Example bots: https://github.com/mishmar-io/mishmar/tree/main/examples

If the Claude desktop app is installed, this link opens a new chat with the prompt filled in (nothing is sent until you press enter): Open in Claude.

The same prompt, for any assistant:

Read https://docs.mishmar.io/llms.txt, then help me set up a trading bot that trades through Mishmar on the hosted testnet: install the mishmar CLI, add a trading account and an agent, set the first rules, and write the bot with the Python SDK Signer.

A bot written in Python or TypeScript trades through the SDK’s Signer; the example bots are the place to start. An agent that is a language model gets its tools from the MCP server instead: Use Mishmar from Claude, Cursor or any MCP client.