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 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/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.
<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>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.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 |
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.
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.
- 2mo 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 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.
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…
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.
chinese-documentation
A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.
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…
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.
idea-to-spec
Converts vague ideas into concrete, testable specifications with acceptance criteria. No implementation begins without a spec.