| name | write-file |
| description | Write content to a file at a specified path, creating or overwriting the file. This skill should be used when the user wants to create a new file or overwrite an existing file with provided content. |
Write File
Write content to a file at the specified path. Creates parent directories if they do not exist.
Usage
python scripts/write_file.py <file_path> <content>
Or via stdin:
echo "content" | python scripts/write_file.py <file_path>
Parameters
| Parameter | Type | Required | Description |
|---|
| file_path | string | Yes | Absolute or relative path to the file |
| content | string | Yes | Content to write to the file |
Behavior
- Creates parent directories automatically if they do not exist
- Overwrites existing files without warning
- Uses UTF-8 encoding
- Returns a success message with the file path on completion
- Returns an error message if write fails