before-you-code

before-you-code is a skill for Codex from zhuanggenhua/BoardGame. It costs 53 tokens per session (814 once invoked), scanned A, original, MIT.

A workflow for loading only the project guidance needed before changing board-game code, configuration, rules, tests, data, or documentation. It classifies work as small, medium, or large to decide how much context to read.

In plain words
What is it for?
Use it before making board-game project changes. It helps identify the relevant standards, workflows, source files, interfaces, and tests, and sets a boundary for large architectural or rules-related tasks.
Why use it?
It reduces missed project rules while avoiding irrelevant reading before implementation.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it before making board-game project changes. It helps identify the relevant standards, workflows, source files, interfaces, and tests, and sets a boundary for large architectural or rules-related tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhuanggenhua/boardgame/before-you-code
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.

Any agent
npx skills add zhuanggenhua/BoardGame --skill before-you-code
Clone the repo
git clone --depth 1 https://github.com/zhuanggenhua/BoardGame

Made for: Codex.

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 before-you-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/before-you-code/github.svg)](https://agentmods.dev/skills/zhuanggenhua/boardgame/before-you-code)
Your own site
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/before-you-code"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/before-you-code/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 before-you-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/before-you-code"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/before-you-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00053 $0.00814
Opus 5 $0.00026 $0.00407
Sonnet 5 $0.00011 $0.00163
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

before-you-code 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.

.spec/skills/before-you-code/SKILL.md · 39 lines

What it actually says

Before You Code

先校准任务规模,再读最少必要上下文。不要把已读内容复述成任务回执,也不要无差别加载所有规范。

强制设计入口

只要本轮会新增或修改手写源码、测试、E2E、项目脚本、devtools 或运行时配置,必须先读 code-design。它是 BoardGame 项目内“六大基本原则 / 设计模式选择 / 反模式预防”的唯一执行主源;不能依赖个人系统目录、代码注释、旧 evidence 或局部设计文档来替代。

读完后先判断:本轮是新增 owner、扩展已有 owner、拆分 owner、迁移测试夹具,还是只做紧急最小修复。没有完成这个判断,不得把新能力、新测试组或大段 UI 直接追加到既有文件。

任务规模

规模 识别条件 读取深度 执行方式
只改一个独立文件,逻辑不跨模块 涉及手写代码 / 测试 / 工具时先读 code-design,再读直接相关规范、项目 workflow 与源文件 直接实施
涉及 2 至 5 个文件,或影响规则、UI、测试、数据、共享行为其中两项以上 涉及手写代码 / 测试 / 工具时先读 code-design,再读 知识导航、全部命中标准、workflow 和关键源文件 先锁改动边界,再实施
多模块、多步骤依赖、系统架构或 AI 规范结构变更 读取 code-design、知识导航和相关入口后停止直接编码 先锁定对应入口;本 skill 只覆盖 AI 规范的加载和结构裁决

加载顺序

  1. 根据用户目标和当前文件范围判定任务规模。
  2. 若会改手写源码、测试、E2E、脚本、devtools 或运行时配置,先读 code-design 并完成 owner / 六大原则判断。
  3. 知识导航 选择直接相关的标准和项目 workflow。
  4. 阅读所选 workflow 的 SKILL.md;只在它明确指向时继续读 references/ 分卷。
  5. 阅读会被改动的关键源文件、接口和现有测试。
  6. 小/中任务直接在已锁定范围内继续;大任务先锁定产品任务入口或 AI 规范结构入口,不在上下文不足时试改。

边界

  • 简单的本地事实查询、用户明确限定的单文件只读查看、时间查询等不触发本 skill。
  • 用户已指定正式流程、skill 或文档时,仍先用知识导航补齐其直接相关的项目标准,不改走平行流程。
  • 规则正文只在各专项主源维护;本 skill 只决定读取深度和下钻顺序。
  • 产品需求、提案和任务编排由它们自己的系统承担,不由本 skill 路由或校验。
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · +7 lines a0c0ff611172
  2. 9d ago First seen · 32 lines · 53 tokens per session scan A a294e0ece856

Subscribe to this mod's changes

before-you-code is a skill published in the GitHub repository zhuanggenhua/BoardGame (22 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 814 once invoked, about $0.0003 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.