safe-add

safe-add is a command for coding agents from xcodethink/open-claude-code-skills. It costs 29 tokens per session (330 once invoked), scanned A, original, MIT.

A rule for adding a new feature while leaving existing code and behavior alone. The phrase means “add X without moving or changing Y.”

In plain words
What is it for?
Use it when adding a feature, route, case, or file to an existing project with a strict minimal-change requirement. It helps review whether the work can be done by adding code only and flags risky changes such as database or navigation updates.
Why use it?
It reduces the risk that a small feature request turns into an unrelated refactor or breaks working behavior. It makes required changes to old code explicit before implementation.

Command

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 commands/xcodethink/open-claude-code-skills/safe-add
Clone the repo
git clone --depth 1 https://github.com/xcodethink/open-claude-code-skills

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 safe-add

README.md
[![agentmods](https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/safe-add.svg)](https://agentmods.dev/commands/xcodethink/open-claude-code-skills/safe-add)
Your own site
<a href="https://agentmods.dev/commands/xcodethink/open-claude-code-skills/safe-add"><img src="https://agentmods.dev/badge/commands/xcodethink/open-claude-code-skills/safe-add.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 330 The whole file, excluding the scripts and references it only reads on demand.
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.00029 $0.00330
Opus 5 $0.00015 $0.00165
Sonnet 5 $0.00006 $0.00066
Haiku 4.5 $0.00003 $0.00033

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

Security

Grade A, and why

safe-add 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 4d 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.

commands/safe-add.md · 24 lines

What it actually says

safe-add — 加 X 不动 Y(纯新增优先)

用户输入 /safe-add $ARGUMENTS 触发 纯新增路径(防 ProjectB 4-25 灾难)。

立刻读取并完整加载: ~/.claude/prompts/lib/03-实施/加X不动Y.md

按其"行为契约"段严格执行:

  1. 强制自问 3 次:能否纯新增完成?能否改成"新增 case/分支/路由"而非修改既有?最小改动几行?
  2. 必须改的旧代码 → 列清单 + 等用户 yes
  3. 实施时严守"加而不改"(加新文件 / 末尾追加分支自由,禁止重命名旧变量、删既有判断、顺便重构)
  4. 核对硬刹车清单(type / NAV / persist version / DB ALTER / 批量改 ≥5 旧文件)

参数含修饰符 → 叠加对应文件。

核心契约:用户说"加 X"时默认走纯新增,不要因为"重构起来更优雅"就动旧代码。

参数: $ARGUMENTS

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. 4d ago First seen · 24 lines · 0 tokens per session scan A da0800c416d8

Subscribe to this mod's changes

safe-add is a command published in the GitHub repository xcodethink/open-claude-code-skills (2 stars, last pushed 29d ago), licensed MIT. It adds 29 tokens to every session and 330 once invoked, about $0.0001 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-31.