Works with the AI Agents you already use

    CJK & HKEX Financial Filing Prep Toolkit

    by Wasabi hu

    1

    Zero-dependency Python toolkit to repair broken CJK/HKEX tables and CMap month glitches, rewrite bilingual finance/legal RAG queries into Elasticsearch/OpenSearch DSL, and audit corpus licenses offline.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    CJK & HKEX Financial Filing Prep Toolkit

    CJK & HKEX Financial Filing Prep Toolkit

    Example session with this skill installed

    Clean this extracted HKEX annual-report Markdown snippet (fix broken decimals, split table rows, accounting negatives, and "月→尸" CMap errors without touching forensic terms), then generate an Elasticsearch Bool DSL query comparing AURR and BORE 2025年 归母净利润 and 研发费用, and verify our corpus manifests before indexing.

    • Read your context and instructions
    • Compiled the cjk & hkex

    Summary

    Ran all three offline Python stdlib scripts on the synthetic Aurora Robotics Holdings Ltd. FY2025 extract, bilingual comparison query, and corpus manifests. Repaired 6 HKEX CMap month glitches, merged 1 split Markdown table row, fixed 3 broken numeric/accounting wraps (preserving forensic terms untouched), generated a cross-standard Elasticsearch/OpenSearch Bool DSL payload, and verified commercial-safe license compliance.

    Stage 1 — Repaired HKEX Filing & Verification Stats

    CheckBeforeAfter
    Fiscal period CMap2025年12尸31日止十二個尸2025年12月31日止十二個月
    Split decimal + %18.\n5\n%18.5%
    Accounting negative(\n12,450.5\n) / ( 45.20 )(12,450.5) / (45.20)
    Wrapped table row1,280. + next row 451,280.45
    Forensic negative control法医尸检报告 / 尸体鑑定費用Unchanged (0 false positives)
    {
      "version": "1.0.0",
      "mode": "all",
      "stats": {
        "tables_seen": 1,
        "cells_repaired": 6,
        "multiline_rows_merged": 1,
        "numeric_fixes": 3,
        "cmap_fixes": 6,
        "changed": true
      }
    }
    

    Stage 2 — Bilingual Financial Query Expansion & Multi-Ticker DSL

    • 2025年 expanded to ["2025年", "2025年度", "二零二五年", "二零二五年度", "二〇二五年"]
    • 归母净利润 mapped to ["歸屬於上市公司股東的淨利潤", "股東應佔溢利", "本公司權益持有人應佔溢利", "net income attributable", "net profit attributable"]
    • 研发费用 mapped to ["研發費用", "研發開支", "研发支出", "research and development"]
    • Multi-ticker comparison: AURR and BORE grouped into bool.should (minimum_should_match: 1) so chunks discussing either issuer are recalled instead of requiring both in one paragraph.

    Stage 3 — Corpus License Audit Gate

    {
      "version": "1.0.0",
      "ok": true,
      "audited": 2,
      "passed": [
        { "slug": "aurora-open-samples", "mode": "pack", "license": "Apache-2.0" },
        { "slug": "aurora-hkex-disclosure", "mode": "recipe", "license": "HKEX-Public-Disclosure" }
      ],
      "violations": []
    }
    

    Next steps

    • Pass --output clean.md to fix_cjk_tables.py only when ready to save cleaned filings without overwriting source files.
    • Send the generated DSL JSON directly to your Elasticsearch or OpenSearch _search endpoint (add --no-require-bigrams if a strict query returns zero hits).
    • Run audit_corpus_license.py --dir corpora/ in CI to block NOASSERTION, -NC, -ND, AGPL/GPL, short Git SHAs, path traversal, and non-public URLs.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Financial and regulatory RAG pipelines frequently break when PDF-to-Markdown extraction splits decimals across lines, fragments accounting parentheses, or triggers HKEX font CMap glitches where "月" (month) extracts as "尸". Even after cleaning, single-language search misses cross-border disclosures written in Mainland Simplified Chinese, Hong Kong Traditional Chinese, and English GAAP/IFRS terminology.

    This skill ships three standalone, zero-dependency Python 3.11+ scripts that fix all three bottlenecks deterministically and completely offline.

    What it does

    • Repairs extracted CJK & HKEX financial Markdown (scripts/fix_cjk_tables.py): Merges hard-wrapped decimals (1,280.\n45 -> 1,280.45), thousand separators, split accounting negatives ((\n45.20\n) -> (45.20)), detached percent signs, and continuation pipe-table rows without altering figures or column counts.
    • Fixes HKEX ToUnicode CMap month glitches with forensic guards: Strict context-aware whitelist rules restore corrupted date phrases (2025年12尸31日 -> 2025年12月31日, 十二個尸 -> 十二個月, 每尸活躍 -> 每月活躍) while preserving non-date terms (法医尸检报告, 尸体) with zero false positives.
    • Rewrites bilingual financial & legal queries (scripts/rewrite_bilingual_query.py): Applies phrase-aware Simplified-to-Traditional disambiguation (注册制 -> 註冊制, 制造业 -> 製造業, 附注 -> 附註), expands cross-standard accounting terms (归母净利润 / 股東應佔溢利 / net income attributable), converts Arabic and Chinese statute clauses & fiscal years (第128条 ↔ 第一百二十八條, 2025年 ↔ 二零二五年), and generates ready-to-run Elasticsearch / OpenSearch Bool DSL (including multi-ticker bool.should comparisons).
    • Audits RAG corpus manifests before ingestion (scripts/audit_corpus_license.py): Enforces commercial-safe license allowlists (pack vs recipe), blocks NOASSERTION, -NC, -ND, GPL/AGPL/SSPL, synthetic override flags, short Git hashes (requires full 40-char lowercase SHA), path traversal, unsafe or private/loopback URLs, and do-not-contact.json opt-out lists.

    Runtime & security design

    • Pure Python 3.11+ standard library: Zero third-party packages, zero network imports, zero environment-variable reads, zero subprocess calls.
    • Standalone execution: Every script embeds its own lookup tables and outputs structured UTF-8 JSON to stdout.
    • Read-only by default: Source files are never modified unless --output is explicitly provided.

    Included references

    • references/accounting-aliases.md — Mainland CAS, Hong Kong HKFRS/HKEX, and English GAAP/IFRS term alignment plus legal clause rules.
    • references/license-policy.md — Commercial-safe allowlist matrix, manifest schema, and security invariants.
    • references/examples.md — End-to-end synthetic before/after examples.

    Known limitations

    • Does not run image OCR on scanned PDFs; extract text/Markdown first, then run Stage 1.
    • Offline deterministic tooling only; does not fetch live market data or provide legal/investment advice.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    All three Python scripts run strictly offline using Python 3.11+ stdlib only (zero network access, zero environment-variable reads, zero third-party packages). Scripts read stdin or input files and write to disk only when --output is explicitly specified.

    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill provides specialized Python scripts to repair broken tables in CJK/HKEX financial documents, expand bilingual accounting queries, and audit document manifests for license and security compliance. It specifically solves the problem of "broken" text extraction where numeric decimals or specific Hong Kong stock exchange characters are corrupted during PDF-to-Markdown conversion.

    The toolkit is built for Python 3.11+ using only the standard library, meaning it has zero third-party dependencies. This makes it compatible with virtually any AI agent or RAG pipeline that can execute Python scripts, including local environments, Docker containers, and cloud-based LLM orchestrators.

    You receive the full suite of Python utility scripts (including table repair, query expansion, and license auditing tools) along with documentation on integrating them into your existing RAG ingestion and retrieval workflows. No API keys or network calls are required for use.

    Unlike LLMs, which may hallucinate synonyms or inconsistently fix character corruption, this skill uses deterministic, rule-based logic. This ensures that sensitive financial data—like numeric decimals and accounting terms—is repaired with 100% consistency without the high token costs or latency of a model call.

    The toolkit focuses on text-based financial filings and reports; it does not include an OCR engine for image-based PDFs. You should first process your documents through an extraction tool (like Marker or Nougat), then use this skill to sanitize and repair the resulting Markdown before it reaches your vector database.

    Yes, the query expansion tool is designed to map terminology across Mainland A-share (Simplified Chinese), Hong Kong HKEX (Traditional Chinese), and US GAAP/IFRS (English) standards, allowing a single search query to find relevant results across all three regions.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.