write-file
Write content to file, creating new or overwriting existing. When you need to create new files, update file content, or save generated code/data.
Best use case
write-file is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Write content to file, creating new or overwriting existing. When you need to create new files, update file content, or save generated code/data.
Teams using write-file should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/write-file/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How write-file Compares
| Feature / Agent | write-file | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Write content to file, creating new or overwriting existing. When you need to create new files, update file content, or save generated code/data.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Write File
写入文件内容。
## Parameters
| 参数 | 类型 | 必填 | 说明 |
|-----|------|-----|------|
| path | string | 是 | 文件路径 |
| content | string | 是 | 文件内容 |
## Examples
**创建配置文件**:
```json
{
"path": "config.json",
"content": "{\"debug\": true}"
}
```
**写入代码文件**:
```json
{
"path": "hello.py",
"content": "print('Hello, World!')"
}
```
## Notes
- 会覆盖已存在的文件
- 自动创建父目录(如果不存在)
- 使用 UTF-8 编码
## Related Skills
- `read-file`: 读取文件
- `run-shell`: 执行脚本Related Skills
update-user-profile
Update user profile information when user shares preferences, habits, or work details. When you need to save user preferences, remember user's work domain, or provide personalized service.
skip-profile-question
Skip profile question when user explicitly refuses to answer. When user says 'I don't want to answer' or 'skip this question', use this tool to stop asking about that item.
read-file
Read file content for text files. When you need to check file content, analyze code or data, or get configuration values.
get-voice-file
Get local file path of voice message sent by user. When user sends voice message, system auto-downloads it. When you need to process user's voice message or transcribe voice to text.
get-user-profile
Get current user profile summary to understand user's preferences and context. When you need to check known user info or personalize responses.
get-image-file
Get local file path of image sent by user. When user sends image, system auto-downloads it. When you need to process user's image or analyze image content.
edit-file
Edit file by exact string replacement. Finds old_string and replaces with new_string. Safer and more token-efficient than write_file for modifying existing files. Auto-handles Windows CRLF line endings.
delete-file
Delete a file or empty directory. Non-empty directories are rejected for safety. Use run_shell for recursive deletion.
openakita/skills@file-manager
File and directory management tool for creating, reading, writing, deleting, moving, copying, and searching files. Use this skill when the user needs to perform file operations, list directories, search by pattern or content, or get file metadata like size and modification time.
openakita/skills@content-research-writer
Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Use when the user wants to write blog posts, articles, newsletters, tutorials, case studies, thought leadership pieces, or any long-form content that benefits from research and structured feedback.
openakita/skills@yuque-skills
Manage Yuque (语雀) knowledge bases, documents, and team collaboration through API integration. Supports personal search, weekly reports, knowledge base management, document CRUD, and group collaboration workflows. Based on yuque/yuque-skills.
openakita/skills@youtube-summarizer
Summarize YouTube videos by extracting transcripts and generating structured notes. Use when the user wants to summarize a YouTube video, extract key points from a talk, create study notes from a lecture, or get timestamps for important moments. Supports multiple URL formats and languages.