market-microstructure-traditional

market-microstructure-traditional is a skill for Claude Code from agiprolabs/claude-trading-skills. It costs 40 tokens per session (2,805 once invoked), scanned A, original, MIT.

An introduction to market microstructure—the study of how buy and sell orders become trades and set prices—applied to cryptocurrency markets.

In plain words
What is it for?
It helps analyse order books, compare centralised exchanges with automated-market-maker exchanges, evaluate trade execution and understand market-making risks.
Why use it?
It explains the trading costs and risks hidden behind a quoted price, including the bid-ask spread, price impact, informed traders and market-maker inventory.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the trading-skills plugin — 68 skills shipped together

not rated 356repo +10 9d ago A scan Socket: passSnyk: passSkillSpector: pass 40 tokens original MIT

Good fit It helps analyse order books, compare centralised exchanges with automated-market-maker exchanges, evaluate trade execution and understand market-making risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agiprolabs/claude-trading-skills/market-microstructure-traditional
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 agiprolabs/claude-trading-skills --skill market-microstructure-traditional
Clone the repo
git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills

Made for: Claude Code.

Or install trading-skills, the plugin that ships this one along with the rest of its 68 skills.

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 market-microstructure-traditional

README.md
[![agentmods](https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional/github.svg)](https://agentmods.dev/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional)
Your own site
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional/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.

agentmods 80×15 button for market-microstructure-traditional

Your own site · 80×15
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/market-microstructure-traditional.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,805 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. Third-party audits
  • Socket pass 21 Mar 2026
  • Snyk pass 21 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.02805
Opus 5 $0.00020 $0.01403
Sonnet 5 $0.00008 $0.00561
Haiku 4.5 $0.00004 $0.00281

Measured 13d ago against content hash 0164b87caa8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

market-microstructure-traditional 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 13d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/market_maker_sim.py, scripts/spread_analysis.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.

skills/market-microstructure-traditional/SKILL.md · 366 lines

How it starts

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

Market Microstructure (Traditional)

Market microstructure studies how orders become trades and how trades become prices. Understanding these mechanics is essential for execution optimization, market making, and detecting informed flow. This skill covers limit order book (LOB) theory as applied to crypto markets on centralized exchanges, and compares LOB mechanics to the AMM-based structure of DEXes.

Core Concepts

Concept What It Tells You
Bid-ask spread Cost of immediacy — how much you pay to trade now vs later
Price impact How your order moves the market price
Order book imbalance Short-term directional predictor from queue sizes
Adverse selection Risk of trading against informed counterparties
Inventory risk Market maker exposure from accumulated positions
Execution quality How well your fills compare to a benchmark

Bid-Ask Spread Decomposition

The bid-ask spread is not a single thing. It decomposes into three components (Roll, 1984; Glosten & Harris, 1988):

  1. Adverse selection — compensation for trading against informed traders
  2. Inventory holding — compensation for carrying risk
  3. Order processing — fixed costs of providing liquidity (fees, infrastructure)

Spread Measures

# Quoted spread: what you see on the order book
quoted_spread = best_ask - best_bid
quoted_spread_bps = (best_ask - best_bid) / midprice * 10_000

# Effective spread: what you actually pay (accounts for price improvement)
effective_half_spread = abs(trade_price - midprice_at_trade)
effective_spread_bps = effective_half_spread / midprice_at_trade * 10_000

# Realized spread: market maker's actual profit (after price moves)
# Measured at trade_price vs midprice N seconds later
realized_spread = trade_sign * (trade_price - midprice_after_delay)

The effective spread matters most for execution quality. The difference between effective and realized spread measures adverse selection — what the market maker loses to informed flow.

Read the full file on GitHub · 366 lines

Files

What ships with it

5 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.

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. 13d ago First seen · 366 lines · 40 tokens per session scan A 0164b87caa8b

Subscribe to this mod's changes

market-microstructure-traditional is a skill published in the GitHub repository agiprolabs/claude-trading-skills (356 stars, last pushed 9d ago), licensed MIT. It adds 40 tokens to every session and 2,805 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-30.

Related

Other skills, from other repositories

stockbee-setup-fluency-trainer

Build a Stockbee-style setup model book from momentum-burst screener candidates, then update 3-day and 5-day forward outcomes with MFE/MAE, stop-hit status, outcome tags, and cohort statistics. Use when the user wants to study Stockbee Momentum Burst examples, track failed candidates, build setup fluency, review A/B…

tradermonty/claude-trading-skills · 98 tokens

trading-manual-writer

A writing skill for creating sections of a trading manual for beginners and individual investors. It explains financial instruments or trading topics in Markdown and can include SVG illustrations.

digoal/blog · 185 tokens

common-sense-index-investing-bogle

Apply John Bogle index investing rules for low-cost funds, asset allocation, fees, taxes, ETFs, advisers, and buy-hold discipline.

simbajigege/book2skills · 38 tokens

paper-trading

Risk-free trading simulation with real market data. Test strategies without risking real money.

Signal-Execution-Labs/forex-trading-ai-agent · 0 tokens

market-replay

Replay historical market data in real-time or accelerated speed. Practice trading, test strategies, and learn from past market events without risking capital.

Signal-Execution-Labs/forex-trading-ai-agent · 0 tokens

finance-econ-literacy

A Korean-language guide to understanding economic indicators such as interest rates, exchange rates, inflation, GDP, employment, and trade. It explains how these figures can affect loans, savings, investments, and spending.

modu-ai/moai-cowork · 128 tokens