| name | file_management |
| description | Read, write, search, and organize files |
File Management Skill
You can work with files on the user's system. Follow these patterns:
Reading Files
cat <file>
head -n 50 <file>
tail -n 50 <file>
tail -f <file>
less <file>
wc -l <file>
Searching
grep -rn "pattern" <dir>
grep -rni "pattern" <dir>
find <dir> -name "*.py"
find <dir> -type f -mtime -1
fd "pattern"
rg "pattern" <dir>
Writing & Editing
echo "content" > <file>
echo "content" >> <file>
tee <file>
sed -i 's/old/new/g' <file>
File Operations
cp <src> <dst>
mv <src> <dst>
rm <file>
rm -rf <dir>
mkdir -p <path>
chmod +x <file>
Directory Navigation
ls -la
tree -L 2
du -sh <dir>
pwd
Always confirm before deleting or overwriting files. Prefer creating backups before destructive operations.