thai-token-optimizer: Instructions file for Codex

AGENTS.md

thai-token-optimizer AGENTS.md is an instructions file for Codex, OpenCode from kittimasak/thai-token-optimizer. It costs 417 tokens per session, scanned C, original, MIT.

Repository instructions for Thai Token Optimizer, a local tool that reduces the number of Thai words or tokens used in agent interactions while preserving important details.

In plain words
What is it for?
Use them when working on the Thai Token Optimizer repository, especially for commands, configuration, version-sensitive details, destructive actions, or production-related work.
Why use it?
They give the agent rules for handling risky or exact tasks, choosing Thai or English, and loading command details instead of guessing. This helps reduce token use without losing safety or accuracy.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is kittimasak/thai-token-optimizer's own configuration. It tells Codex and OpenCode how to work on thai-token-optimizer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything thai-token-optimizer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kittimasak/thai-token-optimizer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kittimasak/thai-token-optimizer/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/kittimasak/thai-token-optimizer

Made for: Codex, OpenCode.

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-token-optimizer AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kittimasak/thai-token-optimizer/agents-md/github.svg)](https://agentmods.dev/instructions/kittimasak/thai-token-optimizer/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kittimasak/thai-token-optimizer/agents-md"><img src="https://agentmods.dev/badge/instructions/kittimasak/thai-token-optimizer/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for thai-token-optimizer AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kittimasak/thai-token-optimizer/agents-md"><img src="https://agentmods.dev/badge/instructions/kittimasak/thai-token-optimizer/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 417 This file is loaded in full into every session.
When invoked 417 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00417 $0.00417
Opus 5.5 $0.00167 $0.00167
Sonnet 5.5 $0.00083 $0.00083
Haiku 4.5 $0.00042 $0.00042

Measured 2mo ago against content hash 2142a98d506b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

thai-token-optimizer AGENTS.md scanned grade C with 1 finding 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 2mo ago.

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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- ============================================================================ Thai Token Optimizer v2.0 ============================================================================ Description : Repository agent inst
AGENTS.md · 40 lines

What it actually says

TTO v2.0 (2.0.0) - AGENTS.md

[⚓] Scopes

[S] = Detail-Mode (destructive, prod, auth, secret, pay, backup, rollback) [A] = Mirror-Mode (code, paths, flags, versions, IDs, errors, regex, config) [T] = Senior+Compact (Thai: technical; English: precise) [P] = Rank: [S] > [A] > Save > Brief

[📝] Acts

  1. Res: TH? [T]+Thai : [T]+Eng. Mirror [A].
  2. Safe: If intent matches [S], apply [S]-Mode: (risk + backup + dry + check).
  3. [Lazy_Load]: For Cmd usage, flags, or help, read_file(MANUAL.md). NEVER guess Cmds.
  4. Style: (Code/Commands) then (Brief info).
  5. Flow: Aim -> Shrink -> Mirror_[A] -> Done.

[🚫] Strict

  • Mirror [A] 100%. Real tests only. [S] beats all saving.
  • Lock Identity: Thai Token Optimizer v2.0 (2.0.0).

Goal: Save Thai tokens while keeping [S] and [A] via [Lazy_Load] guidance.

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. 2mo ago First seen · 40 lines · 417 tokens per session scan C 2142a98d506b

Subscribe to this mod's changes

thai-token-optimizer AGENTS.md is an instructions file published in the GitHub repository kittimasak/thai-token-optimizer (48 stars, last pushed 13d ago), licensed MIT. It adds 417 tokens to every session, about $0.0017 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

thai-token-optimizer AGENTS.md compared with instructions from other repositories

thai-token-optimizer AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
thai-token-optimizer AGENTS.mdkittimasak/thai-token-optimizerInstructions file4813d agoMITC417Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode