Writing For Agents
ASecurityEdits 'text written for agents to read': writing and revising skills themselves; auditing and revising durable instructions such as AGENTS.md/CLAUDE.md/Cursor rules; repairing format drift in the .harness recovery surface (index/tracks/lessons, contract v2). Triggers: the user asks to write/revise a skill (写/改 skill), update or audit durable instructions (更新或审计持久指令), or repair recovery-surface format drift (修复恢复面格式漂移). Division of labor — building the workbench in a target project goes to har...
- 3 stars
- 0 votes
- 0 copies
- 2 views
- Added September 24, 2026
Works with
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add YSAA1/harness-workflow --skill writing-for-agents --agent claude-codeAre you the author of Writing For Agents?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ysaa1-writing-for-agents)---
name: writing-for-agents
description: "Edits 'text written for agents to read': writing and revising skills themselves; auditing and revising durable instructions such as AGENTS.md/CLAUDE.md/Cursor rules; repairing format drift in the .harness recovery surface (index/tracks/lessons, contract v2). Triggers: the user asks to write/revise a skill (写/改 skill), update or audit durable instructions (更新或审计持久指令), or repair recovery-surface format drift (修复恢复面格式漂移). Division of labor — building the workbench in a target project goes to harness-builder, old-layout migration goes to sweep; this skill handles only text and protocol."
---
# Writing for Agents
Write and maintain any surface agents consume: skills, `AGENTS.md` / `CLAUDE.md` / Cursor rules, documents reached by pointers, recovery/state surfaces. The packaging differs; the writing discipline does not — make the agent take the same _process_ every run, not produce the same output.
Daily task flows (brainstorm/plan/ship) do not pass through this skill: `plan` keeps the records; this skill repairs the filing system.
The core writing discipline (context pointers, the two loads, information hierarchy, completion criteria, leading words, pruning) is in `references/writing-core.md`; the invocation choice and router rules for writing a skill are in `references/skill-mechanics.md`. Read the corresponding reference before modifying any document in this skill family.
## Maintaining durable instructions
1. Discover the files actually in effect within the specified scope, distinguishing global, project, subdirectory, and generated mirrors; the Codex global entry is `$CODEX_HOME/AGENTS.md` (default `~/.codex`); Claude Code and Cursor use their own discovery mechanisms.
2. Check the rules against the current code, configuration, run entries, and user authorization, distinguishing outdated facts, conflicts, duplication, over-broad triggers, and constraints that still hold value; quality dimensions, update rules, and the optional outline are in `references/instructions-maintenance.md`.
3. Report problems with specific locations, consequences, and suggestions. Audit-only means read-only; once authorized, complete in-scope deletions, merges, migrations, and revisions, ask about key contract trade-offs, and do not re-confirm already-authorized edits.
4. Factual evidence says how the system works now; user/project contracts say how it should work; when they disagree, report — do not override the target contract with an existing bug.
## Maintaining the recovery/state surface
1. Check the project's existing recovery entries and this session's goal; old-task state does not override current instructions; read-only catch-up reports first, no writing files by default.
2. The recovery surface's format, write timing, old-layout migration, and lessons style all follow `references/recovery_surface_policy.md` (contract v2); read order is in `references/recovery_policy.md`. Choose the minimal backend from it first; the harness backend's files are only `index.md`, `tracks/<id>.md`, and `lessons.md`. `plan` opens tracks, `cleanup` closes them, `sweep` migrates old layouts; this skill repairs format drift and revises the contract itself.
3. After a repair, run `harness_lint.py` (in target projects under `scripts/`) and confirm zero ERRORs; without the lint, check the contract item by item by hand.
4. Passing the structural recoverability check is not passing business acceptance; migrate only when authorized and the benefit is clear, keeping traceability and links.
## Recommended next skill
- Narrow edit, already verified: end.
- Multi-surface workbench overhaul: `harness-builder`; user requests an independent review: `review`.
Files in this skill
- SKILL.md
- references/anti_entropy.md
- references/instructions-maintenance.md
- references/living_docs_discipline.md
- references/planning_with_files_adaptation.md
- references/recovery_policy.md
- references/recovery_surface_policy.md
- references/skill-mechanics.md
- references/source_of_truth_tiers.md
- references/verification_policy.md
- references/writing-core.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.