opentdx-engineering
Skill4 starsChanged 4 months agoMITView on GitHub
Engineering guide for opentdx and tdx_mcp work. Use when Codex needs to debug or extend 通达信/opentdx protocol parsers, bitmap fields, msg_id registries, TS parser alignment, MCP serialization bugs, quote server behavior, FastAPI/Next.js viewer integration, or direct TdxClient tooling. Not for ordinary stock trading analysis.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- report-generationSkill
- visualizationSkill
- data-cleaningSkill
- code-review-financeSkill
- doc-generationSkill
- gelan-trinity-tradingSkill
- query-skillsSkill
- new-skillSkill
- backtest-strategySkill
- evf-stock-skillSkill
- market-dataSkill
- portfolio-riskSkill
- strategy-developmentSkill
- technical-analysisSkill
- yanchixia-short-termSkill
- yeren-trading-systemSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill for finance data infrastructure work, not trading decisions.
- Very specific: line 12
If the user asks for market analysis, use evf-stock-skill instead.
- Distinctive: line 36
Prefer reproducing with the smallest parser, msg_id, and market/code pair that shows the mismatch.
- Distinctive: line 38
When comparing Python and TypeScript parsers, verify request byte length, msg_id, customize fields, compression flag, response frame …
- Distinctive: line 40
Do not assume a quote server failure is a parser bug.
- Distinctive: line 42
When a live quote call is unstable, preserve the raw request, raw response length, hex preview, parser name, market, code, server, and …
- Distinctive: line 58
Keep trading recommendations out of this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenTDX Engineering
Scope
Use this skill for finance data infrastructure work, not trading decisions. It covers opentdx parser architecture, binary protocol reverse engineering, MCP tool behavior, TypeScript parser alignment, and viewer/gateway integration.
If the user asks for market analysis, use evf-stock-skill instead. If the user asks why a quote/K-line/tool/parser is wrong, times out, returns null, serializes badly, or disagrees with another implementation, use this skill.
Routing
For opentdx architecture, bitmap presets, unified interface design, client adaptation, or known parser bugs, read:
references/legacy-opentdx-architecture.mdreferences/trading-system-stack.mdreferences/tdx-board-symbols.md
For binary protocol reverse engineering, unknown bitmap bits, msg_id mapping, or cross-market field discovery, read:
references/legacy-protocol-reverse-engineering.mdreferences/msg-id-registry.md
For TypeScript parser parity, test alignment, or parser audit tasks, read:
references/ts-parser-alignment-checklist.mdreferences/ts-parser-audit-2026-05-17.mdreferences/ts-project-structure.md
For web viewer, FastAPI gateway, URLSearchParams, polling, or frontend integration, read:
references/trading-system-stack.mdreferences/opentdx-viewer-integration.md
Engineering Rules
Prefer reproducing with the smallest parser, msg_id, and market/code pair that shows the mismatch.
When comparing Python and TypeScript parsers, verify request byte length, msg_id, customize fields, compression flag, response frame layout, and final decoded field offsets before renaming fields.
Do not assume a quote server failure is a parser bug. Separate network timeout, server incompatibility, empty-market response, serialization failure, and true decode mismatch.
When a live quote call is unstable, preserve the raw request, raw response length, hex preview, parser name, market, code, server, and timestamp. These become regression fixtures.
For MCP serialization bugs, document both the user-facing tool parameters and the underlying TdxClient call. Many failures come from int/string coercion, list schema shape, or batch mode instability.
Output
Lead with a diagnosis:
问题类型: parser / transport / MCP serialization / server data / test expectation
复现: command or tool call
证据: raw bytes, field offset, error text, comparison result
修复: minimal code or test change
回归: exact test or fixture to addKeep trading recommendations out of this skill. When infrastructure work changes data semantics used by trading workflows, update the trading skill references afterward.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

