thai-text-processing

thai-text-processing is a skill for Claude Code, Codex from ntaffzii/Skill-Agents. It costs 114 tokens per session (1,392 once invoked), scanned A, original, MIT.

A guide to processing Thai text, including separating words, standardizing characters, sorting, and writing Thai words in Latin letters. Thai normally does not place spaces between individual words, so ordinary space-based splitting is unreliable.

In plain words
What is it for?
Use it for Thai word segmentation, Unicode normalization, Thai-aware sorting, or romanization using RTGS, the Royal Thai General System of Transcription.
Why use it?
It helps prevent incorrect search, comparison, sorting, or analysis caused by treating Thai text like English.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ntaffzii/skill-agents/thai-text-processing
Any agent
npx skills add ntaffzii/Skill-Agents --skill thai-text-processing
Clone the repo
git clone --depth 1 https://github.com/ntaffzii/Skill-Agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for thai-text-processing

README.md
[![agentmods](https://agentmods.dev/badge/skills/ntaffzii/skill-agents/thai-text-processing.svg)](https://agentmods.dev/skills/ntaffzii/skill-agents/thai-text-processing)
Your own site
<a href="https://agentmods.dev/skills/ntaffzii/skill-agents/thai-text-processing"><img src="https://agentmods.dev/badge/skills/ntaffzii/skill-agents/thai-text-processing.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,392 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00114 $0.01392
Opus 5 $0.00057 $0.00696
Sonnet 5 $0.00023 $0.00278
Haiku 4.5 $0.00011 $0.00139

Measured 4d ago against content hash 0bc4c8a12204, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

thai-text-processing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (examples/normalize.py, examples/segmentation.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/thai/thai-text-processing/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Thai Text Processing (Segmentation, Normalization, Collation, Romanization)

Overview

Thai script has no spaces between words within a sentence — "ฉันรักการเขียนโค้ด".split(" ") returns the entire string as one token, not a word list, because there is nothing to split on. A model without this skill reaches for whitespace-based tokenization out of habit (it works for English) and silently produces garbage for Thai. This skill flags that failure mode and points to the correct tools — it does not reimplement a Thai tokenizer or transliterator, since both need a maintained dictionary/model to be accurate, not hand-written rules.

When to use

  • ตัดคำภาษาไทยเป็นคำๆ (word segmentation/tokenization) สำหรับ search, NLP, หรือ text analytics
  • Normalizing Thai text before comparison, search, deduplication, or storage (Unicode NFC)
  • Sorting Thai strings correctly (Thai collation order differs from raw Unicode codepoint order)
  • Romanizing Thai text to Latin script (e.g. for a passport-style name, a street sign, or an international form) using the RTGS (Royal Thai General System of Transcription) convention

When NOT to use

  • Plain reading/writing/translating Thai text with no segmentation, sorting, or comparison step involved
  • The romanization only needs to be "readable," not standards-compliant (e.g. casual transliteration in a chat) — RTGS precision isn't necessary there

Core knowledge

Word segmentation: Thai does not use spaces between words (spaces mark clause/sentence boundaries, not word boundaries). Segmentation requires a dictionary- or model-based tokenizer — PyThaiNLP (pip install pythainlp, pythainlp.tokenize.word_tokenize) is the standard open-source option. This skill does not vendor or reimplement a tokenizer; a hand-rolled rule-based splitter would silently produce wrong word boundaries on real text.

Unicode normalization (NFC): Thai vowels and tone marks are combining Unicode characters. The same visible text can be encoded as a single precomposed codepoint or as a base character plus a combining mark — two strings that look identical can compare unequal, fail a lookup, or break deduplication if they aren't normalized to the same form first. Normalize to NFC (unicodedata.normalize("NFC", text), pure Python stdlib, no dependency needed) before comparing, searching, hashing, or storing user-submitted Thai text.

Read the full file on GitHub · 53 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 53 lines · 114 tokens per session scan A 0bc4c8a12204

Subscribe to this mod's changes

thai-text-processing is a skill published in the GitHub repository ntaffzii/Skill-Agents (4 stars, last pushed 2d ago), licensed MIT. It adds 114 tokens to every session and 1,392 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.