thai-learn
Skill0 starsChanged 22 days agoMITView on GitHub
Learn from the edits you make to Thai drafts Claude wrote, locally on your machine. Shows what is stored, records a draft together with the text you actually sent, picks up your edits to files Claude wrote, and proposes personal term overrides, lint rules or particle settings that you accept or reject one by one.
In this repository6 other files it gives its agents.
- exports/AGENTS.mdAGENTS.md
- thai-configSkill
- thai-polishSkill
- thai-termSkill
- thai-translateSkill
- thai-writingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are 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.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Run L scan, then L status --json.
- Very specific: line 21
If enabled is false, say what it stores in one Thai sentence and offer to turn it on, e.g.
- Very specific: line 24
If enabled, summarize in 1–2 Thai lines (pairs, days, accepted/rejected).
- Very specific: line 51
If proposals is empty, say so in one Thai line with the number of pairs, and that an edit is proposed only after it repeats in at least 3 …
- Very specific: line 63
Run L stats and summarize in Thai: number of pairs, edit rate per genre (median of 1 − similarity.
≈ “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-learn
Arguments: $ARGUMENTS
Script: python3 "${CLAUDE_SKILL_DIR}/../thai-writing/scripts/thai_native.py" --project-dir "${CLAUDE_PROJECT_DIR}" (the thai-writing skill folder sits next to this one).
Below, L <action> means <script> learn --data-dir "${CLAUDE_PLUGIN_DATA}" <action>. Always pass --data-dir like this: the file hook stores snapshots in the plugin data dir, and the Bash tool does not have that variable.
Everything stays on this machine. Never copy stored drafts anywhere else. Do not edit the learn files or patterns.local.json by hand; use the commands.
No arguments, or status
- Run
L scan, thenL status --json. - If
enabledis false, say what it stores in one Thai sentence and offer to turn it on, e.g. "ถ้าเปิด thai-learn จะเก็บสำเนาไฟล์ภาษาไทยที่ Claude เขียนและฉบับที่แก้แล้วไว้ในเครื่องนี้เท่านั้น (ลบเองใน 30–60 วัน) จากนั้นจะเสนอศัพท์หรือกฎ lint ให้เลือกรับทีละข้อ เปิดเลยไหม" On yes, run<script> config set learn on. Ifproject_setting_ignoredis true, add that a repo setting cannot turn it on; each person turns it on for themselves. - If enabled, summarize in 1–2 Thai lines (pairs, days, accepted/rejected). With 3 or more edited pairs, offer
mine.
on / off: run <script> config set learn on (or off) and confirm in one line.
add
The user pastes the text they actually sent (Slack, Jira, LINE, email). It works even when passive capture is off, because the user asked.
- draft: the most recent Thai draft you wrote in this conversation for that message, copied exactly as you wrote it. If there is none, or it is unclear which draft it was, ask the user to paste the draft as well.
- final: the pasted text, unchanged.
- genre (optional):
jira,code-review,chat,email,email-client,slides,docs,ux,official, … inferred from the conversation.
Pass both on stdin with a quoted heredoc so nothing gets expanded:
L add --genre chat <<'THAI_LEARN_EOF'
<draft>
<<<FINAL>>>
<final>
THAI_LEARN_EOFConfirm in one Thai line, e.g. "บันทึกแล้ว แก้ 3 จุด".
mine
- Run
L scan, thenL mine --json. - If
proposalsis empty, say so in one Thai line with the number of pairs, and that an edit is proposed only after it repeats in at least 3 documents on 2 different days, in most of the drafts where it appeared. Otherwise go through
proposalsin order, one per message:summary_th: what would changeevidence_thverbatim, e.g. "แก้ 5 จาก 6 เอกสาร ใน 3 วัน"exampleas ❌bad/ ✅good, when present- ask: รับ / ไม่รับ / ข้าม
kind: notehas nothing to write: present it as an observation and suggest a setting only if one clearly fits.- When every proposal has an answer, run
L apply <id> …for the accepted ones andL reject <id> …for the rejected ones. Skipped ones come back next time. Report in 1–2 Thai lines what was written where: term overrides andparticlego to the user config, lint rules topatterns.local.json(severity info).
stats
Run L stats and summarize in Thai: number of pairs, edit rate per genre (median of 1 − similarity; lower means fewer edits), and lint rules marked ทบทวน (flagged often, rarely changed by the user).
forget
Confirm first: it deletes every stored snapshot, pair and decision. Accepted rules and settings stay in the user's config. Then run L forget.
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.

