Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Write File?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/theonlyamos-write-file)
---
name: write-file
description: Write content to a file, creating it if it doesn't exist
context: same
args:
- name: file_path
description: Path to the file to write
required: true
- name: content
description: Content to write to the file
required: true
- name: append
description: If true, append to file instead of overwriting
required: false
default: "false"
tags: [file, write, create]
category: system
version: "1.0.0"
author: cognitrix
allowed-tools: [Write]
safety:
risk-level: medium
---
# Write File
Write content to a file at `$(arg file_path)` using the Write tool. Write exactly
this content, nothing else:
```
$(arg content)
```
Append instead of overwriting: $(arg append). Call the Write tool once and stop.
## Usage
### Write new file
```
<filepath> content="Hello world"
```
### Write multi-line content
```
<filepath> content="Line 1\nLine 2\nLine 3"
```
### Append to existing file
```
<filepath> content="New content" append=true
```
## Notes
- Supports both absolute and relative paths
- Use `~` for home directory paths
- Parent directories are created automatically if they don't exist
- Set append=true to append instead of overwrite