EditorBridge Document Patch
Use this skill when the user asks for a document-wide edit in MarkEdit, Textastic, TextEdit, or iA Writer.
Prefer native tools named editor_* when available. If native tools are unavailable, use the editorbridge-mcp server with the same tool names.
Workflow:
- Call
editor_check_permissionswhen permission status is unknown. - Call
editor_snapshotbefore proposing or applying a whole-buffer mutation. - Use the snapshotted text as the source of truth. Do not infer file identity from a window title when
pathis absent. - Prefer
editor_preview_patchwithunified_diffor literal patch hunks before mutation. - Explain the intended edit briefly when the user has not already approved the exact change.
- Call
editor_apply_patchwithsnapshot_idafter verifying the patch preview. - If a full replacement is unavoidable, call
editor_apply_textwithsnapshot_id. - Read the document again and verify that the expected edit landed.
- Use
editor_restore_snapshotif the applied result is wrong and a restore is safe.
Never call editor_apply_text without snapshot_id unless the user explicitly accepts the no-snapshot risk. Treat stale snapshot errors as a stop condition, then capture a new snapshot and re-plan.