# Precise Localized Editing

> Skill: precise-localized-editing

- Skill: `dingxingdi/precise-localized-editing-2` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add dingxingdi/precise-localized-editing-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dingxingdi/precise-localized-editing-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: dingxingdi (https://skillmd.com/u/dingxingdi)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dingxingdi/precise-localized-editing-2

---


# Skill: precise-localized-editing
## 1. Capability Definition & Real Case
* **Professional Definition**:The capability to apply an instruction-driven text modification to the exact intended span or location while preserving all unrelated content, formatting, and document structure outside the requested change.
* **Dimension Hierarchy**: Revision Fidelity->Direct Text Modification->precise-localized-editing
### Real Case
**[Case 1]**
* **Initial Environment**: The agent is given a short structured passage that includes the line “On 19 December 2015 [value] reaching the Arctic …” and receives a direct instruction to delete only the placeholder token.
* **Real Question**: Delete the placeholder `[value]` from the text.
* **Real Trajectory**: The agent identifies the exact target span, checks the surrounding line for formatting invariants, applies a deletion-only patch, and verifies that no adjacent text was altered.
* **Real Answer**: `On 19 December 2015 reaching the Arctic …`
* **Why this demonstrates the capability**: The user does not want a paraphrase, stylistic rewrite, or broader cleanup. The challenge is to remove one targeted token and leave the rest of the line intact. That makes the case a direct probe of edit localization and non-target preservation.

---
**[Case 2]**
* **Initial Environment**: The agent is given a Wikipedia-style passage with a heading and two body paragraphs. The instruction asks for the heading to be changed from “Background” to “Historical Background,” while preserving all body text exactly.
* **Real Question**: Replace the heading “Background” with “Historical Background,” and do not modify any other text.
* **Real Trajectory**: The agent identifies the heading line as the sole editable region, confirms that the body paragraphs are immutable context, performs a replacement patch, and checks that line breaks and paragraph text remain unchanged.
* **Real Answer**: The same passage, except that the heading now reads “Historical Background.”
* **Why this demonstrates the capability**: The key difficulty is resisting the tendency to rephrase nearby prose. The instruction is satisfied only when the heading changes and the body does not drift at all. This separates exact edit execution from general rewriting ability.

## Pipeline Execution Instructions
To synthesize data for this capability, you must strictly follow a 3-phase pipeline. **Do not hallucinate steps.** Read the corresponding reference file for each phase sequentially:

1. **Phase 1: Environment Exploration**
   Read the exploration guidelines to discover raw knowledge seeds:
   `references/EXPLORATION.md`

2. **Phase 2: Trajectory Selection**
   Once Phase 1 is complete, read the selection criteria to evaluate the trajectory:
   `references/SELECTION.md`

3. **Phase 3: Data Synthesis**
   Once a trajectory passes Phase 2, read the synthesis instructions to generate the final data:
   `references/SYNTHESIS.md`

