Skip to content
Agentmart
Submit a tool

edit-file

Edit file by exact string replacement.

Skill by openakita

IndexedAGPL-3.0★ 2,005
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/openakita-edit-file

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/edit-file

What's inside

Skill name
edit-file
Description
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.
License
AGPL-3.0
Instructions
50 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

# Edit File

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

## Parameters

| 参数 | 类型 | 必填 | 说明 |
|-----|------|-----|------|
| path | string | 是 | 文件路径 |
| old_string | string | 是 | 要替换的原文本(须精确匹配) |
| new_string | string | 是 | 替换后的新文本 |
| replace_all | boolean | 否 | 是否替换所有匹配项(默认 false) |

## Examples

**修改函数名**:
```json
{
  "path": "src/main.py",
  "old_string": "def old_name():",
  "new_string": "def new_name():"
}
```

**批量替换变量名**:
```json
{
  "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`: 搜索要编辑的内容位置

From openakita/openakita, AGPL-3.0.

More from openakita/openakita

Signals

Stars
2,005
Forks
282
Open issues
39
Last commit (this folder)
May 1, 2026 (6 months ago)
Last release
Sep 15, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
AGPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from openakita

Cite this page

edit-file skill. Agent Mart. https://agentmart.dev/skills/openakita-edit-file (last updated 2026-10-24)