write_file

文件写入技能,将内容写入到指定文件

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "write_file" with this command: npx skills add dotnetage/mindx/dotnetage-mindx-write-file

写入文件技能

将内容写入到文件中,所有文件只能写入当前工作区的 documents 子目录。

功能特点

  • 自动创建不存在的目录
  • 支持自定义文件路径
  • 返回写入文件的绝对路径
  • 记录写入耗时

使用方法

写入到 documents 根目录

{
  "name": "write_file",
  "parameters": {
    "filename": "note.txt",
    "content": "这是要写入的内容"
  }
}

写入到 documents 下的子目录

{
  "name": "write_file",
  "parameters": {
    "filename": "data.json",
    "content": "{\"key\": \"value\"}",
    "path": "notes"
  }
}

写入到 documents 下的多级子目录

{
  "name": "write_file",
  "parameters": {
    "filename": "report.txt",
    "content": "报告内容",
    "path": "reports/2024"
  }
}

输出格式

{
  "file_path": "/Users/ray/projects/mindx/documents/note.txt",
  "content_length": 20,
  "elapsed_ms": 5
}

使用场景

  • 需要保存笔记或文档时
  • 需要导出数据到文件时
  • 需要创建配置文件时
  • 需要记录日志或结果时

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

read_file

No summary provided by upstream source.

Repository SourceNeeds Review
General

Converter

A local-first conversion router and format strategist. Identifies the safest local path for document, image, audio, video, archive, and data transformations....

Registry SourceRecently Updated
0142
Profile unavailable
General

write

No summary provided by upstream source.

Repository SourceNeeds Review