agentleFS
YSAA1YSAA1/harness-workflow/skills/writing-for-agents/SKILL.md

writing-for-agents

Skill3 starsChanged 14 days agoMITView on GitHub

改「给 agent 读的文字」:skills 本身的写作与修订、AGENTS.md/CLAUDE.md/Cursor rules 等持久指令的审计修订、修复 .harness 恢复面(index/tracks/lessons,合同 v2)的格式漂移。触发:用户要求写/改 skill、更新或审计持久指令、修复恢复面格式漂移;分工——在目标项目搭工作台用 harness-builder,旧布局迁移用 sweep,本 skill 只管文字与协议。

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wait-what, to-questionnaire and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AWSSkill

    wait-what

    Stop. That last message did not land: re-pitch it.

    Also in 115 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 83 projects that use this

  • J03Fr0stSkill

    writing-for-humans

    Write and revise human-facing prose so it is clear, specific, natural, and faithful to the author's intent and genre. Use for emails, chat messages, articles, reports, documentation, announcements, talks, and other prose when the user asks to draft, diagnose, edit, rewrite, make writing less formulaic or less AI-like, sound more natural or direct, or match a supplied voice. Do not use for agent instructions such as skills or AGENTS.md, code-only work, verbatim transcription, or translation without editorial changes.

    Also in 5 projects that use this

  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 34 projects that use this

  • openchamberSkill

    clack-cli-patterns

    Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.

    Also in 3 projects that use this

  • MicrosoftSkill

    cloud-architecture-diagram

    Create, edit, or troubleshoot Azure-first architecture diagrams as editable draw.io files, with AWS and multicloud topology support and identity, API, and CI/CD flow diagrams. Use for architecture visualization, network boundaries, interaction flows, or missing diagram icons. Not for deploying infrastructure, live cloud discovery, security certification, or unrelated charts.

    Also in 3 projects that use this

  • +1 more from aws

The file

Files
SKILL.md

Writing for Agents

写并维护 agent 消费的任何面:skills、AGENTS.md / CLAUDE.md / Cursor rules、指针到达的文档、恢复/状态面。包装不同,写作纪律不变——让 agent 每次运行走同样的过程,而不是产出同样的结果。

日常任务流(brainstorm/plan/ship)不经过本 skill:plan 负责建档,本 skill 负责修档案系统。

核心写作纪律(context pointers、两种负载、信息层级、完成判据、leading words、pruning)见 references/writing-core.md;写 skill 的 invocation 选择与 router 规则见 references/skill-mechanics.md。修改本 skill 族任何文档前先读对应 reference。

维护持久指令

  1. 发现指定范围内实际生效的文件,区分全局、项目、子目录及生成镜像;Codex 全局入口 $CODEX_HOME/AGENTS.md(默认 ~/.codex),Claude Code 与 Cursor 用各自发现机制。
  2. 将规则与当前代码、配置、运行入口和用户授权对照,区分过时事实、冲突、重复、过宽触发和仍有价值的约束;质量维度、更新规则与可选大纲见 references/instructions-maintenance.md。
  3. 以具体位置、后果和建议报告问题。只要求审计时只读;已授权时完成范围内删除、合并、迁移和修订,关键合同取舍询问,不重复确认已授权修改。
  4. 事实证据说明系统现在如何工作,用户/项目合同说明应该如何工作;不一致时报告,不用现有 bug 覆盖目标合同。

维护恢复/状态面

  1. 检查项目已有恢复入口和本次目标;旧任务状态不覆盖当前指令,只读 catch-up 先报告,不默认写文件。
  2. 恢复面的格式、写入时机、旧布局迁移与 lessons 写法都以 references/recovery_surface_policy.md(合同 v2)为准,读取顺序见 references/recovery_policy.md。先按它选最小 backend;harness backend 的文件只有 index.md、tracks/<id>.md、lessons.md。开轨道由 plan 做,关轨道由 cleanup 做,旧布局迁移由 sweep 做;本 skill 负责修复格式漂移和改写合同本身。
  3. 修复后跑 harness_lint.py(目标项目在 scripts/)确认零 ERROR;没有 lint 时按合同逐条手查。
  4. 结构可恢复性检查通过不等于业务验收通过;迁移只在授权且收益明确时做,保留追溯和链接。

Recommended next skill

  • 窄修改已验证:结束。
  • 多类工作台改造:harness-builder;用户要求独立审阅:review。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.