本文へ移動
cccskills
無料GitHub で公開

edit-file

Edit file by exact string replacement. Finds old_string and replaces with new_string. Safer and more token-efficient than write_file for modifying existing files. Auto-handles Windows CRLF line endings.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md1.4 KB
  • agents/openai.yaml277 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Edit File

精确字符串替换式编辑文件。

Parameters

参数类型必填说明
pathstring是文件路径
old_stringstring是要替换的原文本(须精确匹配)
new_stringstring是替换后的新文本
replace_allboolean否是否替换所有匹配项(默认 false)

Examples

修改函数名:

{
  "path": "src/main.py",
  "old_string": "def old_name():",
  "new_string": "def new_name():"
}

批量替换变量名:

{
  "path": "src/config.py",
  "old_string": "old_var",
  "new_string": "new_var",
  "replace_all": true
}

Notes

  • 修改前请先用 read_file 确认文件内容
  • old_string 必须精确匹配(包括缩进和空格)
  • 如果 old_string 匹配多处且未设 replace_all,会报错
  • 自动兼容 Windows CRLF 和 Unix LF 换行符
  • 优先使用此工具而非 write_file 来编辑现有文件

Related Skills

  • read-file: 先读取文件确认内容
  • write-file: 创建新文件或完全覆盖
  • grep: 搜索要编辑的内容位置

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Record important information to long-term memory for learning user preferences, successful patterns, and error lessons. When you need to remember user preferences, save successful patterns, or record lessons from errors.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

Click page elements by CSS selector or text content. When you need to click buttons, links, or select options. PREREQUISITE - must use browser_navigate to open target page first.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

Extract page content and element text from current webpage. When you need to read page information, get element values, scrape data, or verify page content.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

List all open browser tabs with their index, URL and title. When you need to check what pages are open, manage multiple tabs, or find a specific tab to switch to.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

Navigate browser to specified URL to open a webpage. When you need to open webpages or start web automation. PREREQUISITE - must call before browser_click/type operations. Auto-starts browser if not running.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

Open new browser tab and navigate to URL (keeps current page open). When you need to open additional page without closing current, or multi-task across pages. PREREQUISITE - must confirm browser is running first.

日本語の概要は準備中です。原文の説明を表示しています。

openakita/openakita1,9992026年9月24日 更新

openakita のスキルをすべて見る

このスキルの問題を報告する