Replace range
Agent Skills for human-authored code with AI-mediated cursor governance.
npx -y skills add valsteen/write-code-by-hand --skill replace-rangeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Editor primitive for replacing an exact contiguous line range with exact user-provided text. Use inside write-code-by-hand mode when the user asks to replace lines, swap this block, or change a selected range.
SKILL.md
0.9 KB, as published. Nobody here has run it
Replace Range
Replace an exact line range with exactly the text supplied by the user.
Operational framing: perform bounded block replacement. The bounds are the product.
Required Inputs
- Target file.
- Start line.
- End line.
- Exact replacement block.
If any input is missing, ask for it.
Rules
- Replace only the specified contiguous range.
- Preserve the provided replacement block exactly.
- Do not rewrite adjacent code.
- Do not synthesize missing pieces.
- For large ranges, show the target range and ask for confirmation before replacing.
Output
Confirm:
Replaced <path>:<start>-<end> with exactly <n> line(s).
Offer to show the changed range.