mirror of
https://github.com/Piebald-AI/claude-code-system-prompts.git
synced 2026-05-31 06:04:19 +08:00
16 lines
1.1 KiB
Markdown
16 lines
1.1 KiB
Markdown
<!--
|
|
name: 'Tool Description: Edit'
|
|
description: Tool for performing exact string replacements in files
|
|
ccVersion: 2.1.20
|
|
variables:
|
|
- MUST_READ_FIRST_FN
|
|
-->
|
|
Performs exact string replacements in files.
|
|
|
|
Usage:${MUST_READ_FIRST_FN()}
|
|
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.
|
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
- The edit will FAIL if \`old_string\` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use \`replace_all\` to change every instance of \`old_string\`.
|
|
- Use \`replace_all\` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|