Skip to content
Back to skills

Writing For Agents

ASecurity

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

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 24, 2026
ai-agentsbackend

Works with

  • claude code
  • cursor

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add YSAA1/harness-workflow --skill writing-for-agents --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Writing For Agents?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Writing For Agents
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ysaa1-writing-for-agents-harness-workflow/badge)](https://www.skillsdirectory.com/skills/ysaa1-writing-for-agents-harness-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

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

# 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`。

Files in this skill

  • SKILL.md3.3 KB
  • references/anti_entropy.md421 B
  • references/instructions-maintenance.md1.6 KB
  • references/living_docs_discipline.md585 B
  • references/planning_with_files_adaptation.md336 B
  • references/recovery_policy.md707 B
  • references/recovery_surface_policy.md2.7 KB
  • references/skill-mechanics.md2.8 KB
  • references/source_of_truth_tiers.md649 B
  • references/verification_policy.md608 B
  • references/writing-core.md11 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.