Skip to content
Back to skills

Writing For Agents

ASecurity

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 har...

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

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/badge)](https://www.skillsdirectory.com/skills/ysaa1-writing-for-agents)

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: "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.md4.2 KB
  • references/anti_entropy.md535 B
  • references/instructions-maintenance.md2 KB
  • references/living_docs_discipline.md747 B
  • references/planning_with_files_adaptation.md431 B
  • references/recovery_policy.md899 B
  • references/recovery_surface_policy.md3.5 KB
  • references/skill-mechanics.md2.9 KB
  • references/source_of_truth_tiers.md786 B
  • references/verification_policy.md775 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.