aiguicai/mcp-gateway/multi-edit-file
Claude Code and agent skill by aiguicai/mcp-gateway
- community
Checking that the SKILL.md file is still in the repository.
Apply validated text file operations through the gateway: exact replacements, multi-file edits, file creation, deletion, and moves. First read the complete builtin://multi_edit_file/SKILL.md to get skillToken; this SKILL.md read does not require skillToken. Do not use regex or partial reads to fetch only the token. Calls without the correct skillToken will fail and must be retried.
Install
npx vskill@latest install aiguicai/mcp-gateway/multi-edit-fileSKILL.md
Multi Edit File
Use this bundled skill for manual text-file changes. The gateway resolves all affected paths, validates the full request, applies exact replacements in memory, and only then commits the file operations. If validation fails, no file is written.
Prefer multi_edit_file over shell redirection or ad hoc scripts for normal source/config/docs edits because the gateway can audit affected paths, enforce allowed-directory policy, and return a compact delta.
Input Modes
Legacy single-file edit:
Multi-file exact edits:
Structured file operations:
Fields
pathplus top-leveleditskeeps compatibility with the original single-file mode.filesis for multiple existing files, each with its ownpathandedits.operationssupportsedit,create,delete, andmove.cwdis required when more than one allowed directory is configured.skillTokenis required for normal calls. The documentation read for this SKILL.md is the only call that does not require it.
Edit fields:
old_stringmust be exact current file text after normalizing CRLF to LF.new_stringis the replacement text.replace_allreplaces every occurrence ofold_stringin the current in-memory state.startLineis optional and 1-based. Use it when the sameold_stringappears more than once and you want the closest match to that line.
Create and move fields:
contentis required forcreate.overwritedefaults to false. When false,createormovefails if the target already exists.fromandtoare required formove.
Rules
- Read relevant current content with
read_filebefore editing unless the exact text is already in context. Use terminal reads only ifread_fileis disabled, unavailable, or unsuitable. - Use exact
old_stringtext copied from the current file, including indentation. Do not include the line-number prefix or tab fromread_fileoutput. - Keep
old_stringas small as practical while still unique. If it is not unique, either setreplace_allor providestartLine. - Do not set
old_stringequal tonew_string. - Do not use an empty
old_string; usecreatefor new files, or include surrounding existing text for insertions. - Do not touch the same path more than once in one call. Put all replacements for one file into a single
editoperation. - Order edits inside one file so a later
old_stringdoes not target text produced by an earliernew_string. - For TS, TSX, JS, and JSX template strings, write
${...}exactly. Do not escape the dollar sign as\${...}unless the target source code truly needs a literal${...}string.
Result And Events
On success, the result includes added, modified, deleted, moved, a compact delta with byte counts and affected path metadata, and a warnings array when the gateway detects likely syntax hazards such as unbalanced delimiters or accidental \${...} in TS/JS files. Warnings do not block the write; inspect and verify them before continuing.
The admin event stream records an editPreview event before policy confirmation and a finished event after completion.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmcp-gateway/crates/gateway-http/builtin-skills/multi_edit_file/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiguicai/mcp-gateway/multi-edit-file)