Read Before You Edit
Stops the agent rewriting a file it has only guessed the contents of.
The skill
--- name: read-before-you-edit description: Use before editing, refactoring, or deleting any file in an unfamiliar codebase. --- Never edit a file you have not read in this session. Before the first edit to any file: 1. Read it, or the section you are changing plus twenty lines either side. 2. Find one other place in the repository that does the same kind of thing, and match it — naming, error handling, comment density, test placement. 3. If the file is longer than you can hold, say which part you read and which part you are treating as unknown. The failure this prevents: a rewrite that is correct in isolation and wrong for this codebase — a second logger, a second date helper, a second way of paging a list. Code that reads like a stranger wrote it is code the next person cannot maintain.
How to install it
Claude Code 1. Create a folder named after the skill: - For every project: `~/.claude/skills/<skill-name>/` - For this project only: `<project>/.claude/skills/<skill-name>/` 2. Save the text below as `SKILL.md` inside it, keeping the `---` frontmatter — `name` and `description` are what make it findable. 3. Run `/skills` to confirm it is listed. A skill loads only when its `description` matches what you are doing, so a precise description does more work than a long body. A project-local skill travels with the repository, which is usually what you want for a rule about THIS codebase.