agentleFS
qunyou-agentqunyou-agent/finance-skills/skills/development/opentdx-engineering/SKILL.md

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.

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
  1. Distinctive:

    Use this skill for finance data infrastructure work, not trading decisions.

    line 10
  2. Very specific:

    If the user asks for market analysis, use evf-stock-skill instead.

    line 12
  3. Distinctive:

    Prefer reproducing with the smallest parser, msg_id, and market/code pair that shows the mismatch.

    line 36
  4. Distinctive:

    When comparing Python and TypeScript parsers, verify request byte length, msg_id, customize fields, compression flag, response frame …

    line 38
  5. Distinctive:

    Do not assume a quote server failure is a parser bug.

    line 40
  6. Distinctive:

    When a live quote call is unstable, preserve the raw request, raw response length, hex preview, parser name, market, code, server, and …

    line 42
  7. Distinctive:

    Keep trading recommendations out of this skill.

    line 58

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.md
  • references/trading-system-stack.md
  • references/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.md
  • references/msg-id-registry.md

For TypeScript parser parity, test alignment, or parser audit tasks, read:

  • references/ts-parser-alignment-checklist.md
  • references/ts-parser-audit-2026-05-17.md
  • references/ts-project-structure.md

For web viewer, FastAPI gateway, URLSearchParams, polling, or frontend integration, read:

  • references/trading-system-stack.md
  • references/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 add

Keep trading recommendations out of this skill. When infrastructure work changes data semantics used by trading workflows, update the trading skill references afterward.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.