File Operations
This skill teaches how to operate on local files using the built-in tools.
When to Use
Load this skill when:
- Creating, reading, editing, or deleting files
- Listing a directory's contents
- Exploring the project structure
- Writing or updating documentation
Instructions
To operate on files, use the available tools directly:
List a directory: use
list_fileswith the directory path.- Relative paths resolve from the project root.
- Example:
{"path": "."}lists the project root.
Read a file: use
read_filewith the file path.- Example:
{"path": "README.md"}reads the README.
- Example:
Write a file: use
write_filewithpathandcontent.- Parent directories are created automatically.
- Example:
{"path": "notes/hello.txt", "content": "Hello world"}.
Delete a file: use
delete_filewith the file path.
Best Practices
- Always list a directory before assuming what files exist.
- Never fabricate file contents — use
read_fileto check. - When the user asks to "create" a project, write real files and report the paths.
- If the scope is limited to the project directory and the user asks for a path outside it, explain the limitation instead of failing silently.
Example Workflow
To create a small project scaffold:
list_files→ check the current structurewrite_filefor each new filelist_filesagain to confirm
Always report what was created/modified with the full paths.