Create, revise, or audit skills, AGENTS.md, CLAUDE.md, or native memory: triggers, progressive disclosure, evals, retrospectives, memory pruning, and turning mistakes into checks. Not for user READMEs, API docs, or code comments.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Writing Agent Instructions?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/lawzava-writing-agent-instructions)
---
name: writing-agent-instructions
description: "Create, revise, or audit skills, AGENTS.md, CLAUDE.md, or native memory: triggers, progressive disclosure, evals, retrospectives, memory pruning, and turning mistakes into checks. Not for user READMEs, API docs, or code comments."
---
# Writing Agent Instructions
Choose the smallest instruction surface for the work:
- Put durable repository facts, commands, boundaries, and conventions in the
nearest applicable project instruction file.
- Put reusable task judgment or a multi-step capability in a skill.
- Put rules that must execute or block an action in tests, hooks, settings, or
a deterministic tool. Prose can guide a model but cannot enforce behavior.
Each time you correct an agent, first ask whether a check, type, lint rule,
hook, or API change can make the mistake impossible. Add prose only when none
fits, and say why. A check's failure message is itself an instruction: name
the root-cause fix, not only the violation, so the agent does not patch
around the check.
Read applicable repository instructions, nearby instructions, code, tests, and
configured tools before drafting. Attribute load-bearing statements to direct
observation, repository policy, upstream documentation, or explicit author
decisions. Remove claims that code or a command can reveal cheaply unless
their omission repeatedly causes bad decisions.
Write the minimum instruction that changes behavior. State the condition, the
required outcome, and any real boundary. Preserve user intent and existing
authorization. Say what to use ("use Y for Z"); a "do not use X" line steers
toward X and blocks edge cases where X fits. State real safety and authority
limits directly. Mark superseded routes legacy and say when to ask. Keep
examples, preferences, and hypothetical risks out of blanket prohibitions,
approval gates, fixed workflows, and extra files. Add detail only when omitting
it caused an observed failure or creates a concrete risk.
For a skill, read [skill authoring](references/skills.md). For project or
subfolder guidance, read
[repository instructions](references/repository-instructions.md). For a
retrospective, read [retrospective](references/retrospective.md); to audit native
memory, [memory hygiene](references/memory-hygiene.md).
Read multiple references only when the task spans more than one surface.
Validate new skills or material behavior changes at two boundaries: harness
discovery and format acceptance, then realistic positive, near-miss negative,
and pressure cases. Compare the same cases against the previous instructions
or no-skill baseline. Inspect task outcomes as well as activation, and keep the
change only when it improves the intended behavior without a material
regression outside its scope. For a typo or link fix that does not change
behavior, static checks suffice.