multi-edit-file

通过网关应用对已验证文本文件执行精确替换、多文件编辑、文件创建、删除和移动的工具。使用前须完整读取 builtin://multi_edit_file/SKILL.md 以获取 skillToken(此次读取无需 skillToken),不得用正则或部分读取来仅获取令牌。未提供正确 skillToken 的调用将失败且需重试。

仓库最近推送
GitHub Stars
159
Forks
48
Issues / PRs
2

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "multi-edit-file":https://skillpi.com/zh/skills/deepskill-507db0fed2a4b7d8b690bbbfe2d0abab3d0ad87869666e9335517f5c0e5546c9。安装前核对上游来源和版本:https://github.com/aiguicai/MCP-Gateway。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

通过网关应用对已验证文本文件执行精确替换、多文件编辑、文件创建、删除和移动的工具。使用前须完整读取 builtin://multi_edit_file/SKILL.md 以获取 skillToken(此次读取无需 skillToken),不得用正则或部分读取来仅获取令牌。未提供正确 skillToken 的调用将失败且需重试。

0 下载

介绍来源: third_party · aiguicai · 0.0.1 参考来源

SkillPi 解读

输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: multi_edit_file
description: >-
  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.
metadata:
  bundled: true
  tool: multi_edit_file
  category: editing

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:

{
  "path": "src/example.rs",
  "edits": [
    {
      "old_string": "old text",
      "new_string": "new text",
      "replace_all": false,
      "startLine": 42
    }
  ],
  "cwd": "D:/path/to/workspace",
  "skillToken": "..."
}

Multi-file exact edits:

{
  "files": [
    {
      "path": "src/a.rs",
      "edits": [
        {
          "old_string": "old",
          "new_string": "new"
        }
      ]
    },
    {
      "path": "src/b.rs",
      "edits": [
        {
          "old_string": "enabled: false",
          "new_string": "enabled: true"
        }
      ]
    }
  ],
  "cwd": "D:/path/to/workspace",
  "skillToken": "..."
}

Structured file operations:

{
  "operations": [
    {
      "type": "edit",
      "path": "src/a.rs",
      "edits": [
        {
          "old_string": "old",
          "new_string": "new"
        }
      ]
    },
    {
      "type": "create",
      "path": "src/new.rs",
      "content": "pub fn new_file() {}\n"
    },
    {
      "type": "delete",
      "path": "src/old.rs"
    },
    {
      "type": "move",
      "from": "src/name_old.rs",
      "to": "src/name_new.rs"
    }
  ],
  "cwd": "D:/path/to/workspace",
  "skillToken": "..."
}

Fields

  • path plus top-level edits keeps compatibility with the original single-file mode.
  • files is for multiple existing files, each with its own path and edits.
  • operations supports edit, create, delete, and move.
  • cwd is required when more than one allowed directory is configured.
  • skillToken is required for normal calls. The documentation read for this SKILL.md is the only call that does not require it.

Edit fields:

  • old_string must be exact current file text after normalizing CRLF to LF.
  • new_string is the replacement text.
  • replace_all replaces every occurrence of old_string in the current in-memory state.
  • startLine is optional and 1-based. Use it when the same old_string appears more than once and you want the closest match to that line.

Create and move fields:

  • content is required for create.
  • overwrite defaults to false. When false, create or move fails if the target already exists.
  • from and to are required for move.

Rules

  1. Read relevant current content with read_file before editing unless the exact text is already in context. Use terminal reads only if read_file is disabled, unavailable, or unsuitable.
  2. Use exact old_string text copied from the current file, including indentation. Do not include the line-number prefix or tab from read_file output.
  3. Keep old_string as small as practical while still unique. If it is not unique, either set replace_all or provide startLine.
  4. Do not set old_string equal to new_string.
  5. Do not use an empty old_string; use create for new files, or include surrounding existing text for insertions.
  6. Do not touch the same path more than once in one call. Put all replacements for one file into a single edit operation.
  7. Order edits inside one file so a later old_string does not target text produced by an earlier new_string.
  8. 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.

版本历史

  1. v0.1.9 GitHub ↗
    原版更新说明

    ## Commits since v0.1.8 - feat: expand codegraph and officecli builtin tools with new commands, docs, and output improvements ([`9cfc330`](https://github.com/aiguicai/MCP-Gateway/commit/9cfc3307bf2acd6ab5ff223a804f66ec93dfe73c)) **Full Changelog:** https://github.com/aiguicai/MCP-Gateway/compare/v0.1.8...v0.1.9

  2. v0.1.8 GitHub ↗
    原版更新说明

    ## Commits since v0.1.7 - feat: require self-read for builtin skill tokens ([`c289d10`](https://github.com/aiguicai/MCP-Gateway/commit/c289d1034b91fba6eb5b21514441b5701eefb7de)) - feat(codegraph): add built-in CodeGraph skill and UI support ([`11233c3`](https://github.com/aiguicai/MCP-Gateway/commit/11233c3d338d9f0e41cd7c7f86a0667429a3d73a)) **Full Changelog:** https://github.com/aiguicai/MCP-Gateway/compare/v0.1.7...v0.1.8

  3. v0.1.7 GitHub ↗
    原版更新说明

    ## Commits since v0.1.6 - chore: bump version to 0.1.7 and update README screenshots ([`c3bc742`](https://github.com/aiguicai/MCP-Gateway/commit/c3bc742add394e165440f3942452749cf539cbef)) - refactor: deduplicate backend auth, routing, SSE, and heartbeat helpers ([`bf94241`](https://github.com/aiguicai/MCP-Gateway/commit/bf94241ee70d84fdbf1e27b4ba75aafbbe8c29a1)) **Full Changelog:** https://github.com/aiguicai/MCP-Gateway/compare/v0.1.6...v0.1.7

  4. v0.1.6 GitHub ↗
    原版更新说明

    ## Commits since v0.1.5 - fix: resolve clippy warnings in AI adapter code ([`fa658a6`](https://github.com/aiguicai/MCP-Gateway/commit/fa658a65f9977b1a725c669f6dcf9515d7fd393b)) - style: apply cargo fmt to all Rust source files ([`8d1a95b`](https://github.com/aiguicai/MCP-Gateway/commit/8d1a95b90ce544683012e55df1974a6b6f3994b0)) - feat: add AI adapter for BYOK-style external AI tool integration ([`63c4cc4`](https://github.com/aiguicai/MCP-Gateway/commit/63c4cc4b0729d5a82234530faca68e7b3a05ee0b)) - feat: add system tray with minimize-to-tray and quit support ([`396fc9f`](https://github.com/aiguicai/MCP-Gateway/commit/396fc9f2700d2e0d725b8c0760f65ce595fcde7c)) **Full Changelog:** https://github.com/aiguicai/MCP-Gateway/compare/v0.1.5...v0.1.6

  5. v0.1.5 GitHub ↗
    原版更新说明

    ## Commits since v0.1.4 - fix(skills): prevent false path-guard triggers from rg glob patterns and relative path resolution ([`719638e`](https://github.com/aiguicai/MCP-Gateway/commit/719638e15e3171797cba5570a23ed03b71e8f06b)) - feat: plans viewer modal and planningId in structured content ([`8092f83`](https://github.com/aiguicai/MCP-Gateway/commit/8092f83be24e99b5ce7c46c92948d462f894079d)) - fix: optimize the text output for timeout returns ([`94b9a4e`](https://github.com/aiguicai/MCP-Gateway/commit/94b9a4e882cc8e687a1aa057fd1af224b50681d0)) - feat: add skill groups with per-group endpoints and copy feedback fix ([`57d921e`](https://github.com/aiguicai/MCP-Gateway/commit/57d921e98fe8e75d7dca5f825011ef5046ea8fdf)) **Full Changelog:** https://github.com/aiguicai/MCP-Gateway/compare/v0.1.4...v0.1.5

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 高价值/高频刚需。直接解决用户明确的核心任务痛点,显著提升日常高频场景的效率,如自动化任务、信息聚合、内容生成等。
触发精准90/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰。
结构规范95/100

亮点

  • Phase/步骤清晰,有出口条件,含端到端示例,frontmatter完整,单文件≤500行。
执行可靠90/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常,不可逆操作有确认机制。
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。