Verstige

Patch Trap Inspector — Development skill for Claude Code

Development community

The find-and-replace edits that silently corrupt a codebase, and how to make them safely.

How to install Patch Trap Inspector

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Verstige/patch-trap-inspector and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Patch Trap Inspector does

The find-and-replace edits that silently corrupt a codebase, and how to make them safely. Covers generic-pattern replace-all, mixed-indentation traps, template-literal damage and the byte-level recovery recipe.

Alternatives in Development

  • Generic Extract Skill — You are an Autonomous 3D Technical Artist Agent 14.1k ★
  • Scan Trap — 单独检查一只股票是不是杀猪盘 / 有没有被资金套路 6.6k ★
  • Dao Code — Open-source TypeScript terminal coding agent for DeepSeek-V4 — builds on DeepSeek's strong price-performance a 1.3k ★

README

Patch Trap Inspector: Edits That Silently Corrupt Code

The find-and-replace edits that silently corrupt a codebase, and how to make them safely. Covers generic-pattern replace-all, mixed-indentation traps, template-literal damage and the byte-level recovery recipe.

![License: MIT](https://img.shields.io/badge/License-MIT-green.svg) ![Claude Code](https://img.shields.io/badge/Claude_Code-skill-blueviolet.svg) [![Available on Agensi](https://img.shields.io/badge/Agensi-%2414.99-ff5a5f.svg)](https://agensi.io/skills/patch-trap-inspector-edits-that-silently-corrupt-code)

What it does

Inspect find-and-replace edits before they corrupt code. The workflow pitfalls of the patch tool -- fuzzy matches, replace_all, template literals -- and byte-level recovery steps.

`replace_all=true` replaces EVERY occurrence. If your `old_string` is something like `

\n Everything below is current state of the platform on main, July 27, 2026.\n

` and that paragraph appears on 8 different slides each with a UNIQUE preceding sentence, you will clobber all 8 unique leads with the same generic text.

The failure it prevents

Each reference file is one specific failure: the symptom, the actual cause, and the fix. The ones that come up most often:

  • Sequential JSX Patches — Compounding Corruption
  • Aug 01 settings page corruption
  • CSS replace_all corruption pitfall
  • Prisma generate silent failure — [Context: getDmmf] reference
  • Step 1: Replace the smaller anchor first
  • Template literal corruption — diagnostic + recovery with bytes-level operations

When to use it

  • avoid a find-and-replace that corrupts a file
  • review a patch before applying it
  • recover a file corrupted by a bad edit

What's inside

plugins/
└── patch-trap-inspector/
    ├── .claude-plugin/plugin.json
    └── skills/patch-trap-inspector/
        ├── SKILL.md
        ├── references/            (6 files)
        │   └── aug-01-jsx-corruption.md
        │   └─