pinyin AGENTS.md

pinyin AGENTS.md is an instructions file for Codex, OpenCode from yunsii/pinyin. It costs 1,085 tokens per session, scanned A, original, MIT.

Repository instructions for a browser-based Pinyin typing practice app. Pinyin is a system for writing the pronunciation of Chinese characters with Latin letters.

In plain words
What is it for?
Adding Pinyin schemes and practice texts, registering them in the correct indexes, preserving the GitHub Pages path, and checking pronunciation mappings.
Why use it?
They prevent new typing schemes or practice texts from being added without registering them, and help avoid breaking the app's deployment path.

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/yunsii/pinyin/agents-md
Clone the repo
git clone --depth 1 https://github.com/yunsii/pinyin

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 pinyin AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yunsii/pinyin/agents-md.svg)](https://agentmods.dev/instructions/yunsii/pinyin/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yunsii/pinyin/agents-md"><img src="https://agentmods.dev/badge/instructions/yunsii/pinyin/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,085 This file is loaded in full into every session.
When invoked 1,085 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.01085 $0.01085
Opus 5 $0.00543 $0.00543
Sonnet 5 $0.00217 $0.00217
Haiku 4.5 $0.00109 $0.00109

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

Security

Grade A, and why

pinyin 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 5d 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 · 61 lines

How it starts

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

AGENTS.md

在线拼音打字练习(Vite + React 19 + Tailwind v4 + shadcn/ui / Base UI)。命令与依赖见 package.json,功能清单见 README.md,此处不重复。用户级规则不写进本文件。

Hard Rules

方案与文本靠 side-effect 注册,漏 import 等于没加

拼音方案、练习文本通过模块顶层的 Registry.schema.register / Registry.text.register / Registry.text.load 注册,再由 src/assets/schemes/index.tssrc/assets/texts/index.ts 侧效 import,最终经 src/global.ts 拉起(src/main.tsx 会先 import @/global)。

新增时两步都要做:

  1. 新建 src/assets/schemes/<Name>.tssrc/assets/texts/<Name>.ts,在文件内完成 register/load。
  2. 在对应 index.tsimport './<Name>'

只建文件不挂 index,运行时列表里不会出现。参照 XianHe.tsHelloWorld.tsChuShiBian.ts

vite.config.tsbase: '/pinyin/' 不要随手改

站点部署在 GitHub Pages 子路径 /pinyin/(见 .github/workflows/gh-pages.yml)。改 base 或发布目录时,部署路径与静态资源前缀必须一起对齐,否则本地 pnpm build 看着正常、线上资源 404。

拼音术语变量名用全拼

src/core/Pinyin.ts 约定:拼音 → Pinyin/pinyin,全拼 → Quanpin/quanpin,双拼 → Shuangpin/shuangpin,声母 → Shengmu/shengmu。新编码与映射字段跟这套走,不要混用拼音缩写或英文意译(如 initial/final)。

TextRegister.load 的注音要人工核对

load({ content, pinyin }) 按「字 ↔ 拼音 token」一一对齐;工具站注音有已知错例(见 src/core/registers/TextRegister/index.ts 注释:「内」→na,「其」→ji)。用 load 新增长文后,抽查易错字,不要默认相信导出结果。短文优先手写 Registry.text.register(见 HelloWorld.ts)。

UI 用 shadcn(Base UI),不要重新引入 antd

交互组件放在 src/components/ui/,由 CLI 生成:

pnpm dlx shadcn@latest add <component>

components.jsonstylebase-nova(Base UI)。Toast 用 sonner,图标用 lucide-react。应用视觉组件(四线格等)可继续用 CSS Module,不要把 Less / antd 主题体系加回来。

包管理器用 pnpm

仓库锁文件是 pnpm-lock.yaml。本地与 CI 都用 pnpm,不要另起 package-lock.json。Registry 见 .npmrc(当前 npmmirror)。

Task Routing

只读匹配当前任务的那一处,不要预加载。

任务
新增 / 修改拼音方案 上面「side-effect 注册」+ src/assets/schemes/ + src/core/registers/PinyinSchemaRegister/
新增 / 修改练习文本 上面「side-effect 注册」与「注音核对」+ src/assets/texts/
编码枚举、声母、零声母、全拼↔双拼转换 src/core/Pinyin.tssrc/core/registers/PinyinSchemaRegister/
练习页 UI、输入进度、同步/设置 src/pages/Hero/
汉字格 / 四线格 src/components/Hanzi/src/components/FourLinesGrid/
shadcn UI 原语 src/components/ui/ + components.json
入口 src/main.tsx(单页,无路由库)
本地验证 pnpm typecheck / pnpm lint;改 UI 时 pnpm dev(port 8000)浏览器走流程;发版前 pnpm build
部署 / Pages .github/workflows/gh-pages.yml + 上面 base 规则

Read the full file on GitHub · 61 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. 5d ago First seen · 61 lines · 1,085 tokens per session scan A 2230ac9b4570

Subscribe to this mod's changes

pinyin AGENTS.md is an instructions file published in the GitHub repository yunsii/pinyin (42 stars, last pushed 5d ago), licensed MIT. It adds 1,085 tokens to every session, about $0.0054 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.