Communitygithub.com

yitengchun833-gif/datasheet-cn-reader

Audited English datasheet PDF to page-aligned Chinese HTML workflow with Agent Skills, CLI, MCP, and fail-closed QA.

datasheet-cn-reader とは?

datasheet-cn-reader is a Claude Code agent skill that audited English datasheet PDF to page-aligned Chinese HTML workflow with Agent Skills, CLI, MCP, and fail-closed QA.

対応Claude CodeCodex CLICursorGemini CLI
npx skills add yitengchun833-gif/datasheet-cn-reader

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Datasheet CN Reader

Create a separate output; never overwrite the source PDF.

Required workflow

  1. Run datasheet-cn-reader extract SOURCE.pdf --output work/extraction.json.
  2. Run datasheet-cn-reader manifest work/extraction.json --output work/qa_manifest.json.
  3. Read translation-rules.md.
  4. Create page translations:
    • For Agent translation, run datasheet-cn-reader translate work/extraction.json --output work/translation.json --provider draft, replace every 待人工确认 block, and preserve all protected tokens.
    • For a controlled regression baseline, use --provider baseline-html --baseline accepted.htm.
    • For an external translator, use --provider command --command ...; keep credentials outside prompts and files.
  5. Run datasheet-cn-reader build work/extraction.json work/translation.json --output output/reader.html.
  6. Read qa-contract.md, then run: datasheet-cn-reader validate work/qa_manifest.json work/translation.json output/reader.html --report output/qa-report.json.
  7. Run datasheet-cn-reader review output/reader.html --output-dir output/render-review.
  8. Deliver only when validation exits 0 and the QA report has status: passed.

Translation contract

  • Treat the uploaded PDF as the only parameter authority.
  • Translate English natural language only.
  • Do not change product models, pin names, parameter symbols, formulas, values, units, test conditions, table order, or MIN/TYP/MAX column relationships.
  • Do not silently update values from a website or another revision.
  • If external material differs, report the difference without replacing the uploaded value.
  • Mark uncertain extraction or translation as 待人工确认; never guess.
  • Preserve every source page as one corresponding HTML page block.
  • Use real HTML tables for structured data; do not substitute table screenshots.
  • Keep original page images embedded as data URLs for offline traceability.

Failure rules

  • Treat a nonzero validator exit as a hard stop.
  • Do not rename a failing build as a verified build.
  • Fix the exact page/table/token issue recorded in the QA report.
  • Do not suppress a missing token or row without recording a narrowly scoped, evidence-based exemption.
  • If OCR is required, record OCR use and confidence per page.

Interfaces

  • CLI: datasheet-cn-reader --help
  • Source-tree wrappers: scripts/*.py
  • MCP stdio server: python -m datasheet_cn_reader.mcp_server
  • Generic Agent prompt: adapters/universal-prompt.md
  • Product adapters: adapters/{codex,claude-code,cursor,gemini-cli,hermes}/

Read technical-terms.md when standard Chinese terminology is uncertain.

関連スキル