Khazix WeChat Article Writer
KKKKhazix/khazix-skills
Writes long-form WeChat official account articles in the personal style of the Khazix account, from briefs, links, PDFs or rough notes, with a topic quality check.
Peri 项目博客写作风格指南。当用户说"写博客"、"写文章"、"出稿"、 "按风格写"、"博客"时触发。也适用于用户丢过来素材说"帮我写篇博客"的场景。
$ npx skills add KonghaYao/peri --skill blog-writer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install KonghaYao/peri blog-writer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/blog-writer .claude/skills/blog-writer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .claude/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add KonghaYao/peri --skill blog-writer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install KonghaYao/peri blog-writer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/blog-writer .agents/skills/blog-writer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .agents/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add KonghaYao/peri --skill blog-writer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install KonghaYao/peri blog-writer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/blog-writer .cursor/skills/blog-writer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .cursor/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/KonghaYao/peri.git --path .claude/skills/blog-writer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add KonghaYao/peri --skill blog-writer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install KonghaYao/peri blog-writer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/blog-writer .gemini/skills/blog-writer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .gemini/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install KonghaYao/peri blog-writerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add KonghaYao/peri --skill blog-writer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/blog-writer .github/skills/blog-writer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .github/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add KonghaYao/peri --skill blog-writer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install KonghaYao/peri blog-writer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/blog-writer .opencode/skills/blog-writer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "blog-writer" agent skill from https://github.com/KonghaYao/peri/tree/main/.claude/skills/blog-writer into .opencode/skills/blog-writer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "blog-writer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
blog-writerPeri 项目博客写作风格指南。当用户说"写博客"、"写文章"、"出稿"、 "按风格写"、"博客"时触发。也适用于用户丢过来素材说"帮我写篇博客"的场景。
Blog Writer is an agent skill from KonghaYao/peri. Peri 项目博客写作风格指南。当用户说"写博客"、"写文章"、"出稿"、 "按风格写"、"博客"时触发。也适用于用户丢过来素材说"帮我写篇博客"的场景。 覆盖项目介绍、技术复盘、架构讨论、性能优化、架构设计等类型。
Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Writing & Content, covering Blog and article writing. The repository describes itself as: Lightweight Rust Agent only use 50MB RAM, but Claude Code Plugin compatible, Dynamic Workflow, Goal, Artifacts, Free Web Search, full feature and better support! The licence is Apache-2.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d7ee444. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Blog Writer loads about 4.2k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 872 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from KonghaYao/peri at commit d7ee444, republished under its Apache-2.0 licence (© KonghaYao). 872 words, ~4,177 tokens.
.claude/skills/blog-writer/SKILL.md (or your agent's skills folder).基于 docs/blogs/ 下已有文章提炼,覆盖项目介绍、技术复盘、架构讨论、性能优化、架构设计等类型。
用工程师的精确度写,直接说事,不绕弯子,但要让没接触过这个领域的读者也能读下去。
每篇文章都要有一个可以一句话说清的核心论点。写之前先问自己——这篇文章想让读者记住什么?如果说不清楚,先别动笔。
工程准确和通俗易懂不矛盾。准确指的是机制不能写错、判断要有依据,不是把术语和代码堆满。读者的下限按「听过这个方向、但没碰过具体实现」来设定——术语第一次出现要带一句白话讲明白是什么,代码块能少则少。宁可多用一句白话解释,也不要让读者卡在某个词上往回翻。
与 Anthropic/Codex 博客的关系: Peri 博客借鉴了 Codex 官方博客的教学式渐进结构(先讲概念定义,再讲为什么重要,最后讲怎么做)、关键术语 bold 强调、以及丰富的交叉引用习惯。但有三个刻意的差异——(1) Peri 的段落更短(2-4 句 vs 3-5 句),保持工程师的切分感;(2) Peri 的语气更直接,可以下判断、可以表现偏好,不完全追求 Codex 的临床式冷静距离感;(3) Peri 不回避第一人称(我们、我),用个人经历和具体场景驱动叙述。
按以下六步推进,前五步每步获得用户确认后再进入下一步,第 5 步写完后接第 6 步独立审查。
第 1 步:用户提出方向,AI 用 grill 质询对齐核心命题。 用户描述想写什么——一个功能的设计理念、一个踩坑复盘、一次性能调优经历。AI 在这个阶段只问澄清性问题,不提方案。
grill 必须显式覆盖「重心维度」。同一题材往往有多个可行的重心,比如讲工具设计可以从「工具机制」切入,可以从「能力关系」切入,可以从「用户姿势」切入。让用户在 grill 阶段选重心方向,比让重心被默认成某一个、用户在初稿里发现偏移要省事得多。
grill 结束的标志是用户确认了「核心命题一句话」——这篇文章想让读者记住的那一句话。这一句话确认后再进入第 2 步出标题。标题是包装,命题是内容,确认包装之前先确认内容。
第 2 步:AI 出 N 个大标题。 AI 根据方向提 5 个大标题供选择。大标题说清楚文章对象和核心价值,不写驳论句式(「不是 X,是 Y」),不漂移到其他功能。格式参照「大标题规则」。
第 3 步:用户选大标题。 用户从 5 个中选一个,或者提出修改方向让 AI 再出 5 个。可以反复直到满意。
第 4 步:AI 出大纲,用户审阅。 AI 给出章节标题列表(小标题),每个标题只说这节讲什么行为/机制。用户审核——砍掉偏离论点的章节、调整顺序、合并冗余。大纲确认后才进入写作。
第 5 步:AI 写出全文。 严格按确认的大纲写。
动笔前必须先过写前 7 条红灯(30 秒自检,写完再查就晚了):
为什么 怎么 如何 本文 这篇文章——小标题里出现的一律改成陈述句,正文里「本文展开」「这篇文章记录」一律删除。""——和「」一样禁止,一个不留。这 7 条检查的是生成时最高频的机械性违规——标点习惯、段落结构、标题措辞和结尾套路——写完再让 subagent 抓出来修,不如写之前扫一眼直接避坑。
写完后不直接交付用户,进入第 6 步。
第 6 步:subagent 文风审查(不可跳过)。 写完全文后,派一个独立 subagent(general-purpose,全新上下文)做一轮文风审查。把本 skill 完整路径和文章路径交给 subagent,要求它按 skill 全文逐项核对,重点查这些高频违规项:
subagent 输出逐条问题清单(位置 + 原文摘录 + 违反规则 + 修改建议)后,主 agent 据此修复全部违规,再交付用户。skill 的规则在生成时容易执行不到位,独立审查是补执行漏洞的硬关卡,一次都不要省。
审查 subagent 必须持零容忍心态。 subagent 默认倾向于「合格」,需要显式指令纠正——prompt 中必须包含「宁可误判也不漏判,对违规持零容忍态度」的原则声明。高频违规项(故事性叙事、单句成段、设问自答)应从「注意」升级为「逐行扫描」,确保不被 subagent 的默认松弛心态漏掉。
subagent 审查的是 SKILL.md 的全部规则,不是字面硬规则。SKILL.md 包含许多例外条款,比如「规则类内容(项目链接、配置清单条目)不受单句成段禁令约束」、项目地址:[github.com/konghayao/peri] 作为固定结尾格式包含中文冒号、大标题允许用破折号副标题(小标题才禁)等。subagent 必须读到这些例外才不会误判。如果 subagent 环境不支持读本地文件,把 SKILL.md 全文嵌入 prompt 传递,不要只传硬规则摘要。
标题优先说清文章对象和核心价值,不机械重复项目名。站点、栏目和正文语境已经明确文章属于 Peri 时,标题直接写具体命题;只有产品介绍、版本动态、跨项目比较或脱离站点传播时,为避免对象不明才加入 Peri。
好的标题模式:
长任务的自动上下文压缩机制工具交换的原子提交Peri v2 架构说明(版本动态需要点明对象)差的标题模式:
它的 99%,是国产模型写的Peri Agent 的文件编辑工具:造了三个版本,最后一版全删了(信息量低)关于上下文压缩的一些思考副标题(破折号后)用来补充核心机制或反转点,不是重复主标题。
标题格式:优先使用 [功能或概念] 的 [机制或边界]。需要点明项目时使用 Peri [版本或产品主题],不使用 Peri Code: 作为统一前缀。
普通文章不添加项目宣传 blockquote。产品介绍或可脱离站点单独分发的专题稿若确实需要项目身份说明,只在开头语境中自然交代一次,不使用全站统一宣传模板。
永远从一个具体事实或场景切入,不宏大叙事。
| 好的开头 | 差的开头 |
|---|---|
| 「我们有一次让 Peri 分析 300 条 trace 日志,跑了 40 分钟,到 80% 时 400 报错。」 | 「随着 AI 技术的发展,上下文管理变得越来越重要。」 |
| 「翻开 git 历史,满眼都是 deepseek-v4-pro 和 glm-5.1。」 | 「今天我们来聊聊国产模型。」 |
| 「Codex 在经历几十轮对话后内存会膨胀到 2GB,随后 OOM。」 | 「内存优化是一个复杂的话题。」 |
开头不超过 3 段。第一段锚定场景,第二段点出问题,第三段引出文章方向。
首段禁止孤立单句。 不要把开头第一句话单独拿出来、前后空行当 hook 段落(如开篇一句「issue 跟踪散成这样,已经成了负债。」然后空一行才开始正文)。开头的每一段都应是完整场景锚定——一句话悬空既不是场景也不是结论,读者不知道它跟上下文的关系。把这句话并入下一段或展开成完整段落。
开头的数字必须和正文一致。 不要为了吸睛编造一个漂亮数字。如果正文才有精确数据,开头用定性描述(如「几百行代码」),不要给出一个和正文矛盾的具体数字。
反例:开头写「12 行核心代码里完成所有设计」,正文写「总计不到 400 行」——自相矛盾。
开头(具体场景/数据切入)
↓
核心结论先说(不要憋到最后)
↓
机制/过程展开(按读者最需要的顺序,不按时间顺序)
↓
关键细节(用代码块或具体例子支撑)
↓
结尾(一句话收束 + 项目链接)结论要放在前面,不是结尾。读者想先知道「这东西能做什么」,再看「怎么做到的」。
反例:compact 文章最初把「让 Agent 跑几小时不中断」放在 Micro/Full compact 机制之后——改过来之后,读者先看到价值,再看机制,逻辑更顺。
每个章节覆盖一个独立话题。 如果连续两章描述同一件事(如「调研 → 为什么不行 → 所以用了 X」和「X 的具体细节」),应该合成一条线。写完后通读,如果连续两章出现了相同的术语解释,就该合并。
场景驱动结构,不用分类驱动。 不要按「三种模式 → 五个 agent → 继承规则」这种分类目录来组织文章,这是文档不是博客。按具体使用场景来组织——「场景 1 怎么协作、场景 2 怎么协作」,每个场景自然带出相关的模式和配置。分类信息(配置表、规则列表)放附录。
每个章节必须服务于核心论点。 写完后逐章检查:这段内容是在推进核心论点,还是在讲别的东西?如果删掉某个章节后核心论点的论证完全不受影响,这个章节就不该出现在正文。配置清单、参考手册类的内容跟核心论点无关,应该降级为附录或删除。
方法论类文章的特有陷阱(「我们是怎么用 X 做 Y 的」类型):
自检信号:如果正文超过 30% 的篇幅不服务于核心论点,说明结构需要重排。
关键术语在正文首次出现时用 **bold** 强调。 每个小节引入的核心概念——如 Micro-compact、ContextBudget、prompt cache——首次出现时加粗,方便读者扫读定位。同一个术语只在首次出现时加粗,后续不再重复加粗。
交叉引用要主动、完整。 每个引用的外部概念——其他博客文章、官方文档、源码文件——在首次提及时附上可访问的链接。内部引用(同一项目下的其他博客)用该文件的中文简称 + GitHub 链接,格式参见事实核查一节。外部引用(如 Anthropic prompt caching 文档)直接附 URL。能给的链接主动给,不要等读者追要。
直接描述这一节在说什么——机制、行为、结论,不用态度性表达。
好的小标题:
所有 ToolResult 收集完再统一写入连续失败 5 次,框架注入纠正消息多个 ToolResult 必须合并进同一条 user 消息三个版本,三次加码,每次都加错了地方差的小标题:
字符串匹配,反而是对的(态度性,不够直接)为 AI 设计工具,直觉是反的(花哨,信息量低)关于工具设计的思考(空洞)我们搞错了什么(太口语,信息量低)小标题说清楚这一节讲什么,读者扫标题就能知道文章结构,不需要进去读才明白。
描述行为,不写态度。 每个小标题回答「这一节讲什么事」,而不是「作者觉得这件事怎么样」。禁止在小标题中出现判断词——「适合」「刚好」「恰好」「才是对的」——这些词在评价而非描述。标题只需给出行为和结论,不写适用性判断。
| 差 | 好 | 问题 |
|---|---|---|
回退的是一个子树,不是一条线 | 选中一条消息,之后全部截断 | 「不是一条线」是态度,「之后全部截断」是行为 |
文件恢复是尽力局,不是事务 | 文件恢复倒序执行,单条失败跳过 | 「不是事务」在反驳没人提的事,「倒序、跳过」是行为 |
工具配对验证是血的教训 | 截断后扫描未配对的工具调用和结果 | 「血的教训」是态度,「扫描配对」是机制 |
回退后自动回填,不是贴心的设计,是必须的闭环 | 回退完成后把被撤回的文本放回输入框 | 前半句在自我评价,后半句在说事 |
禁止在小标题中写代码。 不出现函数调用(textarea.insert_str())、十六进制(0x1B)、数组切片(history[..target_idx])、字面量值(false、null、is_error)等代码语法和值。也包括 CamelCase 类型标识符——ToolResult、ToolCall、ContextBudget 这类代码命名在小标题中读起来像标识符不像是概念,应替换为中文通用描述(「工具调用」「工具执行结果」「上下文预算管理器」)。小标题是给人扫读的,不是给编译器看的。
禁止在小标题中使用项目内部标记符号。 [TRAP]、[FIXED]、[P0] 这类约定标签只应在正文解释,不应出现在标题中。标题给读者扫读,标记打断节奏且需要背景知识才能理解。
禁止在小标题中用逗号串联多个信息点。 每条标题聚焦单一行为或机制的表述。用逗号把两件事拼在一起(Edit 工具 284 次失败,错误也用成功状态返回、错误改走失败返回,参数描述强调必填),读者扫不出重点。要么拆成两节,要么用「和」连接成一句。
禁止在小标题中打包多个行为(即使不用逗号)。 多个动词堆叠在一个标题里(「判定、验证、删除、改状态」「提炼并写入」),读者扫不出核心动作。超过两个动词就该拆成多节,或选定一个主行为做标题、其余在正文交代。
禁止在小标题中用 ——。 破折号用于正文句间停顿,标题直接接续。
禁止在小标题中用模糊回指修辞。 同样的返回方式、一致的错误处理 这类回指前文的说法不说清具体是什么,读者扫标题不知道这节讲什么。标题要自包含,直接点明具体行为,不依赖读者读过上一条才懂。
禁止在小标题中用设问句式。 trace 数据怎么变成错误清单、为什么不用 LSP 辅助定位 是假装提问。小标题直接陈述机制即可,不用「怎么」「如何」「为什么」开头。如果文章需要讨论一个被排除的方案,小标题写方案+被排除的原因——如「LSP 符号定位被排除:多步串行增加错误点」——直接给出结论,不用提问引出。
用工程语言描述机制,不写悬疑故事。 小标题是技术分析目录,不是章回体回目。把机制包装成悬念(「根因同源」「决定生死」「撒谎」「真相」「假象」)会降低专业感,读起来像在卖关子而不是在讲清楚。直接点明是哪个层面、什么失效、怎么判定。
| 差(故事性/悬念) | 好(机制描述) | 问题 |
|---|---|---|
三个 bug,看似无关,根因同源 | 流式数据的三层完整性边界 | 「根因同源」是叙事结论,标题应直接给出分类 |
max_tokens 截断 JSON,字段顺序决定生死 | max_tokens 截断破坏 JSON 字段完整性 | 「决定生死」戏剧化,「破坏完整性」是机制 |
stop_reason 撒谎,内容才是真相 | stop_reason 与响应内容不一致的路由判定 | 「撒谎」「真相」拟人化,「不一致的路由判定」是工程判断 |
自检信号:如果一个小标题里出现「同源」「撒谎」「真相」「生死」「假象」「玄机」这类词,说明在讲故事而非分析——把它换成对机制或行为的直接描述。
小标题描述系统行为,不描述作者动作。 生成时容易把「描述机制」误解为「描述我在做什么」。小标题的主语是系统/规则/现象,不是「我们」。
| 差(作者动作) | 好(系统行为) | 问题 |
|---|---|---|
靠三段话控制风格,第二篇就失灵 | 三段风格偏好描述在第二个题材失效 | 「靠……控制」是作者动作,「失效」是系统行为 |
扫出一篇文章里十几处孤立单句,把它写成禁令 | 孤立单句被扫出后按类型分类禁止 | 「扫出」「把它写成」是作者在干什么,「被扫出后分类禁止」是规则怎么生效 |
同一个模型检查自己的输出,漏掉一半违规 | 生成和审查用不同上下文后违例检出翻倍 | 「同一个模型检查……」描述了谁做了什么,「用不同上下文后检出翻倍」描述了机制的因果 |
模式:具体数字 → 技术概念 → 业务含义
每轮会产生 70 万次 malloc 调用,其中 97.3% 在 prompt 结束前就已释放。
严格意义上并不存在泄漏,问题出在别处。技术细节必须挂在它所属的功能下面。 描述 A 功能时,不要把 B 功能的实现细节混进来。如果两个功能的策略不同(如搜索截断 500 字符 vs 网页截断 2000 行),分别说,不要在同一段里交叉描述。
只写代码库里真实存在的东西。 如果提到一个计划中但未实现的设计,必须明确标注(如「正确的做法应该是」「我们计划加上」),不能用现在时写成既定事实。读者会把文章当成当前状态的说明,而不是路线图。
博客聚焦设计决策和用户可感知的行为。 内部类型定义、字段映射、协议细节只有在用来支撑一个关键论点时才提,不值得单独成章。如果删掉一段后读者对「为什么这样设计」的理解不受影响,那段就不该写。
代码块能少则少,整篇控制在 1-2 个。 优先用白话把「做了什么」「为什么」讲清楚,读者不需要看实现代码。只有这两种代码块值得放,且都必须是读者一眼能看懂的直观形式:
禁止放大段实现代码、函数定义、类型签名——那是文档不是博客。代码块要带注释说明场景,不要裸代码。一句话能说清的行为,绝不用代码块展示。
博客的目标读者是「听过这个方向、但没碰过具体实现」的工程师,不是项目贡献者。实现语言(Rust/Go/Python)的特有语法、内部函数名、类型标识符对读者来说是不必要的认知负担——读者只关心机制怎么运作,不关心代码里函数叫 on_bg_complete 还是 handle_completion。
原则:所有解释性文本用通用 CS 概念代替实现层术语。
代码块不是文档摘抄,是为读者展示逻辑流的示意图。用通用动词描述步骤,不用裸函数名:
| 原文(差) | 改为(好) |
|---|---|
on_bg_complete(&result) → router.route_bg_result(result) → inbox.push_defer(MessageSource::SubAgentComplete, msg) | 完成回调被触发 → 路由到对应的结果处理器 → 将结果消息写入待处理队列 |
queue empty → idle_should_wait (active_count > 0) → await_wake → ??? | 消息队列为空 → 检查活跃任务计数(> 0) → 进入阻塞等待 → 永远等不到 |
下面是实际执行过的替换,作为参考基准:
| 类型 | 原文 | 改为 |
|---|---|---|
| 内部函数调用 | push_defer → wake.notify_one() | 写入队列 → 触发唤醒信号 |
| 内部枚举/类型 | LoopResult::Completed | 已完成状态 |
| 内部方法 | idle_should_wait 返回 true | 空闲等待判断为真 |
| 内部变量 | cancel_fut | 用户取消信号 |
| 内部 API | WorkflowTaskRegistry::kill() | Workflow 任务管理器的终止方法 |
| 配置项 | max_iterations(500) | 最大 500 轮迭代限制 |
| 内部组件名 | ReAct 循环 / MessageQueue / BackgroundTaskRegistry | 推理-执行循环 / 消息队列 / 后台任务注册表 |
| 语言特有 API | tokio::spawn | 通过异步方式启动 |
| 语言特有概念 | tokio task | 异步任务 |
| 框架宏 | tokio::select! | 并发选择机制 |
| 框架 API | tokio::time::timeout | 异步超时机制 |
| 框架类型 | JoinHandle | 子进程任务句柄 |
| 框架原语 | cancel token | 取消标记 |
| 框架原语 | watch channel | 观察通道 |
| 类型标识符(CamelCase) | ToolResult、ToolCall、ContextBudget、ActOutput | 工具执行结果、工具调用、上下文预算管理器、执行输出 |
以下类型不需要转换:
[后台任务 bg-xxx 已完成]run_in_background: trueold_string 首次出现后,后续全部改用「原始文本片段」写完初稿后,用以下方法逐段扫描:
A → B → C)——箭头两端是函数名还是行为描述?函数名就改每个论点都要有一个具体的支撑例子,而不是泛泛描述。
| 抽象描述(差) | 具体场景(好) |
|---|---|
| 「行号定位不稳定」 | 「模型要改 invoke.rs 第 58 行,实际代码在第 63 行,偏了 5 行,返回成功但什么都没改」 |
| 「general-purpose 占比过高效率低」 | 「回头看,那次任务里 general-purpose 占了 73%,专用 coder 只有 12%」 |
| 「compact 后 Agent 能继续跑」 | 「消息管线重构跑了 3 小时,触发了 2 次 Full compact、4 次 Micro-compact,任务完成,中间没中断」 |
解释「为什么不用别的方案」比「我们用了什么方案」更有说服力。 每个设计决策都要说明排除了哪些替代方案、为什么排除。比如介绍 Fork 模式时,要解释「为什么不用 Sync(重复传方案浪费 token)」和「为什么不用 Background(需要汇总结果)」。没有反面论证的文章读起来像产品说明书。
决策树比散文描述更清晰。 当文章需要解释「怎么选择 X/Y/Z」时,用一个两到三层的决策树图,而不是三段平行描述。读者扫一眼决策树就能理解选择逻辑,比读完三段文字再自己归纳高效得多。
短句为主,破折号制造停顿,允许逗号串联长句推进叙事。
破折号(——)是核心标点,用于:
句子节奏:短-中-短。一句话一个判断,不在一句话里塞两个论点。
正文段落不少于两句,规则类条目不受此限。 禁止正文中单独一句话成段——一句话的观点融入前后段落,不要悬空。单句站立不住,读者扫过去不知道它跟上下文的关系。
版本迭代类叙事的段落陷阱: 「第一版……第二版……第三版……」的结构容易让每个版本的描述都变成独立短段落,甚至出现单句成段。处理方法——每个版本独占一节(h2),每节内部把「描述+问题+后果」合成一段,不拆成多段。特别关注每节第一段——如果该节第一段只有一句话(如介绍该版本的做法),它需要跟下一段(说明问题)合并;一句话做不了完整的论证单元。
零容忍:一句话前后都是空行,就是 bug。 写完通读时,把每个「前后空行夹着的单句」揪出来。这类句子通常是三种东西:预告句(「这篇文章记录……」)、过渡性总结(「同一个根因,两种失败模式」)、收束提炼(「一句话,每一层都用 X 覆盖 Y」)。处理方式按优先级:能删就删(多数是废话和预告),删了伤筋动骨就跟上文或下文合并成同一段落,绝对不要让它单独占一段。规则类内容(项目链接、配置清单条目)不受此限。
| 禁用 | 替换 |
|---|---|
| 「说白了」 | 「其实就是」「坦率说」 |
| 「本质上」 | 「说到底」「其实」 |
| 「换句话说」 | 直接说 |
| 「综上所述」 | 具体的回扣句 |
| 「值得注意的是」 | 直接说 |
| 「不难发现」 | 直接说 |
| 「让我们来看看」 | 直接开始 |
禁用标点:
禁用模式:
仅在介绍产品特性时使用,其他内容用散文。
* 🔤 **标题** — 描述,1-3 句话,结尾句号。*,不用 -干脆收束。结尾必须回应开头——开头抛出的场景、问题或判断,结尾要完成闭环。如果开头讲了 bug 故事,结尾要回扣具体的工程判断。没有呼应的结尾像没收完的尾音。
普通文章不重复项目地址。只有产品介绍、对外发布稿或明确承担转化任务的页面,才在结尾保留一次项目链接。
不用「总结」「结语」「结尾」这类字眼做章节标题——最后一段直接接在正文末尾,前面加一个空行分隔即可。结尾内容应收束全文而非给一节的标题。
结尾不要复读正文已详述的机制结构。 正文已经逐节展开,结尾再列一遍架构层次是冗余复盘。保留一句闭环足够,不要做目录式重申。
禁止开头和结尾重复同一句诗化断言。 同一句话出现在开头和结尾,极大概率是诗化收束而非事实判断——两端都删,用具体行为替代。
写完之前检查:
Grep 不是 search)docs/blogs/streaming-protocol-traps/ 时写「流式协议踩坑篇」,不写 streaming-protocol-traps写完第一稿后,逐项检查:
按质量排序,写作前可以读一遍找感觉。注意,部分参考文章写于风格调整之前,代码偏多,作为结构参考而非代码密度标杆:
docs/blogs/multi-agent-patterns/ — 场景驱动结构和通俗表述的范本,四个使用场景带出三种模式,决策树清晰docs/blogs/streaming-protocol-traps/ — 通俗化机制类文章的范本,代码块克制,术语都带白话解释docs/blogs/web-search/ — 调研类文章模板,「为什么朴素方案不行 → 所以我们自研」的论证结构docs/blogs/compact-mechanism/ — 机制类文章的结构模板docs/blogs/perf-optimization/ — 数字密度高、论证有力,但代码块偏多,作为代码量的反面参考docs/blogs/introducing-peri/ — 产品介绍类的语气和特性列表参考docs/blogs/issue-archive/ — 方法论类文章的结构范本,三层检索结构每章回答一个问题而非描述一个步骤见 docs/WRITING_TOPICS.md,每条可勾选标记。
© KonghaYao, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/blog-writer of KonghaYao/peri.
Open the folder on GitHubat commit d7ee444
Blog Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Blog Writer this skillKonghaYao/peri | 226 | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Khazix WeChat Article WriterKKKKhazix/khazix-skills | 21k | 1 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Figurevectorize-io/hindsight | 48k | — | ~1.9k | Automated safety check: Pass | MIT | |
| SepiaNanako0129/sepia | 3.1k | — | ~3.6k | Automated safety check: Pass | MIT | |
| Blog Post Draftingluongnv89/claude-howto | 42k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Notion To Blogwasp-lang/wasp | 19k | — | ~922 | Automated safety check: Pass | MIT |
KKKKhazix/khazix-skills
Writes long-form WeChat official account articles in the personal style of the Khazix account, from briefs, links, PDFs or rough notes, with a topic quality check.
vectorize-io/hindsight
Draw an animated figure (boxes, arrows, moving data) as one self-contained SVG for a GitHub README, PR, issue or blog post.
Nanako0129/sepia
Make AI-generated writing read as human-written, in fiction and in professional prose.
luongnv89/claude-howto
Guides drafting a blog post from an idea and optional source material: research, brainstorming, outlining and version-tracked drafts, with user approval at each step.
wasp-lang/wasp
Transfer a blog post from Notion to the Wasp blog. An agent skill from wasp-lang/wasp.
nteract/semiotic
Author a new entry for the Semiotic blog. An agent skill from nteract/semiotic.
KonghaYao/peri
Queries Langfuse traces, prompts, datasets and sessions, and analyzes local LLM gateway logs for requests, context growth, token use and cache hits.
KonghaYao/peri
Audits recent agent conversation history and turns repeated failures and successes into testable harness improvement proposals that later audits can check.
KonghaYao/peri
Runs commands, reads and edits files, and copies data on remote machines through a single-file Node script that wraps the system ssh and scp, in Chinese.
KonghaYao/peri
Sends a compact, redacted decision packet to a tool-free Opus advisor subagent when a task has high-risk trade-offs or stalled investigations, then weighs the answer.
KonghaYao/peri
Registers, lists and removes recurring agent tasks with five-field cron expressions, and sets safety rules so a schedule is created only when the user clearly asks.
KonghaYao/peri
Verifies and repairs a feature by using the real Peri terminal UI as a user would, looping verify, decide, fix and review until a fresh round shows no blockers.
Categories
Peri 项目博客写作风格指南。当用户说"写博客"、"写文章"、"出稿"、 "按风格写"、"博客"时触发。也适用于用户丢过来素材说"帮我写篇博客"的场景。. Blog Writer is an agent skill from KonghaYao/peri.
Blog Writer fits situations like: tasks that involve Blog and article writing.
Run `npx skills add KonghaYao/peri --skill blog-writer -a claude-code`. Or copy the skill folder (.claude/skills/blog-writer in KonghaYao/peri) into .claude/skills/blog-writer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add KonghaYao/peri --skill blog-writer -a codex`. Or copy the skill folder (.claude/skills/blog-writer in KonghaYao/peri) into .agents/skills/blog-writer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KonghaYao/peri --skill blog-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/blog-writer, .gemini/skills/blog-writer, .github/skills/blog-writer and .opencode/skills/blog-writer in your project.
SKILL.md names no scripts, command-line tools or credentials: Blog Writer is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Blog Writer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Blog Writer: Khazix WeChat Article Writer (KKKKhazix/khazix-skills, 21k stars), Figure (vectorize-io/hindsight, 48k stars), Sepia (Nanako0129/sepia, 3.1k stars) and Blog Post Drafting (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
KonghaYao (a GitHub user) maintains it in KonghaYao/peri, which has 226 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 10, 2026.
Source: KonghaYao/peri on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.