filesystem
Filesystem Skill
Overview
Direct filesystem operations without external dependencies. Read, write, edit, list, copy, move, and search files.
Usage
Use the available builtin tools to perform file operations directly. Commonly used tools for this skill are: list_dir, read_file, file_create, edit_file_by_lines, grep, and bash.
When the task requires programmatic/structured processing (e.g., parsing complex formats or batch transformations), python_repl can be used as an advanced fallback.
- Paths can be absolute or relative to working_dir
- Parent directories are created automatically for write operations
- For complex file operations not covered by builtin tools, use
bash
Common Recipes
JSON
import json
# Read
with open('data.json', 'r', encoding='utf-8') as f:
data = json.load(f)
# Write (pretty-printed)
with open('output.json', 'w', encoding='utf-8') as f:
json.dump(data, f, indent=2, ensure_ascii=False)
CSV
import csv
# Read
with open('data.csv', 'r', encoding='utf-8') as f:
reader = csv.DictReader(f)
for row in reader:
print(row)
# Write
with open('output.csv', 'w', newline='', encoding='utf-8') as f:
writer = csv.DictWriter(f, fieldnames=['name', 'value'])
writer.writeheader()
writer.writerows([{'name': 'a', 'value': 1}])
YAML
# Requires: pip install pyyaml
import yaml
# Read
with open('config.yaml', 'r') as f:
data = yaml.safe_load(f)
# Write
with open('output.yaml', 'w') as f:
yaml.dump(data, f, default_flow_style=False, allow_unicode=True)
Directory Operations
# List files recursively
find . -type f -name "*.py"
# Directory size
du -sh /path/to/dir
# Copy directory
cp -r src/ dst/
# Move/rename
mv old_name.txt new_name.txt
File Search
# Search file contents (grep)
grep -r "search_term" --include="*.py" .
# Find files by name
find . -name "*.log" -mtime -7 # Modified in last 7 days
# Count lines
wc -l *.py
Text Processing
# Sort and deduplicate
sort file.txt | uniq > sorted.txt
# Extract columns
cut -d',' -f1,3 data.csv
# Replace text
sed -i '' 's/old/new/g' file.txt # macOS
sed -i 's/old/new/g' file.txt # Linux
More from memento-teams/memento-skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of \"Word doc\", \"word document\", \".docx\", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a \"report\", \"memo\", \"letter\", \"template\", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
9web-search
Web search and content fetching. Use when the user needs to search the web for information or fetch content from URLs.
9skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
9pptx
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
8pdf
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
8xlsx
Open, create, read, analyze, edit, or validate Excel/spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use when the user asks to create, build, modify, analyze, read, validate, or format any Excel spreadsheet, financial model, pivot table, or tabular data file. Covers: creating new xlsx from scratch, reading and analyzing existing files, editing existing xlsx with zero format loss, formula recalculation and validation, and applying professional financial formatting standards. Triggers on 'spreadsheet', 'Excel', '.xlsx', '.csv', 'pivot table', 'financial model', 'formula', or any request to produce tabular data in Excel format.
8