record-decision

A workflow for recording an architectural decision in an ADR, or Architecture Decision Record—a document explaining what was chosen and why other reasonable options were rejected. The record is stored in docs/decisions/.

In plain words
What is it for?
Use it when choosing between viable technical approaches, changing a core dependency, setting a convention that affects many files, or explicitly rejecting a natural alternative.
Why use it?
Code shows what the project does but usually not why it was chosen. Keeping that reasoning prevents repeated debates and helps future contributors understand past trade-offs.

Skill for Claude CodeCodex

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 skills/yangfan-code-star/context-dev/record-decision
Any agent
npx skills add YangFan-Code-Star/context-dev --skill record-decision
Clone the repo
git clone --depth 1 https://github.com/YangFan-Code-Star/context-dev

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 580 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.00068 $0.00580
Opus 5 $0.00034 $0.00290
Sonnet 5 $0.00014 $0.00116
Haiku 4.5 $0.00007 $0.00058

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

Security

Grade A, and why

record-decision 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 yesterday.

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/skills/record-decision/SKILL.md · 42 lines

What it actually says

记录架构决策

代码能表达"做了什么",表达不了"为什么不用另一个方案"。缺了这部分,agent 会反复提议已经被否决过的东西,而你要一遍遍重新解释。

什么时候该写

  • 在两个及以上方案之间做了选择,且另一个方案也说得通
  • 引入或换掉一个核心依赖、框架、存储
  • 定下一个会扩散到很多文件的约定(金额怎么存、时间怎么表示、错误怎么传)
  • 明确否决了一个看起来很自然的做法

不该写的:没有取舍的选择("用项目已有的 logger")、随时可以改的局部实现、纯风格问题。

怎么写

  1. 找到 docs/decisions/ 里最大的编号,加一。文件名 NNNN-用短横线连接的标题.md,标题是结论不是议题——写「金额用整数最小单位存储」,不要写「关于金额存储的讨论」。
  2. 复制 docs/decisions/template.md,填写。
  3. 关键在**「其他方案」一节:把认真考虑过的方案写下来,以及放弃它的具体原因**。这一节是 ADR 全部价值所在,只写一句"性能不好"等于没写。
  4. 如果这个决策会影响日常写代码的方式,在 AGENTS.md 加一行指针,正文留在 ADR 里。

只增不改

决策变了不要改旧文件,写一份新的,然后在旧的顶部加一行:

> 已被 [ADR 0007](0007-xxx.md) 取代。

保留被推翻的记录,是为了让后来者知道"这条路走过了",而不是重新走一遍。

写完检查

  • 标题是结论,不是议题
  • 「其他方案」里每个被放弃的选项都有具体理由
  • 没有写进真实密钥、生产数据或个人信息
  • 如果影响日常写法,AGENTS.md 里留了指针
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. yesterday First seen · 42 lines · 68 tokens per session scan A a0085accfe53

Subscribe to this mod's changes

record-decision is a skill published in the GitHub repository YangFan-Code-Star/context-dev (2 stars, last pushed 14d ago), licensed MIT. It adds 68 tokens to every session and 580 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-31.

Related

Other skills, from other repositories

dsh-plugin-dev

开发 DeepSeek Harness (DSH) 插件的标准与权威参考:编写/修改/审查/调试 DSH/Cordis 插件、服务、事件、插件配置、模型工具、LLM 适配器、三种角色拆分、打包安装、workspace 包、cordis.yml 组合时使用;提到 DSH 插件、Cordis、plugin、服务、事件、工具、适配器即触发。 The authoritative standard for developing DeepSeek Harness (DSH) plugins — create, modify, review or debug DSH/Cordis plugins, services, events…

zimodzh/dsh-plugin-dev-skills · 156 tokens

agent-handoff

Cross-platform skill for Codex, Claude Code, and DeepSeek Harness (DSH) that creates, updates, compacts, rotates, repairs, and reviews durable repository handoffs. Use when bootstrapping cross-session memory; creating or maintaining AGENTHANDOFF.md and .agent-handoff files; adding AGENTS.md or .claude/CLAUDE.md rules…

WeirdSky924/agent-handoff-skill · 105 tokens

acontext-installer

Install Acontext, Login & Init Acontext Project, Add Skill Memory to Agent.

memodb-io/Acontext · 22 tokens

storage-analyzer

对 macOS 做一次只读存储分析,产出交互式 HTML 报告。流程:扫描 → 分析分级 → 生成网页 → 打开。.

Azzygoatcoder/agent-useful-skills · 319 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

Azzygoatcoder/agent-useful-skills · 37 tokens

writing-plans

Use when you have a spec or requirements for a multi-step task, before touching code.

Azzygoatcoder/agent-useful-skills · 21 tokens