The problem
A Thai SME writes to government offices, banks and large customers in the formal formats they expect: หนังสือภายนอก, บันทึกข้อความ, หนังสือรับรอง, รายงานการประชุม. Getting the margins, fonts, Thai digits and salutations right takes an admin hours, and Word still breaks Thai words in the middle at the end of a line, so a document that looks fine on screen prints badly.
Architecture
- Channel
- Owner's brief in chat
- Existing .docx files
- Agent
- Picks type, drafts JSON
- Renders and checks .docx
- Tools
- thai-official-letters skill
- thai-docx wrap and fix
- Human
- Signer fills, numbers, signs
Where the data stays: Drafts and .docx files stay in a folder on your own computer; the scripts call no AI or network, and only the chat text goes to Claude under your plan's data terms.
Design flow
- Owner states purpose, recipient, signer and facts
- Skill picks one of 11 types and drafts a JSON file
- Rendered to .docx in the ว 2019 layout
- Check lists wrong fields and every [ระบุ…] left
- Signer fills the gaps, adds emblem and number, signsHuman checkpoint
Setup
Total time: 1 h 15 min our estimate
- 15 min
Done when: python --version shows 3.10 or newer and pip install python-docx lxml pydantic finishes; the README says numpy is optional for the word segmenter.
- 10 min
The plugin install includes the khammoon model (CC BY-NC-SA, no commercial use); for company use delete scripts/thaidocs/_khammoon/ from the installed skill or use the nokhammoon zip, as the README says.
Done when: In Claude Code, /plugin marketplace add Pitarat1/thai-docs-skills then /plugin install thai-docs@thai-docs-skills shows both skills; Claude Code's docs describe adding a marketplace and installing with a scope.
- 20 min
Done when: Ask for a บันทึกข้อความ requesting a meeting room; the skill writes the JSON, renders memo.docx, the check passes with only [ระบุ…] placeholders left, and the file opens in Word with a frame where the emblem goes.
- 20 min
Done when: Your company name, address and signer are stored for reuse and your emblem file sits at ~/.thaidocs/emblem.png (or is passed with --emblem); you hold the right to use that emblem.
- 10 min
Done when: The routine is: draft, render, check, convert to PDF and read every page, then the signer fills every [ระบุ…], assigns the number and signs; the AI never issues a number.
Ticks are saved on this browser.
Starter prompt
Written from how the use case works and its sources. Replace the parts in square brackets.
Use the thai-official-letters skill. Draft an external official letter (nangsue phainok) from [company name], [address], phone [number], to [recipient office and title], asking for [what is requested, for example an appointment to inspect the premises in the week of ...]. Nothing attached. Signer: [name], [position]. Everything I have not given you (document number, date, reference letters) must stay as the skill's fill in placeholders; do not invent any name, number or date. Render the .docx, run the check, fix what it reports, and finish with the file name, the list of placeholders I still need to fill, and a reminder that I add the emblem, assign the number and sign myself.
Risks and data
Data
Letters hold names, positions and sometimes personal numbers. The skill's scripts run locally and call no network; with claude.ai the chat text goes to Anthropic under your plan, so keep ID numbers out of the brief when a placeholder will do, and store drafts in a company folder.
How it goes wrong
A salutation for a recipient outside the skill's table can be wrong, 7 of the 11 types have only automated tests, the wrap step must be the last edit (text typed afterwards is not tagged), and copied text carries zero width spaces. Always convert to PDF and read every page, and unwrap before editing.
How the agent works
It starts
The owner tells Claude what the letter is for and the facts they have: who it goes to, what is requested, who signs.
The agent works
docx with the margins, positions and font sizes of the Thai official typing guideline (ว 2019), then runs a check that reports wrong dates, document numbers, salutations and closings and every field still unfilled. Anything the owner did not give (names, positions, document number, date, amounts) is written as [ระบุ…] in a yellow field, never invented, and the check lists each one. The companion thai-docx skill fixes a whole Word file: TH Sarabun New throughout, equal Thai and English sizes, Thai digits when asked, headings kept off the page foot, and a wrap step that inserts zero width spaces so Word breaks lines only between Thai words.
The result
The owner adds the emblem, assigns the document number, reads the content and signs; the skill's scripts do none of this and call no AI or network.
Worked example
thai-docs-skills, an open source skill pack on GitHub by Pitarat1 (first commit 14 November 2026, latest commit 27 November 2026, Apache 2.0 code). Its README says thai-docx fixes, checks, wraps and unwraps Thai .docx files and thai-official-letters drafts and checks 11 official document types (บันทึกข้อความ, หนังสือภายนอก, หนังสือประทับตรา, คำสั่ง, ระเบียบ, ข้อบังคับ, ประกาศ, แถลงการณ์, ข่าว, หนังสือรับรอง, รายงานการประชุม) in three steps: draft as JSON, render to .docx, check. Measured in Word for Mac on a 10 paragraph test text at 7 page widths, Word broke lines mid word at 10.9% of line breaks and 0.2% after wrap, a figure the author says was measured with the proper nouns already in the dictionary. The README says a user team made real meeting minutes with claude.ai on Windows (a thai-docx result, it notes) and one Windows user installed it with Claude Code and produced official letters without problems on 27 November 2026, that only 4 of the 11 types were checked page by page, that the emblem is not included and the user must have the right to use it, and that the khammoon word segmentation model is CC BY-NC-SA, so commercial use takes the nokhammoon zip. Anthropic's help center says skills need code execution turned on; Claude Code's docs give the plugin install command.
The README gives install paths for Claude Code (a plugin marketplace), claude.ai (a zip upload under Customize, Skills, with code execution on), Codex ($HOME/.agents/skills) and Antigravity, and reports real documents so far only from users of Claude Code and claude.ai; the author lists Codex and Antigravity as untested. OpenAI's Codex docs confirm Codex reads skills from .agents/skills folders. Anthropic's help center says skills are available on Free, Pro, Max, Ultra, Team and Enterprise plans.
Join the Agent OS Club
Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.
Founding offer, ends 31 December 2026 or at member 100
Join the Agent OS ClubBuilding this for an organization? Learn more at theagentiv.com
Sources
- https://github.com/Pitarat1/thai-docs-skills
- https://raw.githubusercontent.com/Pitarat1/thai-docs-skills/main/README.md
- https://raw.githubusercontent.com/Pitarat1/thai-docs-skills/main/plugins/thai-docs/skills/thai-official-letters/SKILL.md
- https://code.claude.com/docs/en/discover-plugins
- https://support.claude.com/en/articles/12512180-use-skills-in-claude
- https://learn.chatgpt.com/docs/build-skills
Published: 2026-11-30