thai-interpreter

📁 nxdus/thai-interpreter 📅 5 days ago
13
总安装量
3
周安装量
#25543
全站排名
安装命令
npx skills add https://github.com/nxdus/thai-interpreter --skill thai-interpreter

Agent 安装分布

amp 3
opencode 3
kimi-cli 3
codex 3
github-copilot 3
gemini-cli 3

Skill 文档

Thai Interpreter

Interpret Thai user intent with two explicit modes while preserving meaning.

Use this mode selector first:

  1. Literal Translation:
    • Translate Thai to natural English with high fidelity.
    • Preserve tone, nuance, and intent.
    • Do not compress unless requested.
  2. Execution Translation:
    • Translate Thai to compact, execution-ready English.
    • Optimize for fewer tokens and direct agent action.
    • Use structured output with strict brevity.

Default to Execution Translation unless the user asks for direct/literal translation.

Use this workflow:

  1. Extract user intent from Thai text.
  2. Select translation mode based on user instruction.
  3. Preserve key Thai domain terms, names, and literals exactly.
  4. Produce English output in the chosen mode.
  5. Validate any file write path for UTF-8 safety before finalizing.

Prompt Compression Rules

Apply these rules for Execution Translation:

  1. Convert long Thai narrative into a compact structure:
    • Goal
    • Inputs
    • Constraints
    • Output
  2. Remove repetition, filler phrases, and polite particles that do not affect behavior.
  3. Preserve non-negotiable requirements exactly as written.
  4. Keep dates, numbers, IDs, file paths, and code literals unchanged.
  5. Keep the compressed instruction under 8 lines when possible.

Literal Translation Rules

Apply these rules for Literal Translation:

  1. Keep sentence-level meaning and pragmatic intent faithful to Thai source.
  2. Preserve ambiguity if the original Thai is ambiguous.
  3. Preserve names, domain terms, and quoted literals exactly.
  4. Do not add implementation assumptions unless requested.
  5. Keep formatting close to the source when practical.

Thai Text Safety Rules

Always protect Thai text writes:

  1. Use UTF-8 explicitly when creating or updating files.
  2. Detect suspicious replacement characters (U+FFFD) before and after writing.
  3. If corruption appears, stop and rewrite from clean source text.
  4. Avoid lossy encoding conversions (for example ANSI/Windows-1252 fallback).
  5. Re-open written files and verify expected Thai snippets.

For deep checks and command recipes, read:

  • references/encoding-playbook.md
  • references/translation-rules.md

For automated checks and safe writes, use:

  • scripts/check-thai-encoding.ps1
  • scripts/write-utf8.ps1

Output Contract

When handling Thai requests, produce:

  1. A mode label: Literal Translation or Execution Translation.
  2. English translation in the selected mode.
  3. If mode is Execution Translation, include structured block:
    • Goal
    • Inputs
    • Constraints
    • Output
  4. The implementation result (if execution is requested).
  5. A brief encoding safety confirmation when files were changed.