filesystem
Skill340 starsChanged 7 months agoMITView on GitHub
File and directory operations via Claude Code built-in tools, replacing the Filesystem MCP server. Triggers on: "read this file", "write to file", "edit file", "find files matching", "search for text in files", "list directory", "show directory tree", "rename file".
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
All file and directory operations use Claude Code's built-in tools.
- Very specific: line 38
Use the Read tool with an absolute path:
- Very specific: line 78
Use the Write tool to create a file or overwrite an existing one:
- Very specific: line 90
Use the Edit tool for surgical modifications — replace exact string matches:
- Distinctive: line 208
Always confirm with the user before deleting files or directories.
- Very specific: line 242
Check project structure: fd .
- Very specific: line 243
Read configuration: Read: package.json or Read: pyproject.toml
- Distinctive: line 245
Read key files identified above
- Very specific: line 275
Glob: only matches files, not directories.
- Distinctive: line 282
Read before Edit: Always read a file before editing it.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Filesystem
All file and directory operations use Claude Code's built-in tools. No MCP server needed — native tools are faster, more capable, and cost zero context tokens when idle.
Quick Reference
| Filesystem MCP Tool | Replacement | Notes |
read_file(path) | Read tool | Supports line offset and limit |
read_multiple_files(paths) | Multiple parallel Read calls | Faster than sequential MCP calls |
write_file(path, content) | Write tool | Overwrites entire file |
edit_file(path, edits) | Edit tool | Exact string replacement; surgical edits |
list_directory(path) | Glob or Bash ls | Glob for patterns, ls for simple listing |
directory_tree(path) | Bash fd or Glob **/* | fd is fastest; Glob for pattern filtering |
search_files(pattern, path) | Grep tool | Full regex, file type filters, context lines |
create_directory(path) | Bash mkdir -p | -p creates intermediate directories |
move_file(src, dst) | Bash mv | Also handles renames |
get_file_info(path) | Bash stat or Bash ls -la | Size, permissions, timestamps |
list_allowed_directories | N/A | Claude Code operates in the working directory; no sandbox restrictions |
Reading Files
Read a Single File
Use the Read tool with an absolute path:
Read: /path/to/file.pyFor large files, use offset and limit to read specific sections:
Read: /path/to/file.py (offset: 100, limit: 50)This reads 50 lines starting from line 100. Use this for files with thousands of lines to avoid flooding context.
Read Multiple Files in Parallel
Issue multiple Read calls in a single response. Claude Code executes them concurrently:
Read: /path/to/file1.py
Read: /path/to/file2.py
Read: /path/to/file3.pyParallel reads are faster than the MCP's read_multiple_files which serialized internally.
Read Images and PDFs
The Read tool handles binary formats:
- Images (PNG, JPG, SVG): displayed visually
- PDFs: extracted text; use
pages: "1-5"for large documents (max 20 pages per call)
Writing and Editing Files
Write a New File
Use the Write tool to create a file or overwrite an existing one:
Write: /path/to/new-file.py
Content: <full file content>The Write tool requires reading the file first if it already exists. For new files,
write directly.
Edit an Existing File
Use the Edit tool for surgical modifications — replace exact string matches:
Edit: /path/to/file.py
old_string: "def old_function():"
new_string: "def new_function():"The Edit tool fails if old_string is not unique in the file. Provide enough
surrounding context to make the match unique, or use replace_all: true for
find-and-replace across the entire file.
Prefer Edit over Write for existing files. Edit preserves everything outside the changed region and shows a clear diff. Write replaces the entire file.
Finding Files
By Name Pattern (Glob)
Glob: **/*.py → all Python files recursively
Glob: src/**/*.ts → TypeScript files under src/
Glob: *.md → Markdown files in current directory
Glob: **/test_*.py → test files anywhere in the treeResults are sorted by modification time (most recent first).
By Content (Grep)
Grep: pattern="def process_data" type="py"
Grep: pattern="TODO|FIXME" glob="*.py"
Grep: pattern="class.*Controller" output_mode="content" -C=2| Grep Parameter | Purpose |
pattern | Regex pattern to match |
type | File type filter (py, js, ts, rust, go, etc.) |
glob | Glob pattern filter (*.tsx, src/**/*.py) |
output_mode | files_with_matches (default), content, count |
-C, -A, -B | Context lines: around, after, before matches |
-i | Case-insensitive search |
Directory Listing
Simple listing:
ls -la /path/to/directoryRecursive tree with fd:
fd . /path/to/directory --type fTree with depth limit:
fd . /path/to/directory --type f --max-depth 2Filter by extension:
fd -e py /path/to/directoryFile Operations
Create Directory
mkdir -p /path/to/new/directoryThe -p flag creates all intermediate directories. Always verify the parent path
exists first with ls.
Move / Rename
mv /path/to/source.py /path/to/destination.pyRename a file (same directory):
mv /path/to/old-name.py /path/to/new-name.pyMove a directory:
mv /path/to/source-dir /path/to/destination-dirCopy
cp /path/to/source.py /path/to/destination.py
cp -r /path/to/source-dir /path/to/destination-dirDelete
rm /path/to/file.py
rm -r /path/to/directoryAlways confirm with the user before deleting files or directories.
File Metadata
stat /path/to/file.py
ls -la /path/to/file.py
wc -l /path/to/file.py| Command | Returns |
stat | Size, permissions, timestamps, inode |
ls -la | Permissions, owner, size, modification date |
wc -l | Line count |
file | MIME type detection |
Common Workflows
Find and Replace Across Files
# Find all files containing the old string
Grep: pattern="old_function_name" type="py" output_mode="files_with_matches"
# Then Edit each file
Edit: /path/to/file1.py (old_string → new_string, replace_all: true)
Edit: /path/to/file2.py (old_string → new_string, replace_all: true)Explore an Unfamiliar Codebase
- Check project structure:
fd . --type f --max-depth 2 - Read configuration:
Read: package.jsonorRead: pyproject.toml - Find entry points:
Grep: pattern="def main|if __name__" type="py" - Read key files identified above
Find Large Files
fd --type f --exec stat -f '%z %N' {} \; | sort -rn | head -20Error Handling
| Error | Cause | Resolution |
| Read: file not found | Path incorrect or file deleted | Verify with ls or Glob |
| Edit: old_string not unique | Multiple matches in the file | Add more surrounding context to make it unique |
| Edit: old_string not found | Content changed since last read | Re-read the file, then retry with current content |
| Write: file not read first | Attempting to overwrite without reading | Read the file first, then Write |
| Permission denied | Insufficient OS permissions | Check with ls -la; use chmod if appropriate |
| Glob: no files found | Pattern too restrictive | Broaden the pattern; check path spelling |
Limitations
- Read returns up to 2000 lines by default. Use offset/limit for larger files.
- Read truncates lines longer than 2000 characters.
- Edit requires exact string matching — whitespace and indentation must match precisely.
- Write overwrites the entire file. No append mode. To append, read first, then write the combined content.
- Glob only matches files, not directories. Use
Bash lsorfdto list directories. - PDF reading is limited to 20 pages per call. Specify page ranges for large documents.
Calibration Rules
- Read before Edit. Always read a file before editing it. The Edit tool enforces this.
- Edit over Write for existing files. Edit is surgical and shows diffs. Write is a full replacement — use it only for new files or complete rewrites.
- Glob over Bash for file search. Glob is optimized for pattern matching. Only fall
back to
fdorfindfor queries Glob cannot express (size filters, date filters). - Grep over Bash for content search. Grep is optimized for ripgrep-based search with
proper permissions. Never use
greporrgvia Bash. - Parallel reads for multiple files. Issue all Read calls in a single response for concurrent execution.
- Always use absolute paths. Claude Code tools require absolute paths. Never pass relative paths to Read, Write, or Edit.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jholhewres/devclaw-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository94 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-writerSkill
- agent-builderSkill
- animateSkill
- api-docs-generatorSkill
- appraiseSkill
- architecture-diagramSkill
- architecture-reviewerSkill
- arxiv-figuresSkill
- arxiv-packageSkill
- arxiv-preflightSkill
- benchmark-runnerSkill
- changelog-composerSkill
- chart-claritySkill
- citation-auditSkill
- codebase-advisorSkill
- code-refinerSkill
- competitive-analyzerSkill
- concept-to-imageSkill
- debug-investigatorSkill
- decision-mapSkill
- dependency-auditSkill
- devils-advocateSkill
- domain-modelingSkill
- engineering-retroSkill
- env-validatorSkill
- estimate-calibratorSkill
- feasibility-assessorSkill
- figure-rhetoricSkill
- figure-table-qualitySkill
- githubSkill
- gpu-optimizerSkill
- handoffSkill
- html-presentationSkill
- html-videoSkill
- humanizeSkill
- idea-validatorSkill
- immuneSkill
- intakeSkill
- kg-builderSkill
- launch-videoSkill
- learning-workspaceSkill
- lightpanda-browserSkill
- linkedin-post-styleSkill
- literature-reviewSkill
- manuscript-provenanceSkill
- manuscript-reviewSkill
- manuscript-typographySkill
- market-analyzerSkill
- marp-slidesSkill
- mcp-to-skillSkill
- md-to-pdfSkill
- migration-risk-analyzerSkill
- milestone-runnerSkill
- module-deepeningSkill
- notebooklmSkill
- package-evaluatorSkill
- package-optimizerSkill
- paper-to-skillSkill
- plan-promptsSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

