Token导航 LogoToken导航

Agent Skill · 研究检索

file-writer(文件编写器)

file-writer 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

file-writer 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 5,952。

总安装 23,736周安装 989GitHub Stars 公开资料未说明下载 7,912核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:file-writer(文件编写器)
来源仓库:https://github.com/ykaixu/file-writer
安装命令:
openclaw skills install file-writer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install file-writer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

通过读取、增量编辑小部分、验证每个更改以及使用后备恢复方法,安全写入或更新超过 5000 字节的大文件。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install file-writer;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

file-writer 怎么安装?

在终端执行 openclaw skills install file-writer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

file-writer 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

file-writer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

file-writer 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

file-writer 用的人多吗?

公开数据是累计安装 23,736 次,近一周安装 989 次,下载 7,912 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

file-writer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
file-writer

文件编写器 · 本页

23,736—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
file-writer
description
Safe file writing strategy for large files. Use when you need to write or update large files (over 5000 bytes) to avoid truncation. Provides step-by-step approach: (1) Read current state, (2) Use edit tool for precise modifications, (3) Verify results, (4) Repeat until complete. Also provides fallback strategies and error recovery.

File Writer

Safe file writing strategy for large files to avoid truncation issues.

When to Use

  • Writing files larger than 5000 bytes
  • Updating existing files with significant changes
  • Modifying specific sections of large files
  • Previous write operations were truncated
  • Need to ensure file integrity

Problem Analysis

Why Files Get Truncated

Large file writes can fail due to:

  1. Tool limitations - write tool may have byte limits per operation
  2. Network limits - Large file transfers may be truncated during transmission
  3. System limits - OpenClaw may have size limits on single operations

Safe Size Thresholds

OperationSafe SizeRisk Level
write new file< 2000 bytes✅ Safe
write new file2000-5000 bytes⚠️ Moderate
write new file> 5000 bytes❌ High risk
edit modification< 500 bytes✅ Safe
edit modification500-1000 bytes⚠️ Moderate
edit modification> 1000 bytes❌ High risk

Safe Writing Strategy

Step 1: Read Current State

Before making changes, read the current file state:

# Read the file to understand current structure
read /path/to/file.md

# For large files, read specific sections
read /path/to/file.md --offset 100 --limit 50

Purpose:

  • Understand file structure
  • Identify exact text to replace

`- Determine modification points

Step 2: Use Edit Tool for Precise Modifications

For small to medium changes, use edit tool:

Use `edit` tool with:
- `oldText`: Exact text to replace (must match exactly)
- `newText`: New text to replace with
- `file_path`: Path to the file

Best Practices:

  • Keep modifications under 500 bytes
  • Match oldText exactly (including whitespace)
  • Use unique text markers for large sections
  • Verify oldText exists before editing

Step 3: Verify Results

After each modification, verify the result:

# Check file line count
wc -l /path/to/file.md

# Read modified section
read /path/to/file.md --offset <start> --limit <lines>

# Verify file ends correctly
read /path/to/file.md --offset -10

Success Criteria:

  • File size increased as expected
  • Modified section contains new content
  • File ends correctly (not truncated)
  • No syntax errors (for code files)

Step 4: Repeat Until Complete

For large multi-section updates:

  1. Modify one section at a time
  2. Verify each modification
  3. Proceed to next section
  4. Repeat until all changes complete

Fallback Strategies

Strategy 1: Split Large Writes

If write tool fails for large content:

Split content into chunks:

1. Write first chunk (header + section 1)
2. Verify and append section 2
3. Verify and append section 3
4. Continue until complete

Strategy 2: Use Unique Markers

For complex modifications, use unique markers:

In source file:
<!-- SECTION_START: configuration -->
[existing content]
<!-- SECTION_END: configuration -->

Edit operation:
oldText: "<!-- SECTION_START: configuration -->\
[existing content]\
<!-- SECTION_END: configuration -->"
newText: "<!-- SECTION_START: configuration -->\
[new content]\
<!-- SECTION_END: configuration -->"

Strategy 3: Incremental Build

For creating new large files:

1. Create file with basic structure
2. Add sections one by one using edit
3. Verify after each addition
4. Final verification

Strategy 4: Backup and Restore

For critical file modifications:

# Create backup before modification
cp /path/to/file.md /path/to/file.md.backup

# Attempt modification
# ... (write or edit operation)

# If modification fails, restore
cp /path/to/file.md.backup /path/to/file.md

Error Recovery

Edit Tool Fails

Symptom: "Could not find exact text in file"

Causes:

  • oldText doesn't match exactly
  • Whitespace differences (spaces vs tabs)
  • File already modified
  • Text doesn't exist in file

Solutions:

  1. Re-read the file to get exact content
  2. Use unique markers for large sections
  3. Match whitespace exactly (copy from file read)
  4. Use smaller oldText for more precise matching

Write Tool Truncates

Symptom: File ends abruptly or is incomplete

Solutions:

  1. Use edit tool instead of write
  2. Split content into smaller chunks
  3. Write incrementally (section by section)
  4. Verify file size after each operation

File Corruption

Symptom: File has syntax errors or invalid content

Solutions:

  1. Restore from backup
  2. Re-read and re-verify
  3. Use incremental build strategy
  4. Validate syntax after each modification

Examples

Example 1: Adding Section to Large File

Step 1: Read file to find insertion point
read /path/to/large-file.md --offset 50 --limit 10

Step 2: Use edit to add new section
edit:
  file_path: /path/to/large-file.md
  oldText: "## Existing Section\
\
Content here"
  newText: "## Existing Section\
\
Content here\
\
## New Section\
\
New content"

Step 3: Verify
read /path/to/large-file.md --offset 50 --limit 20

Example 2: Creating Large New File

Step 1: Create basic structure
write:
  file_path: /path/to/new-file.md
  content: "# Title\
\
## Section 1\
\
Content 1"

Step 2: Add sections incrementally
edit:
  file_path: /path/to/new-file.md
  oldText: "Content 1"
  newText: "Content 1\
\
## Section 2\
\
Content 2"

Step 3: Verify
wc -l /path/to/new-file.md

Example 3: Replacing Large Section

Step 1: Read file to find exact text
read /path/to/file.md

Step 2: Use unique markers
edit:
  file_path: /path/to/file.md
  oldText: "<!-- START: old-section -->\
[old content]\
<!-- END: old-section -->"
  newText: "<!-- START: old-section -->\
[new content]\
<!-- END: old-section -->"

Step 3: Verify
read /path/to/file.md | grep "new content"

Best Practices

  1. Always read before editing - Understand current state
  2. Use edit for modifications - More precise than write
  3. Keep changes small - Under 500 bytes per edit
  4. Verify after each operation - Don't batch operations
  5. Use unique markers - For complex modifications
  6. Create backups - For critical files
  7. Handle errors gracefully - Provide recovery strategies
  8. Test incrementally - Verify each step

Decision Tree

Need to write/update file?
├─ New file?
│  ├─ < 2000 bytes?
│  │  └─ Use write tool
│  └─ > 2000 bytes?
│     └─ Use incremental build strategy
└─ Existing file?
   ├─ Small change (< 500 bytes)?
   │  └─ Use edit tool
   ├─ Medium change (500-1000 bytes)?
   │  └─ Use edit with unique markers
   └─ Large change (> 1000 bytes)?
      └─ Use incremental edit strategy

Quick Reference

TaskToolStrategy
Create small filewriteDirect write
Create large filewrite + editIncremental build
Small modificationeditDirect edit
Medium modificationeditEdit with markers
Large modificationeditIncremental edit
Replace sectioneditUnique markers
Append contenteditEdit end of file

平台分布

OpenClaw

75.4%
按下载量换算5,966

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills