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.
npx agentmods add instructions/longbridge/longbridge-terminal/claude-mdgit clone --depth 1 https://github.com/longbridge/longbridge-terminalWrote 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.
[](https://agentmods.dev/instructions/longbridge/longbridge-terminal/claude-md)<a href="https://agentmods.dev/instructions/longbridge/longbridge-terminal/claude-md"><img src="https://agentmods.dev/badge/instructions/longbridge/longbridge-terminal/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03071 | $0.03071 |
| Opus 5 | $0.01536 | $0.01536 |
| Sonnet 5 | $0.00614 | $0.00614 |
| Haiku 4.5 | $0.00307 | $0.00307 |
Grade A, and why
longbridge-terminal CLAUDE.md 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 6d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
A Rust-based CLI (longbridge) that wraps every Longbridge OpenAPI endpoint for scripting, AI-agent tool-calling, and daily trading workflows. Also ships a full-screen TUI for interactive market monitoring.
Core Architecture
Tech Stack
- UI Framework: Ratatui (v0.30) - TUI rendering
- Async Runtime: Tokio (v1.33+) - Async I/O
- ECS Framework: Bevy ECS (v0.11) - Entity-Component-System architecture
- Market SDK: longbridge - Longbridge OpenAPI Rust SDK, tracked as a git dependency on
longbridge/openapimain(dependency alias:longbridge-sdk)
Check Cargo.toml / Cargo.lock rather than this list before relying on a version.
- State Management: DashMap, Atomic, RwLock - Thread-safe global state
Key Modules
1. src/auth.rs - Auth utilities
clear_token()- Clear stored OAuth token (logout). Deletes token file used by the SDK.- OAuth and token refresh are handled by the longbridge SDK: use
longbridge::oauth::OAuthBuilderinopenapi::context::init_contexts(). Token is loaded from~/.longbridge/openapi/tokens/<client_id>or browser flow is started; the SDK auto-refreshes the token. - Local callback server: default port
60355(configurable viaOAuthBuilder::callback_port())
2. src/openapi/ - OpenAPI Integration Layer
context.rs- Global context managementinit_contexts()- Initialize QuoteContext and TradeContext with OAuth token, returns WebSocket receiverquote()- Get global QuoteContext (for quotes, subscriptions)trade()- Get global TradeContext (for trading operations)- Uses
OnceLockfor global singleton
3. src/data/ - Data Layer
types.rs- Base type definitionsCounter- Stock identifier (format:700.HK,AAPL.US)TradeStatus,Currency,Market- Enum typesQuoteData,Candlestick,Depth- Market data structures
stock.rs- Stock data structureupdate_from_quote()- Update from longbridge quoteupdate_from_depth()- Update from longbridge depth
stocks.rs- Global stock cache (based onDashMap)STOCKS- Global singleton, providesget(),mget(),insert(),modify()methods
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.
- 6d ago First seen · 289 lines · 3,071 tokens per session scan A 60b9211a7053
longbridge-terminal CLAUDE.md is an instructions file published in the GitHub repository longbridge/longbridge-terminal (994 stars, last pushed 2d ago), licensed Apache-2.0. It adds 3,071 tokens to every session, about $0.0154 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.
Other instructions, from other repositories
maverick-mcp AGENTS.md
AGENTS.md instructions for wshobson/maverick-mcp, covering repository guidelines, project overview, project structure, documentation map and build, test, and development commands.
InvestSkill copilot-instructions.md
Copilot instructions for yennanliu/InvestSkill, covering investskill — github copilot setup & usage guide, installation & setup, automatic setup, verify setup and core stock analysis (6 frameworks).
InvestSkill GEMINI.md
Gemini CLI instructions for yennanliu/InvestSkill, covering investskill — gemini cli setup & usage guide, installation & setup, quick start, navigate to the investskill directory and start gemini cli (loads gemini.md automatically).
unifly AGENTS.md
Instructions for hyperb1iss/unifly, covering agents.md, what this repository is, quick command reference, the canonical "before commit" gate and individual gates.
dartlab CLAUDE.md
Claude Code instructions for eddmpython/dartlab, covering dartlab 에이전트 진입 규칙, 정본 소유권, 시작 순서, 작업별 문서 지도 and 공통 안전 경계.
korean-dart-mcp CLAUDE.md
Claude Code instructions for chrisryugj/korean-dart-mcp, covering korean-dart-mcp 프로젝트 가이드, 구조, 설계 원칙, 1. corpcode 자동 해결 and 2. enum 으로 도구 폭발 방지.