Edit Doctor — Development skill for Claude Code
Claude Code plugin that explains failed Edits before Claude's next step: the exact whitespace, invisible-character or punctuation difference, the text that changed, which match to widen, or the file t.
How to install Edit Doctor
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open derekwden-droid/edit-doctor and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Edit Doctor does
Claude Code plugin that explains failed Edits before Claude's next step: the exact whitespace, invisible-character or punctuation difference, the text that changed, which match to widen, or the file that was probably meant.
Alternatives in Development
- Clean Worktree (Interactive) — Interactive cleanup of worktrees: lists merged/stale branches and asks confirmation before deleting 25.5k ★
- Projectmem — Open-source coding agent memory 766 ★
- Punctuation Fix — 标点符号规范化命令 695 ★
README
edit-doctor
When Claude Code's Edit tool can't find the text it was asked to replace, it fails with `String to replace not found in file.` and nothing else. The usual causes are invisible: the file indents with tabs and Claude typed spaces, a line ends in spaces Claude didn't copy, a no-break space or zero-width character sits where Claude typed a plain space, or the file changed since Claude read it. Claude usually reads the whole file again and guesses. `Found 2 matches of the string to replace` and `File does not exist` are just as bare.
edit-doctor reads the file the moment an Edit fails and tells Claude, before its next step, exactly what differs and what to use instead:
- Text not found. It finds old_string in the file again with whitespace, invisible characters and typography set aside, then lists every difference by line and column: a tab where Claude has spaces, trailing spaces, a no-break space, a zero-width character, an en dash where Claude typed a hyphen. It quotes the exact text from the file to copy. When the text really changed, it shows the closest lines and what differs in them.
- Several matches. It lists where each one is and which neighbouring line makes each unique, so Claude can widen old_string instead of guessing.
- File does not exist. For Edit and Read, it suggests the files Claude probably meant: the same name in another folder, the same name with another extension or capitalisation, or a name a typo away.
- replace_all changed more than you think. An Edit with
replace_allreports only "All occurrences were successfully replaced". edit-doctor tells Claude how many places changed and on which lines, and points out any that were inside a longer word, such asfooinsidefoobar, so a too-broad replacement gets caught right away.
Here is what Claude saw, in a real session, after an Edit that indented two lines of a Go file with spaces:
edit-doctor: the Edit to live.go failed because old_string is not in the fi
Related Skills
0x002132 Skills Bugbounty Bugcrowd Reporting
Bugcrowd-specific reporting tactics complementing report-writing: VRT category search-and-fallback strategy wh
Secondmate Verify
Run the secondmate pre-integration gate on a maker's worktree — clean tree, non-empty diff, exact-SHA match, t
Steve Name Brainstorming
Discover brand names from project sources and present only exact-match domain-available, collision-screened fi
Update Guard
Create or upgrade a Genesis agent's guard — the per-agent invariants (self_protect + must_match / must_not_mat
Fidelity Repair
Claude/Hermes agent skill: repair a rewritten text to match the original's meaning with minimal edits (cuts in
RoT DtD Commander Adiutor
The RoT DtD Commander Adiutor. Doctor and advisor in one run; checks the installed -dtd set, the hooks and the
Related Agents
Lifecycle Critic
Attacks a usability session or a brief and reports what is unsupported. Use when asked to criticise a session,
Tp Refactor Planner
PROACTIVELY use this when the user asks to "plan", "design", or "scope" a refactor, or says "I want to refacto
Cook Council
jeff council inquiry station. Independently investigate the exact active blocker union through one assigned le