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.
npx agentmods add skills/zzusp/doc-first-dev/whylog-recordnpx skills add zzusp/doc-first-dev --skill whylog-recordgit clone --depth 1 https://github.com/zzusp/doc-first-devWrote 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.
[](https://agentmods.dev/skills/zzusp/doc-first-dev/whylog-record)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00056 | $0.00955 |
| Opus 5 | $0.00028 | $0.00477 |
| Sonnet 5 | $0.00011 | $0.00191 |
| Haiku 4.5 | $0.00006 | $0.00096 |
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 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.
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:
- 取
log.md中第一条 entry 标题的月份(YYYY-MM)作为归档文件名,避免跨月内容被错误归入当前月 - 将
log.md全部内容追加到docs/decisions/log-YYYY-MM.md(不存在则创建) - 确认写入成功后,重建
log.md,写入# Decision Log和排序说明 - 若该归档文件超过 2000 行,拆分为
log-YYYY-MM-01.md、log-YYYY-MM-02.md…(按序递增) - 告知用户已轮转至哪个归档文件
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.
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.
- 3d ago First seen · 75 lines · 56 tokens per session scan A 7b8e31151c8b
whylog-record is a skill published in the GitHub repository zzusp/doc-first-dev (6 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 955 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.
Other skills, from other repositories
test-driven-development
Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.
documentation-and-adrs
Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.
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…
chinese-documentation
中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.
chinese-git-workflow
国内 Git 平台配置参考——Gitee、Coding.net、极狐 GitLab、CNB 的 SSH/HTTPS/凭据/CI 接入差异与镜像同步配置。仅在用户显式 /chinese-git-workflow 时调用,不要根据上下文自动触发。.
systematic-debugging
Skill "systematic-debugging" from jnMetaCode/superpowers-zh, covering 系统化调试, 概述, 铁律, 何时使用 and 四个阶段.