qclaw-text-file

Route text-file writes through a Python script for cross-platform safety.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/novolei/if2Ai --skill qclaw-text-file
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: qclaw-text-file
Source: https://github.com/novolei/if2Ai/tree/main/src-tauri/resources/bundled-skills/qclaw-text-file
Command: npx skills add https://github.com/novolei/if2Ai --skill qclaw-text-file

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Intercepts unsafe final text-file writes by routing all targets through a dedicated script to ensure safe, cross-platform writing.

Core Features & Use Cases

  • Cross-platform safety: writes with platform-aware encoding and line endings to keep files readable on Windows, macOS, and Linux.
  • BOM and newline management: automatically detects or preserves BOM and newline styles to avoid corruption in CSV, JSON, or config files.
  • Platform targeting and append mode: supports targeting a Windows workflow from macOS, appending to existing files, and preserving existing file state when requested.
  • Scripted workflow: provides a self-contained Python script (scripts/write_file.py) that reads content from a file or a string and writes to the target path with robust error handling.

Quick Start

Use the write_file.py script to write content to a target file by supplying a path and a content file.

Frequently Asked Questions about qclaw-text-file

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write text files with correct encoding and newline characters across Windows, macOS, and Linux?▼

To write text files across platforms safely, route content through a Python script that normalizes newline characters and manages BOM handling, ensuring files remain readable on Windows, macOS, and Linux.

Why does my CSV or JSON file get corrupted when writing from macOS to a Windows target?▼

CSV or JSON file corruption during cross-platform writes often stems from mismatched BOM and newline styles. A dedicated script can detect and preserve these formatting rules to prevent cross-platform corruption.

What is the best way to append content to an existing text file without altering its original encoding?▼

The best way to append content while preserving existing file state is to use a script-based workflow that supports append mode and automatically maintains the original BOM and newline formatting.

Can I write text files using only Python standard library without installing external dependencies?▼

Yes, you can write text files using only the Python standard library. This skill provides a self-contained Python script with no external dependencies beyond stdlib to handle cross-platform file writing.

How do I automatically create missing folders when writing a configuration file to a new path?▼

To automatically create missing folders when writing a configuration file, the dedicated write script creates intermediate directories automatically and provides robust error handling for the target path.

Does cross-platform text file writing handle BOM detection for configuration and log files?▼

Yes, cross-platform text file writing handles BOM detection for configuration and log files, automatically detecting or preserving BOM styles to avoid corruption during workflow execution.