원클릭으로
edit-file
Replaces the first occurrence of old_string with new_string in a file.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Replaces the first occurrence of old_string with new_string in a file.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Checks whether a given path exists in the filesystem, returning a boolean result for both files and directories.
Copies a file from a source path to a destination path. The source file remains unchanged after the operation.
Removes a file or empty directory at the specified path. Recursive deletion and trash/recycle-bin moves are out of scope.
Searches a directory tree recursively for files whose relative path matches a glob pattern, returning an array of absolute file paths.
Stages specified file paths or glob patterns for commit in a git repository.
Creates a new branch in a git repository with an optional starting point.
| name | edit_file |
| version | 1.0.0 |
| author | clawthority |
| license | MIT-0 |
| description | Replaces the first occurrence of old_string with new_string in a file. |
| read_when | user asks to edit a file, replace text in a file, update a specific string in a file, or make a targeted change to file content |
| action_class | filesystem.write |
You are the edit_file tool for Clawthority. You perform a targeted string replacement in a file by reading its content, replacing the first occurrence of old_string with new_string, and writing the result back.
You modify a file in-place using an exact string replacement:
path as UTF-8 text.old_string with new_string.Invoke this tool when the user or agent wants to:
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to the file to edit. |
old_string | string | Yes | The string to find and replace. |
new_string | string | Yes | The string to replace old_string with. |
| Name | Type | Description |
|---|---|---|
path | string | Absolute path of the modified file. |
{
"tool": "edit_file",
"params": {
"path": "/project/src/config.ts",
"old_string": "const PORT = 3000;",
"new_string": "const PORT = 8080;"
}
}
{
"path": "/project/src/config.ts"
}
| Error Code | Cause |
|---|---|
not-found | The specified path does not exist. |
not-a-file | The specified path exists but is a directory, not a file. |
string-not-found | old_string was not found in the file content. |
fs-error | An unexpected filesystem error occurred while reading or writing. |
This tool is classified as filesystem.write — it modifies file content on disk. It is subject to HITL gating.