thai-address
Skill4 starsChanged 2 months agoMITView on GitHub
Use this skill for any task parsing a Thai address into its components (ตำบล/แขวง, อำเภอ/เขต, จังหวัด, รหัสไปรษณีย์) or looking up a province from a postal code or name. Trigger on "แยกที่อยู่", "ที่อยู่ไทย", "รหัสไปรษณีย์", "จังหวัดอะไร", "Thai address parse", "postal code to province". If the address is already cleanly split into labeled fields (e.g. a form with separate province/district inputs), this skill's lookup table is still useful but the parsing half is unnecessary.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Boom-Vitt/claude-thai-skillstheir own version, first seen Nov 1, 2026
- Aether-GenesiZ/thai-agent-skillstheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Boom-Vitt/claude-thai-skills★ 58same name
- Aether-GenesiZ/thai-agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/CLAUDE.mdCLAUDE.md
- deep-planningSkill
- deep-planningSkill
- deprecatedSkill
- architecture-reviewSkill
- code-reviewSkill
- diagnoseSkill
- tddSkill
- ui-design-engineeringSkill
- ux-ui-design-assessmentSkill
- in-progressSkill
- mcp-tool-managementSkill
- skill-managementSkill
- obsidian-canvasSkill
- obsidian-markdownSkill
- obsidian-notion-bridgeSkill
- obsidian-vault-workflowSkill
- boomz-preferencesSkill
- personal-agent-workflowSkill
- personalSkill
- automation-designSkill
- grill-with-docsSkill
- handoffSkill
- inbox-meeting-triageSkill
- markdown-reportSkill
- prompt-improvementSkill
- project-docs-prepSkill
- claim-citation-checkSkill
- daily-news-reportSkill
- github-skill-researchSkill
- project-discoverySkill
- repo-tourSkill
- research-methodologySkill
- seo-website-evaluatorSkill
- thaiSkill
- thai-customer-serviceSkill
- thai-date-formatSkill
- thai-festival-cardSkill
- thai-government-formSkill
- thai-id-validateSkill
- thai-invoiceSkill
- thai-pdpaSkill
- thai-resumeSkill
- thai-social-captionSkill
- thai-text-processingSkill
- thai-translateSkill
- backtest-expertSkill
- dividend-value-screenerSkill
- drawdown-circuit-breakerSkill
- exposure-coachSkill
- market-breadth-analyzerSkill
- portfolio-managerSkill
- position-sizerSkill
- tradingSkill
- trader-memory-coreSkill
- uptrend-analyzerSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Run python3 parse.py for the self-test.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Thai Address Parsing
Overview
Thai addresses order components district-to-city the same broad direction as English (house number → subdistrict → district → province → postal code) but use Thai particle words (ตำบล/แขวง, อำเภอ/เขต, จังหวัด) that a naive English-address parser (split on commas, assume last token is a country) will mishandle — Bangkok uses แขวง/เขต instead of ตำบล/อำเภอ, and the parts can appear with or without abbreviations (ต./อ./จ.). This skill gives a regex-based extractor plus the 77-province reference table.
When to use
- แยกที่อยู่ไทยเป็นส่วนประกอบ (ตำบล, อำเภอ, จังหวัด, รหัสไปรษณีย์)
- หารหัสไปรษณีย์ 2 หลักแรก → จังหวัด (candidate lookup, not exact 5-digit resolution)
- Matching a province name across Thai/English spelling and with/without "จังหวัด"/"Province" wrapper
- Validating that a claimed province name is one of the real 77
When NOT to use
- The task needs the exact 5-digit postal code for a specific subdistrict — this skill narrows to province-level candidates from the first 2 digits only; direct the user to Thailand Post's official lookup for the precise code
- The address is non-Thai — use general address parsing instead
Core knowledge
- Thailand has 77 provinces (76 + Bangkok). Bangkok uses แขวง (subdistrict) / เขต (district) terminology; every other province uses ตำบล / อำเภอ.
- Postal codes are 5 digits. The first 2 digits identify a province-level zone in a well-documented sequential assignment (10 = Bangkok area, 20s = eastern seaboard, 30s-40s = northeast, 50s = north, 60s = lower-north/central, 70s = west, 80s-90s = south). The last 3 digits identify the specific post office/district — this skill does not resolve that level.
- Bangkok and Samut Prakan share the
10prefix; several other neighboring provinces' outlying districts can carry a prefix that "belongs" to an adjacent province's normal range. Treat a prefix match as a candidate list, not a certainty. - Standard field order in a full Thai address:
[เลขที่/บ้านเลขที่] [หมู่ที่] [ถนน] ตำบล/แขวง[X] อำเภอ/เขต[Y] จังหวัด[Z] [รหัสไปรษณีย์].
Common mistakes
- Assuming ตำบล/อำเภอ apply to Bangkok addresses — Bangkok uses แขวง/เขต instead.
- Treating the first 2 postal-code digits as uniquely identifying one province — several pairs (notably Bangkok/Samut Prakan) share a prefix.
- Matching province names with exact string equality only — fails on "จ.เชียงใหม่", "จังหวัดเชียงใหม่", "Chiang Mai Province", and plain "เชียงใหม่" all referring to the same province.
- Assuming a mostly-empty parse result means "no address" — it more often means the input didn't use the expected Thai particle words (see Known limitations).
- Fabricating a precise 5-digit postal code from a province name alone — the province-level prefix does not determine the last 3 digits.
Code
parse.py (uses provinces.json, no external dependencies):
load_provinces()→ list of{name_th, name_en, region, postal_prefix}find_province(name)→ tolerant Thai/English match, handles "จังหวัด"/"จ."/"Province" wrappingpostal_prefix_to_provinces(code)→ candidate province list from the first 2 digitsparse_thai_address(text)→{postal_code, province, district, subdistrict}
Run python3 parse.py for the self-test.
Known limitations
parse_thai_addressis a structural regex extractor, not a trained address-parsing model. It requires the Thai particle words (ตำบล/แขวง/อำเภอ/เขต/จังหวัด or their abbreviations) to be present in the text; a plain comma-separated address without those words will parse mostly empty.postal_prefix_to_provincesresolves to a province-level candidate list from 2 digits only — it cannot give the exact 5-digit code for a specific subdistrict, and a handful of border-area districts use a prefix outside their "home" province's normal range. Verify the exact code against Thailand Post's official lookup before printing it on a real document.- Province English-name romanization follows one common convention (RTGS-influenced with spaces, e.g. "Buri Ram"); other sources spell some names differently (e.g. "Buriram" one word) — treat spelling variants as equivalent when matching, not as errors.
provinces.json'sregionfield uses one common 6-region grouping; other classifications (e.g. Royal Institute's 4-region scheme) group some Central provinces as "Lower North" instead — don't treatregionas an official government classification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

