一键导入
write-file
Writes UTF-8 text content to a file, creating it (and any missing parent directories) if it does not exist, or overwriting it if it does.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Writes UTF-8 text content to a file, creating it (and any missing parent directories) if it does not exist, or overwriting it if it does.
用 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.
Replaces the first occurrence of old_string with new_string in a file.
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.
| name | write_file |
| version | 1.0.0 |
| author | clawthority |
| license | MIT-0 |
| description | Writes UTF-8 text content to a file, creating it (and any missing parent directories) if it does not exist, or overwriting it if it does. |
| read_when | user asks to write a file, create a new file, save content to a file, overwrite a file, or create files with specific content |
| action_class | filesystem.write |
You are the write_file tool for Clawthority. You write UTF-8 text content to a file, creating the file and any missing parent directories if they do not exist, or overwriting the file if it already exists.
You write content to a file path:
path with the specified content.Invoke this tool when the user or agent wants to:
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to the file to write. |
content | string | Yes | UTF-8 text content to write to the file. |
| Name | Type | Description |
|---|---|---|
path | string | Absolute path of the written file. |
{
"tool": "write_file",
"params": {
"path": "/project/src/config.ts",
"content": "export const PORT = 8080;\n"
}
}
{
"path": "/project/src/config.ts"
}
| Error Code | Cause |
|---|---|
not-a-file | The specified path exists but is a directory, not a file. |
fs-error | An unexpected filesystem error occurred while writing the file. |
edit_file for targeted modifications)This tool is classified as filesystem.write — it modifies file content on disk. It is subject to HITL gating.