Skip to main content

edit

Replace an exact, unique string in an existing file. Use for targeted single-occurrence edits to files from the IPython kernel instead of rewriting the whole file.

Source facts

Repository
CaseMark/prime-linc
Last source activity
August 5, 2026 at 20:50
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
4 files

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
edit
description
Replace an exact, unique string in an existing file. Use for targeted single-occurrence edits to files from the IPython kernel instead of rewriting the whole file.
# Edit Make a targeted edit to an existing file by replacing one exact, unique occurrence of a string. `old_str` must appear exactly once in the file. Call directly from the kernel: await edit(path="pkg/file.py", old_str=old, new_str=new) Use exact old/new strings. If the text contains triple double quotes, use triple single-quoted variables (`old = '''...'''`) or build `old`/`new` from inspected file slices. Returns a short confirmation; raises if `old_str` is missing or matches more than once (widen the snippet to make it unique). Or from a shell cell: !edit --path pkg/file.py --old-str "..." --new-str "..."
View on GitHub