create-text-file
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
Output
A text file created at the specified path. Returns file location, size in bytes, and line count.
Reference Commands
cat > {{FILE_PATH}} << 'EOF'
{{CONTENT}}
EOF
ls -lh {{FILE_PATH}} && wc -l {{FILE_PATH}}
Example
create a poem in the Downloads directory
write a short story and save it to my documents folder
generate a script file and save it to the home directory
create a text file with my notes
save this content to a file in Downloads
Notes
- Ensure the target directory exists before creating the file
- Use tilde (~) for home directory paths
- File extension determines the file type (.txt, .md, .py, etc.)
- Content with special characters should be properly escaped or use heredoc syntax
Weekly Installs
4
Repository
dalehurley/phpbotGitHub Stars
1
First Seen
13 days ago
Security Audits
Installed on
gemini-cli4
github-copilot4
codex4
amp4
cline4
kimi-cli4