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/openapi/claude-mdgit clone --depth 1 https://github.com/longbridge/openapiWhat 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 | $0.01265 | $0.01265 |
| Opus 5 | $0.00633 | $0.00633 |
| Sonnet 5 | $0.00253 | $0.00253 |
| Haiku 4.5 | $0.00127 | $0.00127 |
Grade A, and why
openapi 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 2d 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 — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Guidelines
SDK layers — update ALL of them when adding/changing an API or type
This repo ships the SDK in six language layers. The Rust core is the source of truth; every other layer is a hand-written binding that mirrors it. When you add a new API endpoint, type, enum, or field, you must propagate the change to every layer below — it is easy to forget the C++ and Java layers, so treat this list as a checklist:
- Rust core (
rust/src/) — the source of truth. - C (
c/src/) — FFI structs (*Owned+ToFFI), enums,extern "C"fns. Headerc/csrc/include/longbridge.his auto-generated by cbindgen. - C++ (
cpp/) — wraps the C layer. Updatecpp/include/*.hpp(public types/methods),cpp/src/convert.hpp(C↔C++ conversions), andcpp/src/*_context.cpp. - Java (
java/) — JNI. Update the Rust JNI layer (java/src/*.rs) and the Java classes (java/javasrc/src/main/java/com/longbridge/). - Node.js (
nodejs/src/) — napi.index.d.ts/index.jsare auto-generated bynpm run build:debug. - Python (
python/src/) — PyO3. Keep the hand-maintained stubpython/pysrc/longbridge/openapi.pyiin sync.
After modifying Rust code
Run the following commands from the workspace root:
cargo clippy --all --all-features
cargo +nightly fmt --all
Note:
cargo +nightly fmtmay reflow doc comments (e.g./// @param …lines). Do not revert those changes — they are intentional formatting output and should be committed as-is.
After modifying the Node.js SDK (nodejs/)
Build the native .node binary from the nodejs/ directory:
npm run build:debug
nodejs/index.d.ts and nodejs/index.js are auto-generated by
npm run build:debug — never edit them by hand.
After updating the proto submodule (rust/crates/proto/openapi-protobufs/)
Run the following command from the workspace root to regenerate the Rust proto source files
(e.g. rust/crates/proto/src/longbridge.control.v1.rs,
rust/crates/proto/src/longbridge.quote.v1.rs,
rust/crates/proto/src/longbridge.trade.v1.rs):
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.
- 2d ago First seen · 119 lines · 1,265 tokens per session scan A b5b3d39a2e35
openapi CLAUDE.md is an instructions file published in the GitHub repository longbridge/openapi (450 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,265 tokens to every session, about $0.0063 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
rust-mcp-sdk CLAUDE.md
Instructions for paiml/rust-mcp-sdk, covering pmcp sdk development standards, toyota way quality system - zero tolerance for defects, quality gate enforcement, pre-commit quality gates (mandatory) and ci quality gates (pr-blocking, added phase 75 wave 5).
kitup AGENTS.md
Instructions for lathe-cli/kitup, covering agents.md, project boundary, product promise, source of truth and drift guards.
agentgateway copilot-instructions.md
Instructions for agentgateway/agentgateway: Do not check for, speculate about, or report compilation errors during code review. Compilation diagnostics from review are frequently incorrect; rely on CI to detect and report compilation failures.
mq commit.instructions.md
Instructions for harehare/mq: Use the following format for commit messages.
playwright-rust CLAUDE.md
Instructions for padamson/playwright-rust, covering claude.md, project, repository layout, skills (procedural reference) and documentation hierarchy.
flox AGENTS.md
AGENTS.md instructions for flox/flox, covering claude.md, project overview, development setup, already in dev shell (innixshell is set) — run directly and not in dev shell — wrap with nix develop -c.