Finance & Investment Banking crypto-tradingperpetual-futuresdexmarket-datapaper-tradingorder-executionpython

Lighter Agent Kit

An Agent Skill that lets AI agents query market data and execute trades on Lighter and Robinhood Lighter perpetual and spot markets.

FollowSkills review · FSRS-2.0
Use with care
57/ 100 5-point scale 2.9 / 5
1 2 3 4 5 6
1Trust16 / 25 · 3.2/5

SKILL.md clearly separates reads/writes, forbids echoing credentials, marks close_all/account mode/withdraw as high-risk requiring explicit user approval, refuses cross-account transfers and key rotation, and provides paper.py risk-free simulation plus rollback notes (rm -rf .vendor). Deductions: writes sign and broadcast immediately and are irreversible; least privilege relies on the host agent's tool approval rather than in-skill enforcement; first call pulls pinned lighter-sdk from PyPI/GitHub, so supply-chain trust rests on pinning rather than auditable code.

2Reliability10 / 20 · 2.5/5

Docs are self-consistent: uniform JSON error envelope, --help everywhere, bootstrap diagnostic, health.py self-check, and committed offline tests covering paper state serialization/corruption recovery, symbol cache, and trade orchestration with specific error messages. Deductions: static review executed nothing, no CI workflow in evidence, live write-path failure feedback against the real API is inferable only from docs.

3Adaptability11 / 15 · 3.7/5

Triggers are explicit (Lighter/zkLighter/perps/positions/PnL), with clear platform support, claude.ai sandbox limits, symbol conventions, and non-fit boundaries. Deductions: core function depends entirely on overseas services (pypi.org, github.com, Lighter hosts) with no mainland-China reachability notes or fallbacks.

4Convention10 / 15 · 3.3/5

Well-layered docs: concise SKILL.md, references/ for schemas, README with install and command index, MIT license, release-based versioning, disclaimer. Deductions: no CHANGELOG, maintenance responsibility and update path only implicit, publisher unverified, references/ contents not provided in this review.

5Effectiveness6 / 15 · 2.0/5

Clear goal (AI agents querying and trading on Lighter), human-unit parameters, precision echoback, swappable paper/live engines support real marginal value. Deductions: static review cannot verify outputs are directly usable, and comparative-benefit evidence is limited.

6Verifiability4 / 10 · 2.0/5

Repo includes offline tests for key paths (paper accounting, state recovery, symbol cache, trade orchestration) and reproducible sanity-check commands. Deductions: no CI evidence in files, tests not executed, no third-party corroboration; claims beyond static audit (platform support, install timing) unverifiable.

Evidence confidence:Low Reviewed Sep 10, 2026 Reviewed revision 9798b37230d6
Before you use it
  • The skill executes real, irreversible crypto orders/withdrawals/transfers — validate on testnet or paper.py first and never auto-grant funded API keys without explicit approval.
  • Core function depends on pypi.org, github.com and overseas Lighter hosts; mainland-China network reachability is unaddressed, and claude.ai sandbox needs expanded egress allowlist.
  • Account-wide operations (order close_all, account mode, account collateral) are extremely high risk; the non-preview forms must receive per-call explicit user confirmation.
  • Publisher is unverified by the FollowSkills registry and dependencies install from PyPI/GitHub at first run — audit requirements.lock and the pinned lighter-sdk before live funds.
Review evidence [1][2][3][4][5][6][7][8]
See the full review method →

What does this skill do, and when should you use it?

Lighter Agent Kit packages the full trading surface of the Lighter DEX into three Python scripts for AI agents: query.py for market data and account reads, trade.py for signed writes (orders, cancels, leverage, withdrawals), and paper.py for local simulation against live order-book snapshots. It works identically across Lighter mainnet/testnet and the Robinhood Chain deployments, with every command following `<group> <action>` syntax and emitting structured JSON. Public market reads need no credentials; account-private reads and writes require a Lighter API key. It suits crypto and quant traders who already have a Lighter account and want to manage positions through natural language in agents like Claude Code.

Reads order books, recent fills, OHLCV candles (1m–1d), funding rates, market metadata, and account balances/positions; executes limit and market orders (with reduce_only, post_only, a default 1% slippage budget), order modification, single cancels, cancel_all, close_all position flattening, leverage and isolated-margin changes, unified-margin mode and per-asset collateral toggles, plus self-directed perp/spot bucket transfers and withdrawals. Writes auto-scale human-unit prices/amounts to integer ticks/lots and echo effective_amount/effective_price. paper.py simulates market and IOC orders against real book snapshots locally — perps only, no credentials, no broadcast.

  1. A crypto trader asking an agent in plain language which perp has the tighter spread, BTC or ETH, then placing an order without leaving the chat
  2. A quant validating a momentum strategy risk-free on paper.py against live order-book snapshots before going live
  3. A portfolio monitor pulling portfolio performance and funding rates on a schedule, flagging rates above an annualized threshold
  4. A user active on both Lighter and Robinhood Lighter operating both deployments with identical commands via LIGHTER_HOST
  5. A trader cleaning up an account in bulk with cancel_all or a previewed close_all

What are this skill's strengths and limitations?

Pros
  • Comprehensive coverage: market data, orders, leverage, margin, transfers, and withdrawals in one skill; public reads are fully credential-free
  • paper.py simulates against real order-book snapshots with no keys and no broadcast, enabling risk-free strategy rehearsal
  • All output is structured JSON with a uniform {"error": ...} envelope — easy for agents and scripts to parse
  • One environment variable switches between Lighter/Robinhood Lighter and mainnet/testnet
  • Dependencies pinned by requirements.lock and vendored inside the skill folder; uninstall is just removing the .vendor directory
Limitations
  • No Intel Mac support (darwin-x86_64); platforms limited to macOS arm64 and Linux x86_64/arm64
  • claude.ai's sandbox has no persistent shell for env vars, making account-private reads effectively unusable there; its default egress allowlist also excludes github.com
  • Paper mode has real structural limits: no maker fills, no book impact, no funding accrual, cross-margin only, perps only, market/IOC only — paper and live PnL will diverge
  • Sub-account routing, cross-account transfers, and API key rotation are deliberately unsupported (rotation needs an ETH private key and is high-risk)
  • Withdrawals are not instant wallet credits — they pass through Lighter's pending/claim flow; no test suite is mentioned in the source

How do you install this skill?

One-line install: curl -fsSL https://github.com/elliottech/lighter-agent-kit/releases/latest/download/install.sh | bash — it detects your platform (macOS arm64, Linux x86_64/arm64), installs Python if needed, and registers the skill with your chosen agents; restart your agent session. Manual: git clone https://github.com/elliottech/lighter-agent-kit ~/.agents/skills/lighter-agent-kit, then symlink for Claude Code at ~/.claude/skills/lighter-agent-kit/ (or project-scoped under .claude/skills/). lighter-sdk auto-vendors on first call. For writes, generate a key at app.lighter.xyz/apikeys and run ./lighter-config to write ~/.lighter/lighter-agent-kit/credentials, or export LIGHTER_API_PRIVATE_KEY / LIGHTER_ACCOUNT_INDEX / LIGHTER_API_KEY_INDEX.

How do you use this skill?

Trigger with natural language, e.g. "List current funding rates and flag anything above 10% annualized" or "Place a limit buy for 0.01 ETH at $50 under the current mid." Or run scripts directly: python3 scripts/query.py market book BTC --limit 10, python3 scripts/trade.py order limit BTC --side long --amount 0.01 --price 60000, python3 scripts/paper.py init && python3 scripts/paper.py order market BTC --side long --amount 0.1. Symbols: bare tickers for perps (BTC), /-separated pairs for spot (ETH/USDC) — no --market_type needed. High-impact commands (close_all, account mode, account collateral) require --preview / account inspection and explicit user approval first.

FAQ

Does it cost anything or need API keys?
The skill is free and MIT-licensed. Public market reads need no credentials at all; only account-private reads (positions, PnL, orders) and write commands require a Lighter API private key, account index, and key index.
Is live order placement safe? What stops mistakes?
Write commands sign and broadcast immediately and are irreversible. The skill mandates that high-impact commands (close_all, account mode, account collateral) require --preview or account inspection plus explicit user approval first; Claude Code's per-tool approval prompt is an additional gate. Rehearse on testnet or paper mode first.
Will it run on my machine?
You need Python 3.9+ on macOS arm64 or Linux x86_64/arm64; Intel Macs are explicitly unsupported. First call installs the SDK in ~15–40s, later calls are instant. claude.ai sandbox users must expand the egress allowlist and cannot use account-private reads.
Can it move funds to another account or rotate my API key?
No. Sub-account routing, transfers to arbitrary destinations, and API key rotation are intentionally excluded — these are deemed too risky for unsupervised LLMs, and the docs direct users to the web or mobile interface instead.

Related skills