What problem does it solve?
It prevents cross-platform text file corruption by routing all text-file writes through a controlled writer that automatically selects the correct encoding, BOM, and newline style for the target platform.
Core Features & Use Cases
- Forced safe path for all text writes: blocks using the built-in write tool for final text targets and requires using scripts/write_file.py for compliance and consistency.
- Automatic encoding + BOM handling: chooses utf-8 vs utf-8-sig for CSV/TSV, uses utf-16 with BOM for .reg, and uses gbk for Windows .inf and for Windows .bat/.cmd when non-ASCII is present.
- Automatic newline adaptation: generates Windows CRLF for Windows targets (Excel-friendly) and LF for macOS/Linux targets, with options to preserve existing newline/BOM when updating files.
- Use Case: When you export data as CSV for Excel in another OS, it writes the file with the correct BOM and CRLF so Chinese characters do not appear as garbled text.
Quick Start
Tell the agent to use the qclaw-text-file skill to generate a CSV at export.csv from your provided rows, targeting Windows Excel formatting.