create-text-file
Installation
SKILL.md
Create Text File
Input Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
file_path |
Yes | Full path where the file should be created, including filename and extension | ~/Downloads/poem.txt |
content |
Yes | The text content to write to the file | In circuits deep and code so bright... |
Procedure
- Get the target directory path and file name from user if not provided (use
ask_user) - Get the text content to write from user if not provided (use
ask_user) - Create the file with content using:
cat > {{FILE_PATH}} << 'EOF'\n{{CONTENT}}\nEOF - Verify file creation and display file details:
ls -lh {{FILE_PATH}} && wc -l {{FILE_PATH}} - Report success with file location, size, and line count to user