# Chunked File Writer

> |

- **Type:** Skill
- **Install:** `agentstack add skill-beizi6-anti-aigc-zh-chunked-file-writer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [BeiZi6](https://agentstack.voostack.com/s/beizi6)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [BeiZi6](https://github.com/BeiZi6)
- **Source:** https://github.com/BeiZi6/anti-aigc-zh/tree/main/skills/chunked-file-writer

## Install

```sh
agentstack add skill-beizi6-anti-aigc-zh-chunked-file-writer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Chunked File Writer — 大文件安全写入策略

## 为什么需要这个 skill

单次响应有输出 token 上限。当 Write 工具的 `content` 参数过长时，内容会被静默截断——文件看起来写入成功了，但实际只有开头片段。更危险的是，重复调用 Write 会得到完全相同的截断结果，陷入无效循环。

这个问题在以下场景尤其常见：
- 含大量 LaTeX 公式的学术笔记（公式 token 密度极高）
- 长篇 Markdown 文档（课本总结、技术文档）
- 包含多个表格或代码块的文件

## 核心规则

### 1. 写入前必须估算内容量

在调用任何写入工具之前，先估算待写入内容的 token 量：
- 中文文本：约 1.5 token/字
- LaTeX 公式：约 3-5 token/字符（比纯文本密度高 2-3 倍）
- 表格、代码块：约 2 token/字符

粗略判断标准：
-  "文件名.md"  4000 tokens ──→ 优先 Agent 子进程

写入后验证
    │
    ├─ 内容完整 ──→ 完成
    │
    └─ 内容截断 ──→ 立即切换策略（禁止原样重试）
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [BeiZi6](https://github.com/BeiZi6)
- **Source:** [BeiZi6/anti-aigc-zh](https://github.com/BeiZi6/anti-aigc-zh)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-beizi6-anti-aigc-zh-chunked-file-writer
- Seller: https://agentstack.voostack.com/s/beizi6
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
