{"id":"0dd23a4d-4c34-43bd-9b77-d35a5b5b99ab","shortId":"shkXxP","kind":"skill","title":"thai-address","tagline":"Use this skill for any task involving Thai postal address parsing, validation, formatting, or province/postcode lookup. Trigger whenever the user asks to: parse a Thai address into fields, validate a 5-digit Thai postcode, look up a province from its postcode, or format an addres","description":"# Thai Address (แยก/ตรวจที่อยู่ไทย)\n\n## Overview\nแยกที่อยู่ไทย (บ้านเลขที่ หมู่ ซอย ถนน ตำบล/แขวง อำเภอ/เขต จังหวัด รหัสไปรษณีย์) เป็น structured dict, ตรวจ postcode 5 หลัก, ดูจังหวัดจาก 2 หลักแรกของ postcode, และ map ระหว่างชื่อไทย/อังกฤษของ 77 จังหวัด. รองรับชื่อถนนหลายคำ (เช่น `ถนนพระราม 9`, `ถนนเลียบทางด่วน`) และฟิลด์คอนโด/อพาร์ตเมนต์ (อาคาร, ชั้น, ห้อง) ด้วย.\n\n## When to use\n- Parse ที่อยู่จากฟอร์ม, e-commerce, PDF\n- ตรวจรหัสไปรษณีย์ก่อน submit\n- แปลที่อยู่ไทย → English transliteration สำหรับฉลากพัสดุระหว่างประเทศ\n- DO NOT use as a delivery-routing source of truth — postcode prefixes are many-to-one (Bangkok metro area shares prefix 10). For exact sub-district resolution, use a Thailand Post sub-district database.\n\n## Example prompts\n- \"แยกที่อยู่นี้ให้หน่อย: 123/45 ซอยสุขุมวิท 21 ถนนสุขุมวิท แขวงคลองเตยเหนือ เขตวัฒนา กรุงเทพ 10110\"\n- \"รหัส 50200 อยู่จังหวัดอะไร\"\n\n## Field ordering (สำคัญ!)\n\nThai postal addresses go small-to-large — the **reverse** of English convention. Always order fields like this on a shipping label:\n\n```\n[อาคาร → ชั้น → ห้อง →] บ้านเลขที่ → หมู่ → ซอย → ถนน → ตำบล/แขวง → อำเภอ/เขต → จังหวัด → รหัสไปรษณีย์\n```\n\nExample (house):\n```\n123/45 ซอยสุขุมวิท 21 ถนนสุขุมวิท\nแขวงคลองเตยเหนือ เขตวัฒนา\nกรุงเทพมหานคร 10110\n```\n\nExample (condo / apartment):\n```\nอาคารชาญอิสสระ ชั้น 12 ห้อง 1203\n99 ถนนพระราม 4\nแขวงสีลม เขตบางรัก\nกรุงเทพมหานคร 10500\n```\n\n## Bangkok vs provincial vocabulary\n\n| Concept | Bangkok | Province | English |\n|---|---|---|---|\n| Sub-district | แขวง | ตำบล (ต.) | Sub-district / Tambon / Khwaeng |\n| District | เขต | อำเภอ (อ.) | District / Amphoe / Khet |\n| Province | กรุงเทพมหานคร | จังหวัด (จ.) | Bangkok / Province / Changwat |\n\n**Never mix these.** A Bangkok address must use แขวง/เขต; a provincial address must use ตำบล/อำเภอ. Mixing them is a strong \"this address is wrong\" signal.\n\n## Transliteration cheatsheet\n\n| Thai | English / Roman |\n|---|---|\n| บ้านเลขที่ / เลขที่ | No. |\n| หมู่ที่ / หมู่ / ม. | Moo / Mu |\n| ซอย / ซ. | Soi |\n| ถนน / ถ. | Road / Rd. |\n| อาคาร / ตึก / คอนโด | Building / Block / Condo |\n| ชั้น | Floor / Fl. |\n| ห้อง | Unit / Room |\n| ตำบล / ต. | Sub-district / Tambon |\n| อำเภอ / อ. | District / Amphoe |\n| แขวง | Sub-district / Khwaeng |\n| เขต | District / Khet |\n| จังหวัด / จ. | Province / Changwat |\n| รหัสไปรษณีย์ | Postcode |\n\n## Quick reference\n\n| Function | Returns |\n|---|---|\n| `parse_address(s)` | dict with 11 keys (any may be `None`) |\n| `validate_postcode(pc)` | `bool` |\n| `province_from_postcode(pc)` | Thai province name or `None` |\n\n### `parse_address` return keys\n\n`house_no`, `moo`, `soi`, `road`, `building`, `floor`, `unit`, `subdistrict`, `district`, `province`, `postcode`. Each is a `str` or `None`. `building` covers อาคาร / ตึก / คอนโด.\n\nMulti-token road names are captured up to the next address keyword, so\n`ถนนพระราม 9 แขวงห้วยขวาง …` yields `road = \"พระราม 9\"`. Thai numerals\n(`๐-๙`) and compound names (`ถนนเลียบทางด่วน`, `ถนนสาทรเหนือ`) are supported.\n\n### Postcode prefix map (selected)\n| Prefix | Region |\n|---|---|\n| 10 | กรุงเทพมหานคร & ปริมณฑล (sub-districts of Samut Prakan also fall here) |\n| 11 | นนทบุรี |\n| 12 | ปทุมธานี |\n| 20–27 | ภาคตะวันออก |\n| 30–49 | ภาคอีสาน |\n| 50–58 | ภาคเหนือ |\n| 60–67 | ภาคเหนือตอนล่าง |\n| 70–77 | ภาคกลาง/ตะวันตก |\n| 80–86 | ภาคใต้ตอนบน |\n| 90–96 | ภาคใต้ตอนล่าง |\n\nFull 77-province table: [`provinces.json`](provinces.json).\n\n## Implementation\n- Python: [`parse.py`](parse.py) — `python parse.py` runs self-tests\n- TypeScript: [`parse.ts`](parse.ts) — `npx tsx parse.ts` runs self-tests\n\n## Common mistakes\n- **Field reversal.** Writing `Bangkok 10110 Wattana Khwaeng…` in English order on a Thai-side label confuses postmen. Always small-to-large in Thai.\n- **Mixing แขวง with อำเภอ.** Bangkok = แขวง/เขต. Everywhere else = ตำบล/อำเภอ. Never mix.\n- **Trusting postcode prefix alone.** Prefix 10 spans Bangkok, Samut Prakan, parts of Nonthaburi and Pathum Thani. Use the full 5-digit code for routing.\n- **Dropping leading zeros from house numbers.** `123/4` and `123/04` may differ; preserve as the user wrote them.\n- **Soi naming.** Soi names are often the same as the parent road (`ซอยสุขุมวิท 21` is off `ถนนสุขุมวิท`). Don't merge them or you'll lose the sub-numbering.","tags":["thai","address","claude","skills","boom-vitt","agent-skills","agentskills","claude-code","claude-skills","i18n","line-oa","localization"],"capabilities":["skill","source-boom-vitt","skill-thai-address","topic-agent-skills","topic-agentskills","topic-claude-code","topic-claude-skills","topic-i18n","topic-line-oa","topic-localization","topic-pdpa","topic-promptpay","topic-thai","topic-thai-language","topic-thai-nlp"],"categories":["claude-thai-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Boom-Vitt/claude-thai-skills/thai-address","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Boom-Vitt/claude-thai-skills","source_repo":"https://github.com/Boom-Vitt/claude-thai-skills","install_from":"skills.sh"}},"qualityScore":"0.458","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 17 github stars · SKILL.md body (4,238 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:00.423Z","embedding":null,"createdAt":"2026-05-18T07:06:32.214Z","updatedAt":"2026-05-18T19:06:00.423Z","lastSeenAt":"2026-05-18T19:06:00.423Z","tsv":"'10':131,433,542 '10110':156,207,503 '10500':222 '11':348,445 '12':213,447 '1203':215 '123/04':569 '123/4':567 '123/45':149,200 '2':73 '20':449 '21':151,202,591 '27':450 '30':452 '4':218 '49':453 '5':34,70,556 '50':455 '50200':158 '58':456 '60':458 '67':459 '70':461 '77':80,462,472 '80':465 '86':466 '9':85,409,414 '90':468 '96':469 '99':216 'addr':48 'address':3,13,29,50,165,261,268,279,344,368,405 'alon':540 'also':442 'alway':176,517 'ampho':247,324 'apart':210 'area':128 'ask':24 'bangkok':126,223,228,253,260,502,528,544 'block':307 'bool':357 'build':306,376,389 'captur':400 'changwat':255,336 'cheatsheet':284 'code':558 'commerc':100 'common':497 'compound':421 'concept':227 'condo':209,308 'confus':515 'convent':175 'cover':390 'databas':145 'deliveri':114 'delivery-rout':113 'dict':67,346 'differ':571 'digit':35,557 'district':136,144,233,239,242,246,319,323,328,331,380,438 'drop':561 'e':99 'e-commerc':98 'els':532 'english':105,174,230,286,507 'everywher':531 'exact':133 'exampl':146,198,208 'fall':443 'field':31,160,178,499 'fl':311 'floor':310,377 'format':16,46 'full':471,555 'function':341 'go':166 'hous':199,371,565 'implement':477 'involv':10 'key':349,370 'keyword':406 'khet':248,332 'khwaeng':241,329,505 'label':184,514 'larg':170,521 'lead':562 'like':179 'll':601 'look':38 'lookup':19 'lose':602 'mani':123 'many-to-on':122 'map':77,429 'may':351,570 'merg':597 'metro':127 'mistak':498 'mix':257,273,524,536 'moo':294,373 'mu':295 'multi':395 'multi-token':394 'must':262,269 'name':364,398,422,579,581 'never':256,535 'next':404 'none':353,366,388 'nonthaburi':549 'npx':490 'number':566,606 'numer':416 'often':583 'one':125 'order':161,177,508 'overview':53 'parent':588 'pars':14,26,96,343,367 'parse.py':479,480,482 'parse.ts':488,489,492 'part':547 'pathum':551 'pc':356,361 'pdf':101 'post':141 'postal':12,164 'postcod':37,44,69,75,119,338,355,360,382,427,538 'postmen':516 'prakan':441,546 'prefix':120,130,428,431,539,541 'preserv':572 'prompt':147 'provinc':41,229,249,254,335,358,363,381,473 'province/postcode':18 'provinces.json':475,476 'provinci':225,267 'python':478,481 'quick':339 'rd':302 'refer':340 'region':432 'resolut':137 'return':342,369 'revers':172,500 'road':301,375,397,412,589 'roman':287 'room':314 'rout':115,560 'run':483,493 'samut':440,545 'select':430 'self':485,495 'self-test':484,494 'share':129 'ship':183 'side':513 'signal':282 'skill':6 'skill-thai-address' 'small':168,519 'small-to-larg':167,518 'soi':298,374,578,580 'sourc':116 'source-boom-vitt' 'span':543 'str':386 'strong':277 'structur':66 'sub':135,143,232,238,318,327,437,605 'sub-district':134,142,231,237,317,326,436 'sub-numb':604 'subdistrict':379 'submit':103 'support':426 'tabl':474 'tambon':240,320 'task':9 'test':486,496 'thai':2,11,28,36,49,163,285,362,415,512,523 'thai-address':1 'thai-sid':511 'thailand':140 'thani':552 'token':396 'topic-agent-skills' 'topic-agentskills' 'topic-claude-code' 'topic-claude-skills' 'topic-i18n' 'topic-line-oa' 'topic-localization' 'topic-pdpa' 'topic-promptpay' 'topic-thai' 'topic-thai-language' 'topic-thai-nlp' 'transliter':106,283 'trigger':20 'trust':537 'truth':118 'tsx':491 'typescript':487 'unit':313,378 'use':4,95,110,138,263,270,553 'user':23,575 'valid':15,32,354 'vocabulari':226 'vs':224 'wattana':504 'whenev':21 'write':501 'wrong':281 'wrote':576 'yield':411 'zero':563 'กรุงเทพ':155 'กรุงเทพมหานคร':206,221,250,434 'คอนโด':305,393 'จ':252,334 'จังหวัด':63,81,196,251,333 'ชั้น':90,186,212,309 'ซ':297 'ซอย':57,190,296 'ซอยสุขุมวิท':150,201,590 'ดูจังหวัดจาก':72 'ด้วย':92 'ต':236,316 'ตรวจ':68 'ตรวจที่อยู่ไทย':52 'ตรวจรหัสไปรษณีย์ก่อน':102 'ตะวันตก':464 'ตำบล':59,192,235,271,315,533 'ตึก':304,392 'ถ':300 'ถนน':58,191,299 'ถนนพระราม':84,217,408 'ถนนสาทรเหนือ':424 'ถนนสุขุมวิท':152,203,594 'ถนนเลียบทางด่วน':86,423 'ที่อยู่จากฟอร์ม':97 'นนทบุรี':446 'บ้านเลขที่':55,188,288 'ปทุมธานี':448 'ปริมณฑล':435 'พระราม':413 'ภาคกลาง':463 'ภาคตะวันออก':451 'ภาคอีสาน':454 'ภาคเหนือ':457 'ภาคเหนือตอนล่าง':460 'ภาคใต้ตอนบน':467 'ภาคใต้ตอนล่าง':470 'ม':293 'รหัส':157 'รหัสไปรษณีย์':64,197,337 'รองรับชื่อถนนหลายคำ':82 'ระหว่างชื่อไทย':78 'สำคัญ':162 'สำหรับฉลากพัสดุระหว่างประเทศ':107 'หมู่':56,189,292 'หมู่ที่':291 'หลัก':71 'หลักแรกของ':74 'ห้อง':91,187,214,312 'อ':245,322 'อพาร์ตเมนต์':88 'อยู่จังหวัดอะไร':159 'อังกฤษของ':79 'อาคาร':89,185,303,391 'อาคารชาญอิสสระ':211 'อำเภอ':61,194,244,272,321,527,534 'เขต':62,195,243,265,330,530 'เขตบางรัก':220 'เขตวัฒนา':154,205 'เช่น':83 'เป็น':65 'เลขที่':289 'แขวง':60,193,234,264,325,525,529 'แขวงคลองเตยเหนือ':153,204 'แขวงสีลม':219 'แขวงห้วยขวาง':410 'แปลที่อยู่ไทย':104 'แยก':51 'แยกที่อยู่นี้ให้หน่อย':148 'แยกที่อยู่ไทย':54 'และ':76 'และฟิลด์คอนโด':87 '๐':418 '๐-๙':417 '๙':419","prices":[{"id":"31997768-4bf5-4a88-a251-3a2bb8935a99","listingId":"0dd23a4d-4c34-43bd-9b77-d35a5b5b99ab","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Boom-Vitt","category":"claude-thai-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T07:06:32.214Z"}],"sources":[{"listingId":"0dd23a4d-4c34-43bd-9b77-d35a5b5b99ab","source":"github","sourceId":"Boom-Vitt/claude-thai-skills/thai-address","sourceUrl":"https://github.com/Boom-Vitt/claude-thai-skills/tree/main/skills/thai-address","isPrimary":false,"firstSeenAt":"2026-05-18T07:06:32.214Z","lastSeenAt":"2026-05-18T19:06:00.423Z"}],"details":{"listingId":"0dd23a4d-4c34-43bd-9b77-d35a5b5b99ab","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Boom-Vitt","slug":"thai-address","github":{"repo":"Boom-Vitt/claude-thai-skills","stars":17,"topics":["agent-skills","agentskills","claude-code","claude-skills","i18n","line-oa","localization","pdpa","promptpay","thai","thai-language","thai-nlp","thailand"],"license":"mit","html_url":"https://github.com/Boom-Vitt/claude-thai-skills","pushed_at":"2026-05-17T01:16:53Z","description":"ทักษะ Claude Code สำหรับคนไทย — แปล, แคปชั่น, เรซูเม่, จดหมายราชการ, PDPA, ใบกำกับภาษี, PromptPay, เลขบัตร ปชช., วันที่ พ.ศ. — 12 skills","skill_md_sha":"352b22422a24343e973f8ed53861b0dc5cc12414","skill_md_path":"skills/thai-address/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Boom-Vitt/claude-thai-skills/tree/main/skills/thai-address"},"layout":"multi","source":"github","category":"claude-thai-skills","frontmatter":{"name":"thai-address","description":"Use this skill for any task involving Thai postal address parsing, validation, formatting, or province/postcode lookup. Trigger whenever the user asks to: parse a Thai address into fields, validate a 5-digit Thai postcode, look up a province from its postcode, or format an address for a shipping label. Also trigger for requests like \"แยกที่อยู่ไทย\", \"ตรวจรหัสไปรษณีย์\", \"แปลที่อยู่เป็นภาษาอังกฤษ\", \"ที่อยู่จัดส่ง\", or any variation involving Thai addresses with ตำบล/แขวง/อำเภอ/เขต/จังหวัด."},"skills_sh_url":"https://skills.sh/Boom-Vitt/claude-thai-skills/thai-address"},"updatedAt":"2026-05-18T19:06:00.423Z"}}