moedict.tw AGENTS.md

moedict.tw AGENTS.md is an instructions file for Codex, OpenCode from g0v/moedict.tw. It costs 19,363 tokens per session, scanned A, original, CC0-1.0.

Repository instructions for moedict.tw, a Taiwanese dictionary website with several language dictionaries and a React, TypeScript, Vite, and Cloudflare backend.

In plain words
What is it for?
Developing or checking the dictionary website, its Cloudflare Worker backend, its R2 storage, and its language-specific routes.
Why use it?
They clarify which website and data sources are current, reducing the risk of editing the wrong surface or using incorrect language mappings.

Instructions file for CodexOpenCode

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 instructions/g0v/moedict.tw/agents-md
Clone the repo
git clone --depth 1 https://github.com/g0v/moedict.tw

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 moedict.tw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/g0v/moedict.tw/agents-md.svg)](https://agentmods.dev/instructions/g0v/moedict.tw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/g0v/moedict.tw/agents-md"><img src="https://agentmods.dev/badge/instructions/g0v/moedict.tw/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 19,363 This file is loaded in full into every session.
When invoked 19,363 The same file — it is already loaded in full.
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.19363 $0.19363
Opus 5 $0.09681 $0.09681
Sonnet 5 $0.03873 $0.03873
Haiku 4.5 $0.01936 $0.01936

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

Security

Grade A, and why

moedict.tw AGENTS.md 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 3d 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.

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.

AGENTS.md · 735 lines

How it starts

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

AGENTS.md — cf-moedict-webkit-neo(moedict.tw)

萌典(moedict)字典查詢網站的現行主站程式碼:React + TypeScript + Vite 前端、 Cloudflare Workers 後端、R2 儲存。本檔是給 AI agent 與新進開發者的工作手冊—— 內容以「未來 session 直接可用」為準,改動架構時請同步更新。

專案定位(多個 surface,別搞混)

Surface 是什麼 原始碼
www.moedict.tw 現行主站:本 repo 的 Worker cf-moedict-webkit-neo + R2 本 repo
www.moedict.org 凍結的舊版靜態前端(GitHub Pages),只收安全性修正 ~/w/moedict-webkit(gh-pages)
行動 App Capacitor 離線版,資料由本 repo data/dictionary 供給 ~/w/moedict-app
  • 裸網域 moedict.tw 會 301 到 www.moedict.tw——線上驗證一律打 www
  • 舊版 ~/w/moedict-webkitview.ls 是 UI 行為的 ground truth: 移植或修 UI 迴歸時先讀它,不要憑猜測(例:h1.title 內的 DOM 順序)。

語言代碼(四本字典)

代碼 字典 Hash 前綴 路由 pack 目錄
a 華語(國語辭典) # / pack/
t 臺灣台語(閩南語) #' /' ptck/
h 臺灣客語 #: /: phck/
c 兩岸詞典 #~ /~ pcck/

(舊版 CLAUDE.md 此表有誤,以上為正確對應。)

技術棧與目錄結構

  • 前端:React 19、TypeScript、Vite+(Vite 8)、react-router-dom v7
  • 後端:Cloudflare Workers(worker/index.ts,經 @cloudflare/vite-plugin 建置)
  • 儲存:R2(FONTS / ASSETS / DICTIONARY 三個 binding)
  • 工具鏈:Vite+ 統一 dev/build/test/lint/format/runtime/package-manager 入口; vite.config.ts 同時持有 Vite、Vitest projects、Oxlint 與 Oxfmt 設定。
  • 套件管理:Vite+ 管理的 Bunvp installvp run <script>;lockfile 是 bun.lock)。
src/
  pages/        # DictionaryPage(核心詞條頁)、Dictionary-a/c/h/t、ListView、
                # RadicalView、RadicalDetailView、StarredPage、About、Privacy
  components/   # Layout、navbar、searchbox、sidebar、StrokeAnimation、
                # CharacterImageView、AssetLoader、InlineStyles、user-pref
  api/          # Worker 端 API handler(handleDictionaryAPI、handleLookupAPI、
                # handleListAPI、cache.ts 快取政策)
  oembed/       # /embed/<詞> 卡片 + /api/oembed
  ssr/          # head.ts(伺服端 <head> 注入)
  hooks/ utils/ # decorateRuby、pinyin 轉換、dictionary-route 等
worker/
  index.ts      # Worker 入口 + dispatch() 路由表
data/
  dictionary/   # 字典資料(真實來源,上傳至 R2;見「字典資料格式」)
  assets/       # 舊版前端資產(styles.css、字型、JS;上傳至 R2)
scripts/        # build-search-index、build-pinyin-lookup、merge-coverage 等
commands/       # upload_dictionary.sh、upload_assets.sh、fetch-moe-stroke.mjs、sync-moe-stroke-corpus.mjs
tests/          # unit / integration / e2e 三層
memory/MEMORY.md  # 跨 session 的架構筆記(與本檔互補)

Read the full file on GitHub · 735 lines

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. 3d ago First seen · 735 lines · 19,363 tokens per session scan A 83644943d914

Subscribe to this mod's changes

moedict.tw AGENTS.md is an instructions file published in the GitHub repository g0v/moedict.tw (11 stars, last pushed 11d ago), licensed CC0-1.0. It adds 19,363 tokens to every session, about $0.0968 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-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens