oneshard CLAUDE.md

oneshard CLAUDE.md is an instructions file for coding agents from windameister/oneshard. It costs 1,232 tokens per session, scanned A, original, MIT.

Project instructions for the OneShard deep-space sandbox, a headless 4X strategy simulation where players manage civilizations across a persistent universe. They define project commands, API rules, visibility limits, deterministic simulation behavior, and testing practices.

In plain words
What is it for?
Use them when adding features or fixing bugs to follow the required tests, commands, architecture, and state-change rules. TDD, or test-driven development, means writing a failing test before implementing the change.
Why use it?
They help an agent change the simulation without breaking its API contracts, hidden-information rules, deterministic engine, or action safety guarantees.

Instructions file

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/windameister/oneshard/claude-md
Clone the repo
git clone --depth 1 https://github.com/windameister/oneshard

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 oneshard CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/windameister/oneshard/claude-md.svg)](https://agentmods.dev/instructions/windameister/oneshard/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/windameister/oneshard/claude-md"><img src="https://agentmods.dev/badge/instructions/windameister/oneshard/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,232 This file is loaded in full into every session.
When invoked 1,232 The same file — it is already loaded in full.
Security scan A 1 finding. 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.1 $0.01232 $0.01232
Opus 5 $0.00616 $0.00616
Sonnet 5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 5d ago against content hash 4ee7ef8cd2d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

oneshard CLAUDE.md scanned grade A 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

冒烟(curl 端点 + 前端改动必须 Playwright 实测生产页面真实行为,包括 zh/en 双语态)。
CLAUDE.md · 56 lines

How it starts

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

深空沙盒 · 项目约定

对人类和 AI agent 同等可读可玩的持久宇宙 4X 沙盒。当前处于 Phase 0(headless 情绪验证)

常用命令

npm test                                    # vitest 全量
npm run typecheck                           # tsc --noEmit
npm run create-universe -- --name alpha     # 创世(--seed --systems --civs --tick-seconds)
npm run server -- --data data/alpha         # 起服务(--port 8420 --tick-ms 快进)
npm run cli -- --token dsx_xxx              # 人类终端客户端

铁律(改代码前读)

  1. 契约先行:MCP 工具的名字/入参/返回形状改动,必须先改 docs/api-contract.md,再改 src/server/mcp.ts 与 CLI。
  2. 无作弊视野:任何给玩家的数据必须经 src/views/views.ts 脱敏。永不输出:他人 token/配额/收件箱、迷雾外实时信息。新增字段时先想"这会不会泄露迷雾"。
  3. 确定性:引擎(src/engine、src/core)禁止 Date.now()/Math.random()——随机走 Rng.forState(state)(游标持久化),时间只有 state.tick。墙钟只允许出现在 src/server 调度层。
  4. 抛错=零副作用:行动函数(src/actions)必须先完成全部校验再 spendQuota 再变更;抛 GameError 时不允许有任何状态改动。
  5. 变更段禁止 await:并发安全靠 Node 单线程 + 同步变更段(见 GameRuntime.runCivAction)。在行动/tick 的变更路径里引入 await 会制造竞态。
  6. 平衡数值全部住在 src/core/constants.ts,标注均为临时值;改平衡不要动公式所在的引擎代码。
  7. 设计冲突时回到四支柱裁决(docs/vision.md):同规则同接口 / 决策质量>行动频率 / 事实层可欺骗物理层不可违反 / 渲染只是另一个客户端。
  8. 测试先行(TDD,2026-07-18 起):任何 feature/bugfix 按 红→绿→部署验证 三段走: ①先写会失败的测试(引擎/服务端=vitest;数值平衡=balance-sim 矩阵基线;前端=本地起服 Playwright 断言关键行为),确认红;②实现到绿(typecheck + vitest 全量);③部署后生产 冒烟(curl 端点 + 前端改动必须 Playwright 实测生产页面真实行为,包括 zh/en 双语态)。 线上缺陷修复必须附带一条修复前会失败的回归测试(例:tests/auth.test.ts 静态缓存头)。 子 agent 交付不算完成——lead 必须复验可见行为后才可提交;仅 node --check/文本 grep 不构成前端验收(2026-07-18 编年史缓存脏读事故的教训)。

子 agent 分工(Claude 任 lead 总负责,汇总与最终交付)

开发、文档、code review 三类工作都应充分委派给子 agent 并行执行:

  • codex(gpt-5.6-sol,已是 ~/.codex 默认):UI/视觉/前端为主,亦可承接一般开发与 code review。 codex exec --sandbox workspace-write -C <repo> --color never - < /tmp/brief.md
  • GLM 5.2(opencode coding plan):文档/设计文集为主,亦可承接开发与 review。 opencode run -m zai-coding-plan/glm-5.2 "$(cat /tmp/brief.md)"

协作约定:brief 落盘 /tmp/*.md(必读文件清单+交付物+硬约束);每个 agent 划互不相交的 文件范围;共享契约(docs/api-contract.md)由 lead 先行改定,子 agent 只读;子 agent 禁跑 git;两者都后台并行跑(run_in_background),lead 验收集成后统一提交。

Read the full file on GitHub · 56 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 · 56 lines · 1,232 tokens per session scan A 4ee7ef8cd2d6

Subscribe to this mod's changes

oneshard CLAUDE.md is an instructions file published in the GitHub repository windameister/oneshard (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,232 tokens to every session, about $0.0062 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.