Skip to content
Back to skills

Write File

ASecurity

Write content to a file, creating it if it doesn't exist

  • 12 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
ai-agentsgo

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add theonlyamos/cognitrix --skill write-file --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write File?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write File
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/theonlyamos-write-file/badge)](https://www.skillsdirectory.com/skills/theonlyamos-write-file)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.