city-salary: Instructions file for Codex

AGENTS.md

city-salary AGENTS.md is an instructions file for Codex, OpenCode from weante/city-salary. It costs 1,400 tokens per session, scanned A, original, MIT.

Repository instructions for calculating employee pay deductions and contributions in Guangdong, China, for the 2025–2026 period. They cover 21 cities and include a single-file calculator that starts by asking for a city.

In plain words
What is it for?
Calculating items such as pension, unemployment insurance, medical insurance, work injury insurance, maternity coverage, and housing-fund contributions for Guangdong cities.
Why use it?
They give a coding agent the local rates and rules needed for consistent calculations instead of leaving it to guess or use the wrong city’s figures.

Instructions file for CodexOpenCode

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

This is weante/city-salary's own configuration. It tells Codex and OpenCode how to work on city-salary 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 city-salary configures →

Reuse

Borrowing it

Nothing to install: this file belongs to weante/city-salary. 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/weante/city-salary/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/weante/city-salary

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 city-salary AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/weante/city-salary/agents-md/github.svg)](https://agentmods.dev/instructions/weante/city-salary/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/weante/city-salary/agents-md"><img src="https://agentmods.dev/badge/instructions/weante/city-salary/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 city-salary AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/weante/city-salary/agents-md"><img src="https://agentmods.dev/badge/instructions/weante/city-salary/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,400 This file is loaded in full into every session.
When invoked 1,400 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01400 $0.01400
Opus 5.5 $0.00560 $0.00560
Sonnet 5.5 $0.00280 $0.00280
Haiku 4.5 $0.00140 $0.00140

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

Security

Grade A, and why

city-salary 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 2d 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 · 37 lines

How it starts

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

AGENTS.md — 城市工资计算规则(city-salary)

本文件为通用 Agent 指令,支持读取 AGENTS.md 的 Agent 工具(Codex、opencode、TRAE、WorkBuddy 等)可直接使用本仓库;需要交互式计算器时使用 skills/city-salary/assets/calculator.html(单文件 HTML,打开先选城市)。

本文件只保留每次必读的仓库约定、计算口径、交互要求与数据状态指针;337 城参数、分省费率与历年批次取证日志已移到 skills/city-salary/references/,按需查阅。

计算口径要点

  1. 个税累计预扣预缴:已就业月数 = 当前月 − 就业起始月 + 1;累计应纳税所得额 = 月薪×月数 − (五险一金+5000+专项附加+补充扣除)×月数 → 七级税率表(3%~45%)→ 当月个税 = 累计税额 − 上月累计税额。
  2. 专项附加扣除(勾选启用,自动填默认值:子女教育/婴幼儿照护2000、赡养老人1500、住房租金按城市标准;范围0~上限):子女教育/婴幼儿照护二选一(2000/月/子女)、房贷利息(1000)与住房租金二选一(租金按城市:北京/上海/广州/深圳1500/月,佛莞中珠惠汕湛茂揭清江肇潮梅阳韶1100/月,汕尾河源云浮800/月)、继续教育400、赡养老人(独生3000/非独生≤1500)、大病医疗年度80000(只在汇算清缴时扣,不进月度预扣;年度金额按全年12个月计并封顶80000,不随就业月数折算)。
  3. 年终奖单独计税:奖金÷12找月均税率(3%45%月表)→ 全额×税率−速算扣除;临界值陷阱:36000/144000/300000/420000/660000/960000,多1元少拿230988000元,命中必须警告。
  4. 补充扣除:税优健康险≤200/月、个人养老金≤1000/月、企业年金≤本人缴费工资计税基数的4%(模板以养老缴费基数计)。这三项既减税、也是个人真实现金支出,算"到手现金"时必须扣出去。

交互要求

  • 用户给工资查询时:先确认城市,再追问缺失参数(月薪、基数是否等于工资、公积金比例、专项附加、年终奖、当前月份、深圳的户籍/医疗档次)
  • 计算后主动提示:公积金比例提升收益、年终奖陷阱、未用扣除项、基数低于工资的影响

仓库约定与红线

  • 数值唯一真源是 skills/city-salary/assets/calculator.html 的 CITIES;文档参数经 node tools/gen-city-params.js --extract 从 CITIES 落到 skills/city-salary/data/cities.json(docRate/docNote 人工措辞按城市名保留),再由 --write 生成到 skills/city-salary/references/city-parameters.md 的 generated 区(<!-- generated:begin --> 至 <!-- generated:end -->,勿手改),AGENTS.md 不再复制参数表。
  • 改数值必须同步跑 node tools/sync.js、node tools/test-calc.js、node tools/check-golden.js、node tools/check-dom.js、node tools/check-sync.js、node tools/data-quality.js、node tools/test-export.js、node tools/e2e-smoke.js、node tools/check-jsdoc.js;黄金快照禁止用 --update 造绿。
  • 新增或修改城市参数:只改 CITIES → node tools/gen-city-params.js --extract 重建 JSON → node tools/gen-city-params.js --write 重写 references 生成区 → 跑 check-sync 的 B 项(生成物 diff + JSON 是否等于 CITIES 提取结果 + docRate/docNote 措辞能否回溯到数值)。漏跑 --extract 会报「请运行 node tools/gen-city-params.js --extract 重建 JSON」。
  • 文档里的断言数、机制规模数字由 check-sync 的 C/D 项守卫,不要手写旧数字。
  • 维护流程见 CONTRIBUTING.md,年度节奏见 docs/maintenance-calendar.md,安装说明见 docs/INSTALL-*.md。

Read the full file on GitHub · 37 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. 2d ago Changed · +28 tokens per session 7e79cbea0692
  2. 4d ago Changed · -415 lines · -53,624 tokens per session 987962ef71e6
  3. 28d ago Changed · +215 lines · +15,244 tokens per session e51a0e7e20c3
  4. 29d ago Changed · +180 lines · +22,597 tokens per session bf3766b3e7be
  5. 1mo ago Changed · +1,672 tokens per session 64e39ac7e749
  6. 1mo ago Changed · +283 tokens per session 091f55dd8e33
  7. 1mo ago Changed · +587 tokens per session aabeb551fa77
  8. 1mo ago Changed · +27 tokens per session ef11cc4a88fb
  9. 1mo ago Changed · +27 lines · +11,605 tokens per session 49b4c6a08a27
  10. 1mo ago First seen · 30 lines · 2,981 tokens per session scan A 94cc552d185f

Subscribe to this mod's changes

city-salary AGENTS.md is an instructions file published in the GitHub repository weante/city-salary (3 stars, last pushed yesterday), licensed MIT. It adds 1,400 tokens to every session, about $0.0056 per session on Opus 5.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-31.

Related

city-salary AGENTS.md compared with instructions from other repositories

city-salary AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
city-salary AGENTS.mdweante/city-salaryInstructions file3yesterdayMITA1,400Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot