| name | documents |
| description | Manage documents and files in /mnt/storage. Use this skill when users want to create, read, update, list, or organize files including notes, reports, code (HTML, CSS, JS, Python), lists, and any text-based documents. Supports Markdown, Text, HTML, CSS, JavaScript, JSON, and Python files with subfolder organization. |
| license | MIT |
| compatibility | {"os":["linux","darwin"]} |
Documents Skill - File Management Guide
Use this skill when the user wants to:
- Create new documents (notes, reports, lists, code)
- Read existing files
- List directory contents
- Update or append to existing files
- Organize files into subdirectories
- Manage any text-based files
Supported File Types
- Markdown (.md) - Notes, documentation, reports
- Plain Text (.txt) - Simple notes, lists
- HTML (.html) - Web pages, templates
- CSS (.css) - Stylesheets
- JavaScript (.js) - Scripts, web apps
- JSON (.json) - Data files, configurations
- Python (.py) - Scripts, automation
Core Operations
1. Creating Files
Basic file creation:
echo "# Meeting Notes
- Discuss project timeline
- Review budget" > /mnt/storage/notes/meeting-2024-01-15.md
echo "Shopping List:
- Milk
- Eggs
- Bread" > /mnt/storage/lists/groceries.txt
cat > /mnt/storage/projects/website/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hello World</h1>
<script src="app.js"></script>
</body>
</html>
EOF
cat > /mnt/storage/projects/website/style.css << 'EOF'
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color:
}
h1 {
color:
}
EOF
cat > /mnt/storage/projects/website/app.js << 'EOF'
// Main application script
document.addEventListener('DOMContentLoaded', () => {
console.log('App loaded');
});
EOF
cat > /mnt/storage/scripts/backup.py << 'EOF'
import os
import shutil
from datetime import datetime
source_dir = "/path/to/source"
backup_dir = f"/path/to/backup_{datetime.now().strftime('%Y%m%d')}"
shutil.copytree(source_dir, backup_dir)
print(f"Backup created: {backup_dir}")
EOF
cat > /mnt/storage/config/app-settings.json << 'EOF'
{
"app_name": "MyApp",
"version": "1.0.0",
"settings": {
"theme": "dark",
"notifications": true
}
}
EOF
2. Reading Files
Read entire file:
cat /mnt/storage/notes/meeting-2024-01-15.md
Read specific lines (e.g., first 20 lines):
head -20 /mnt/storage/reports/quarterly.txt
Read last lines:
tail -50 /mnt/storage/logs/app.log
Read with line numbers:
nl /mnt/storage/notes/ideas.md
Search within files:
grep -n "important" /mnt/storage/notes/*.md
grep -r "todo" /mnt/storage/
3. Listing Directory Contents
List files in a directory:
ls -la /mnt/storage/
List with details:
ls -lh /mnt/storage/projects/
Tree view (if tree installed):
tree /mnt/storage/
List by modification time:
ls -lt /mnt/storage/notes/ | head -20
Count files:
ls /mnt/storage/notes/ | wc -l
4. Updating and Appending Files
Append to end of file:
echo "" >> /mnt/storage/notes/meeting-2024-01-15.md
echo "## Follow-up Actions" >> /mnt/storage/notes/meeting-2024-01-15.md
echo "- [ ] Send summary to team" >> /mnt/storage/notes/meeting-2024-01-15.md
Prepend to beginning of file:
echo "# Updated: $(date)
$(cat /mnt/storage/notes/meeting-2024-01-15.md)" > /mnt/storage/notes/meeting-2024-01-15.md
Replace specific line:
sed -i '5s/.*/New content for line 5/' /mnt/storage/notes/file.md
Insert after specific line:
sed -i '3a\New line inserted here' /mnt/storage/notes/file.md
Find and replace text:
sed -i 's/old/new/g' /mnt/storage/notes/file.md
sed -i 's/old/new/' /mnt/storage/notes/file.md
5. Directory Organization
Create subdirectories:
mkdir -p /mnt/storage/{notes,projects,scripts,lists,reports,archives,websites}
mkdir -p /mnt/storage/projects/website/{css,js,images,templates}
mkdir -p /mnt/storage/projects/blog/{posts,drafts,published}
Move files:
mv /mnt/storage/temp/file.md /mnt/storage/notes/
mv /mnt/storage/draft.md /mnt/storage/projects/blog/drafts/
Copy files:
cp /mnt/storage/notes/template.md /mnt/storage/notes/meeting-2024-02-01.md
Rename files:
mv /mnt/storage/notes/old-name.md /mnt/storage/notes/new-name.md
Delete files (be careful!):
rm /mnt/storage/temp/temp-file.txt
Delete empty directories:
rmdir /mnt/storage/empty-folder/
Delete directories with content:
rm -r /mnt/storage/old-project/
Best Practices
File Naming
- Use lowercase with hyphens:
meeting-notes-2024-01-15.md
- Include dates for temporal files:
report-2024-Q1.md
- Be descriptive but concise
- Avoid spaces (use hyphens or underscores)
Directory Structure
/mnt/storage/
āāā notes/ # Quick notes, meeting notes, ideas
āāā projects/ # Active projects with subfolders
ā āāā website/
ā āāā blog/
ā āāā app/
āāā scripts/ # Python, shell scripts
āāā lists/ # Shopping lists, todo lists
āāā reports/ # Generated reports, summaries
āāā archives/ # Completed/finished projects
āāā websites/ # Static HTML websites
ā āāā site-1/
ā āāā site-2/
ā āāā css/ # Shared stylesheets
āāā config/ # Configuration files
Safety Guidelines
- Always use absolute paths (/mnt/storage/...)
- Verify directory exists before creating files
- Use quotes around paths with spaces
- Test destructive operations first (use echo to preview)
- Create backups before major changes
Quick Reference
| Task | Command |
|---|
| Create file | echo "content" > /path/to/file |
| Append to file | echo "content" >> /path/to/file |
| Read file | cat /path/to/file |
| List directory | ls -la /path/to/dir |
| Find text | grep "search" /path/to/file |
| Create directory | mkdir -p /path/to/dir |
| Move file | mv /old/path /new/path |
| Copy file | cp /source/path /dest/path |
| Delete file | rm /path/to/file |
| Find and replace | sed -i 's/old/new/g' /path/to/file |
Examples for Sandy
When user asks:
- "Create a note about my project ideas" ā Create markdown file in /mnt/storage/notes/
- "Write a Python script to backup files" ā Create .py file in /mnt/storage/scripts/
- "Make a todo list for today" ā Create markdown with checkboxes in /mnt/storage/lists/
- "Build me a simple website" ā Create HTML/CSS/JS files in /mnt/storage/websites/
- "Save this code snippet" ā Create file with appropriate extension in /mnt/storage/
Always organize files into appropriate subdirectories based on type and purpose.