Cli file writing
How to write multi-line text files using command line interfaces.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill cli-file-writingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.7 KB, 138 tokens by cl100k_base, as published. Nobody here has run it
CLI File Writing
When creating files with specific formatting or multiple lines in a command-line environment, it is best to use tools that preserve line breaks and exact structure.
Using the write_file Tool
If your agent environment supports a direct write_file API, use it by providing the exact path and the complete text content, making sure to include necessary newline characters (\n).
Alternative Shell Commands
If no direct API is available, you can use cat with a Heredoc to write multi-line strings:
cat << 'EOF' > /path/to/file.txt
Line 1
Line 2
EOF
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.