Search

PythonReactSEOPDF
OpenClaw

encrypted-file-writer

写入内容到本地加密/受保护的文件,支持企业安全策略环境。支持文本文件、Word 文档 (.docx)、Excel 表格 (.xlsx) 等 80+ 种格式,通过正确的编码处理避免乱码问题。

endcy0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install endcy/encrypted-file-writer

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Encrypted File Writer - 加密文件写入器

写入内容到本地加密/受保护的文件,支持企业安全策略环境

功能特性

  • 多格式支持: 80+ 种文件类型(文本、代码、配置、Office 文档)
  • 编码安全: 自动使用 UTF-8 编码,避免乱码问题
  • 企业兼容: 支持企业安全策略环境下的授权文件写入
  • 灵活模式: 支持覆盖写入和追加模式
  • 标准输入: 支持从管道或标准输入读取内容
  • 目录自动创建: 目标目录不存在时自动创建
  • Office 支持: 直接创建/编辑 .docx 和 .xlsx(无需安装 Office)

激活条件

当用户提到以下关键词时激活:

  • "写入文件"
  • "保存文件"
  • "创建文件"
  • "写入加密文件"
  • "保存受保护的文件"
  • "写入内容到文件"
  • "避免乱码写入"
  • "企业安全策略写入"
  • "写入 docx/xlsx 文件"

使用方法

通过 exec 工具调用
# 覆盖写入
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容"

# 追加写入
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容" --append

# 从标准输入读取
echo "内容" | python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" --stdin

# 指定编码
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容" --encoding gbk
示例
# 写入文本文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\data\test.txt" "Hello World"

# 写入日志(追加模式)
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\logs\app.log" "2026-03-08 10:00:00 - 系统启动" --append

# 写入代码文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "D:\project\main.py" "print('Hello')"

# 写入配置文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "D:\config\app.json" "{\"name\": \"test\"}"

# 写入 Word 文档
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\docs\report.docx" "第一行内容"

# 追加到 Word 文档
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\docs\report.docx" "追加内容" --append

# 写入 Excel 文件(CSV 格式)
python D:\ai\workspace\skil...

Source information

Source
github
Repository
openclaw/skills
Path
skills/endcy/encrypted-file-writer
Version
—
Commit
923036a6882951551f878f47c59827c527635e3a
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Encrypted File Writer

写入内容到本地加密/受保护的文件,支持企业安全策略环境。

快速开始

安装

本 skill 已位于本地 workspace,OpenClaw 会自动加载。

基本用法
# 覆盖写入
python write_file.py "文件路径" "内容"

# 追加写入
python write_file.py "文件路径" "内容" --append

# 从标准输入读取
echo "内容" | python write_file.py "文件路径" --stdin
示例
# 写入文本文件
python write_file.py "E:\data\notes.txt" "Hello World"

# 写入日志(追加)
python write_file.py "E:\logs\app.log" "日志内容" --append

# 写入 JSON 配置
python write_file.py "D:\config\app.json" "{\"name\": \"test\"}"

功能特性

  • ✅ 支持 80+ 种文件格式
  • ✅ UTF-8 编码保护,避免乱码
  • ✅ 支持覆盖/追加两种模式
  • ✅ 自动创建目标目录
  • ✅ 企业安全策略兼容

支持的文件类型

类型 扩展名
文本 .txt, .md, .log, .csv
代码 .java, .py, .js, .ts, .go, .rs
配置 .json, .xml, .yaml, .toml, .ini
样式 .html, .css, .scss
脚本 .sh, .bat, .ps1, .sql

命令行参数

用法:python write_file.py <文件路径> [内容] [选项]

选项:
  --stdin         从标准输入读取内容
  --append, -a    追加模式(默认覆盖)
  --encoding, -e  指定编码(默认 utf-8)
  --help, -h      显示帮助信息

注意事项

  • 仅写入用户有权限访问的文件
  • 默认使用 UTF-8 编码
  • 不支持直接写入 .docx/.xlsx(需要额外依赖)

许可证

MIT License

Extracted content

SKILL.md
# Encrypted File Writer - 加密文件写入器

> 写入内容到本地加密/受保护的文件,支持企业安全策略环境

## 功能特性

- **多格式支持**: 80+ 种文件类型(文本、代码、配置、Office 文档)
- **编码安全**: 自动使用 UTF-8 编码,避免乱码问题
- **企业兼容**: 支持企业安全策略环境下的授权文件写入
- **灵活模式**: 支持覆盖写入和追加模式
- **标准输入**: 支持从管道或标准输入读取内容
- **目录自动创建**: 目标目录不存在时自动创建
- **Office 支持**: 直接创建/编辑 .docx 和 .xlsx(无需安装 Office)

---

## 激活条件

当用户提到以下关键词时激活:
- "写入文件"
- "保存文件"
- "创建文件"
- "写入加密文件"
- "保存受保护的文件"
- "写入内容到文件"
- "避免乱码写入"
- "企业安全策略写入"
- "写入 docx/xlsx 文件"

---

## 使用方法

### 通过 exec 工具调用

```bash
# 覆盖写入
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容"

# 追加写入
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容" --append

# 从标准输入读取
echo "内容" | python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" --stdin

# 指定编码
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "文件路径" "内容" --encoding gbk
```

### 示例

```bash
# 写入文本文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\data\test.txt" "Hello World"

# 写入日志(追加模式)
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\logs\app.log" "2026-03-08 10:00:00 - 系统启动" --append

# 写入代码文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "D:\project\main.py" "print('Hello')"

# 写入配置文件
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "D:\config\app.json" "{\"name\": \"test\"}"

# 写入 Word 文档
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\docs\report.docx" "第一行内容"

# 追加到 Word 文档
python D:\ai\workspace\skills\encrypted-file-writer\write_file.py "E:\docs\report.docx" "追加内容" --append

# 写入 Excel 文件(CSV 格式)
python D:\ai\workspace\skil...
README
# Encrypted File Writer

写入内容到本地加密/受保护的文件,支持企业安全策略环境。

## 快速开始

### 安装

本 skill 已位于本地 workspace,OpenClaw 会自动加载。

### 基本用法

```bash
# 覆盖写入
python write_file.py "文件路径" "内容"

# 追加写入
python write_file.py "文件路径" "内容" --append

# 从标准输入读取
echo "内容" | python write_file.py "文件路径" --stdin
```

### 示例

```bash
# 写入文本文件
python write_file.py "E:\data\notes.txt" "Hello World"

# 写入日志(追加)
python write_file.py "E:\logs\app.log" "日志内容" --append

# 写入 JSON 配置
python write_file.py "D:\config\app.json" "{\"name\": \"test\"}"
```

## 功能特性

- ✅ 支持 80+ 种文件格式
- ✅ UTF-8 编码保护,避免乱码
- ✅ 支持覆盖/追加两种模式
- ✅ 自动创建目标目录
- ✅ 企业安全策略兼容

## 支持的文件类型

| 类型 | 扩展名 |
|------|--------|
| 文本 | .txt, .md, .log, .csv |
| 代码 | .java, .py, .js, .ts, .go, .rs |
| 配置 | .json, .xml, .yaml, .toml, .ini |
| 样式 | .html, .css, .scss |
| 脚本 | .sh, .bat, .ps1, .sql |

## 命令行参数

```
用法:python write_file.py <文件路径> [内容] [选项]

选项:
  --stdin         从标准输入读取内容
  --append, -a    追加模式(默认覆盖)
  --encoding, -e  指定编码(默认 utf-8)
  --help, -h      显示帮助信息
```

## 注意事项

- 仅写入用户有权限访问的文件
- 默认使用 UTF-8 编码
- 不支持直接写入 .docx/.xlsx(需要额外依赖)

## 许可证

MIT License

Related skills

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance