market-microstructure

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

A way to study the sequence, size, and direction of trades on decentralised exchanges. These exchanges use liquidity pools rather than order books, so the trade history helps reveal buying pressure, selling pressure, large traders, and suspicious activity.

In plain words
What is it for?
Use it to classify buys and sells, measure volume and buyer pressure, detect whale activity, track flow momentum, and look for wash trading or bot patterns in Solana tokens.
Why use it?
It turns raw swap activity into clues about who is trading and how the market is moving. This is useful where traditional order-book measures such as queue position are unavailable.

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: warnSkillSpector: warn 26 tokens original MIT

Good fit Use it to classify buys and sells, measure volume and buyer pressure, detect whale activity, track flow momentum, and look for wash trading or bot patterns in Solana tokens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agiprolabs/claude-trading-skills/market-microstructure
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
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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/market-microstructure"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/market-microstructure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,770 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 warn 21 Mar 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 61
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
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.00026 $0.02770
Opus 5 $0.00013 $0.01385
Sonnet 5 $0.00005 $0.00554
Haiku 4.5 $0.00003 $0.00277

Measured 13d ago against content hash 65d5b86cdf96, 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 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/trade_flow_analysis.py, scripts/volume_profile.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/SKILL.md · 310 lines

How it starts

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

Market Microstructure — DEX Orderflow Analysis

Overview

Market microstructure on Solana DEXes differs fundamentally from traditional finance. There are no orderbooks on AMMs — every trade is a swap against a liquidity pool. Yet trade flow analysis remains powerful: the sequence, size, and direction of swaps reveal accumulation, distribution, whale activity, and wash trading patterns.

This skill covers:

  • Trade classification — identifying buys vs sells from swap direction
  • Volume profiles — time-based and size-based breakdowns
  • Buyer/seller pressure — ratio metrics, net flow, trade count asymmetry
  • Trade size distribution — whale detection, retail vs institutional flow
  • Flow momentum signals — acceleration, volume spikes, composite scores
  • Token velocity — turnover rate as a sentiment proxy
  • Wash trading detection — spotting fake volume and bot patterns

Why Microstructure Matters on DEXes

On CEXes, microstructure means orderbook depth, bid-ask spread, and queue position. On AMMs, liquidity sits in pool curves — there is no spread or queue. But the trade tape (the chronological list of swaps) contains rich signal:

  1. Who is trading? — Whale wallets vs retail, smart money vs bots
  2. How are they trading? — Large single swaps vs DCA-style splits
  3. When are they trading? — Volume clustering around events or time zones
  4. What direction? — Net buy vs sell pressure over sliding windows

These signals feed into entry/exit timing, position sizing, and token quality scoring.

Trade Classification

Buy vs Sell Identification

On Solana DEXes, every swap has an input token and output token:

Swap Direction Classification Meaning
SOL → Token Buy Trader spending SOL to acquire token
USDC → Token Buy Trader spending stables to acquire token
Token → SOL Sell Trader converting token back to SOL
Token → USDC Sell Trader converting token to stables
Token A → Token B Context-dependent Classify based on which token you're analyzing

Read the full file on GitHub · 310 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 · 310 lines · 26 tokens per session scan A 65d5b86cdf96

Subscribe to this mod's changes

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