whylog-record

whylog-record is a skill for Claude Code, Codex from zzusp/doc-first-dev. It costs 56 tokens per session (955 once invoked), scanned A, original, MIT.

A decision-log helper for recording why code, configuration, dependency, or design changes were made in `docs/decisions/log.md`.

In plain words
What is it for?
Use it after meaningful implementation, bug-fix, or design work to append a dated summary, alternatives considered, and relevant files.
Why use it?
It keeps important project decisions and their context from being lost after a task is finished.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after meaningful implementation, bug-fix, or design work to append a dated summary, alternatives considered, and relevant files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zzusp/doc-first-dev/whylog-record
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 zzusp/doc-first-dev --skill whylog-record
Clone the repo
git clone --depth 1 https://github.com/zzusp/doc-first-dev

Made for: Claude Code, 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 whylog-record

README.md
[![agentmods](https://agentmods.dev/badge/skills/zzusp/doc-first-dev/whylog-record/github.svg)](https://agentmods.dev/skills/zzusp/doc-first-dev/whylog-record)
Your own site
<a href="https://agentmods.dev/skills/zzusp/doc-first-dev/whylog-record"><img src="https://agentmods.dev/badge/skills/zzusp/doc-first-dev/whylog-record/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 whylog-record

Your own site · 80×15
<a href="https://agentmods.dev/skills/zzusp/doc-first-dev/whylog-record"><img src="https://agentmods.dev/badge/skills/zzusp/doc-first-dev/whylog-record.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 955 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.
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.00056 $0.00955
Opus 5.5 $0.00022 $0.00382
Sonnet 5.5 $0.00011 $0.00191
Haiku 4.5 $0.00006 $0.00096

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

Security

Grade A, and why

whylog-record 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 2mo 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.

skills/whylog-record/SKILL.md · 75 lines

What it actually says

whylog-record

在产生文件改动或技术决策的任务完成后,记录决策上下文到 docs/decisions/log.md。

0. 判断是否记录

回顾本次对话,按以下规则判断:

记录:修改了项目源码/配置/依赖、修复了 bug、做出了技术决策或方案选择

酌情记录:仅修改了文档或测试——满足以下任一条件则记录,否则跳过:① 修改时存在多个方案的选择(有取舍行为);② 修改原因不显而易见(非单纯的格式整理或拼写修正)

跳过:纯问答、纯阅读/探索、任务未完成或被取消、whylog skill 自身执行、仅修改了 docs/decisions/ 下的文件

若判断为跳过,输出一行说明(如"无需记录:纯问答")后直接结束,不执行后续步骤。

1. 确保日志文件存在

若 docs/decisions/log.md 不存在,创建目录和文件,写入 # Decision Log。

2. 写入记录

新 entry 必须追加到文件最末尾。不得插入已有 entry 之间。 写入后确认:新 entry 是文件中最后一个 ## YYYY-MM-DD HH:MM 标题,且其日期不早于前一条 entry 的日期。

写入前执行以下命令获取当前日期和时间(自动适配平台),填入标题:

date "+%Y-%m-%d %H:%M" 2>/dev/null || powershell -Command "Get-Date -Format 'yyyy-MM-dd HH:mm'"

格式自由,外层结构统一:

## YYYY-MM-DD HH:MM — {简短标题}

{1~5 句话,不要硬凑。包含以下要素,按需取舍:}
- 做了什么、为什么
- 选了什么方案、考虑过什么替代方案
- 涉及哪些关键文件

不同场景的写法参考:

  • 实现功能:选择 JWT + httpOnly cookie 而非 server-side session。原因:需支持多实例部署,session 需共享存储。考虑过 Redis session 但团队无运维经验。涉及: src/auth/middleware.ts
  • 修复 bug:修复分页偏移量计算错误,原因是 offset 从 1 开始而非 0。涉及: src/api/list.ts
  • 重构/配置:将日志轮转触发条件从行数改为 entry 数量,减少换行策略导致的触发抖动。
  • 纯决策(无代码改动):决定 API 版本策略采用 URL path 而非 header,便于调试和缓存。放弃 header 方案因客户端兼容性差。

3. 向用户展示

写入后输出一行摘要,格式固定为:

已记录: {标题} → docs/decisions/log.md

其中 {标题} 与写入的标题保持一致。用户可要求修正。

4. 日志轮转

统计 log.md 中以 ## YYYY-MM-DD HH:MM 开头的标题数量,若 >= 150:

  1. 取 log.md 中第一条 entry 标题的月份(YYYY-MM)作为归档文件名,避免跨月内容被错误归入当前月
  2. 将 log.md 全部内容追加到 docs/decisions/log-YYYY-MM.md(不存在则创建)
  3. 确认写入成功后,重建 log.md,写入 # Decision Log 和排序说明
  4. 若该归档文件超过 2000 行,拆分为 log-YYYY-MM-01.md、log-YYYY-MM-02.md …(按序递增)
  5. 告知用户已轮转至哪个归档文件
Files

What ships with it

3 files 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. 2mo ago First seen · 75 lines · 56 tokens per session scan A 7b8e31151c8b

Subscribe to this mod's changes

whylog-record is a skill published in the GitHub repository zzusp/doc-first-dev (6 stars, last pushed 6mo ago), licensed MIT. It adds 56 tokens to every session and 955 once invoked, about $0.0002 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

Other skills, from other repositories

idea-refine

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or…

addyosmani/agent-skills · 75 tokens

chinese-git-workflow

A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.

jnMetaCode/superpowers-zh · 69 tokens

chinese-documentation

A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.

jnMetaCode/superpowers-zh · 62 tokens

create-slack-app

Use when a developer wants to create, scaffold, or bootstrap a new Slack app or agent from scratch with the Slack CLI. Covers prerequisites, authentication, choosing a workspace to install into, and creating a project from a Bolt (JS or Python) template locally. Trigger on "create a Slack app", "new Bolt app", "start…

slackapi/slack-skills-plugin · 76 tokens

ai-output-validation

Validates, parses, and sanitizes AI-generated outputs before they reach end users or downstream systems. Structured output enforcement, schema validation, and fallback handling.

DevelopersGlobal/ai-agent-skills · 35 tokens

idea-to-spec

Converts vague ideas into concrete, testable specifications with acceptance criteria. No implementation begins without a spec.

DevelopersGlobal/ai-agent-skills · 25 tokens