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.

1,592 stars

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

$curl -o ~/.claude/skills/write-file/SKILL.md --create-dirs "https://raw.githubusercontent.com/openakita/openakita/main/skills/system/write-file/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/write-file/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How write-file Compares

Feature / Agentwrite-fileStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

Read file content for text files. When you need to check file content, analyze code or data, or get configuration values.

get-voice-file

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

Delete a file or empty directory. Non-empty directories are rejected for safety. Use run_shell for recursive deletion.

openakita/skills@file-manager

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

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

1592
from openakita/openakita

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.