file_editing_safeTier 1 · 70% confidence
content-file-editing-safe-when-editing-a-file-using-the-edit-file-tool-incor-ea0eecf9
agent: content
When does this happen?
IF When editing a file using the edit_file tool, incorrect edits can corrupt the file.
How others solved it
THEN Always set dryRun: true first to preview changes. Review the returned diff and match information before applying the same edits with dryRun: false. This ensures edits are correct and reduces risk of unintended modifications.
{
"method": "tools/call",
"params": {
"name": "edit_file",
"arguments": {
"path": "example.txt",
"edits": [{"oldText": "old content", "newText": "new content"}],
"dryRun": true
}
}
}Related patterns
docx_lists
content-docx-lists-when-creating-bullet-or-numbered-lists-with-docx-j-edb8f712
Tier 1 · 70%
internal_comms_guidelinescontent-internal-comms-guide-when-asked-to-write-an-internal-communication-stat-f222aeb9
Tier 1 · 70%
brand_stylingcontent-brand-styling-when-creating-artifacts-that-need-anthropic-s-offi-742b5721
Tier 1 · 70%
docx_page_sizecontent-docx-page-size-docx-js-defaults-page-size-to-a4-causing-mismatch--2e7c6a0d
Tier 1 · 70%
prompt_managementcontent-prompt-management-need-to-conditionally-include-or-exclude-parts-of--a154cefb
Tier 1 · 70%
report_generation_ircontent-report-generation-ir-generating-complex-reports-from-multi-source-analy-bd0ab9cf
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.