filesystem-maintenance
Use when Codex needs to inspect or modify files via the local Python filesystem MCP server running at `servers/filesystem`.
When & Why to Use This Skill
This Claude skill provides a robust interface for local filesystem management via a Python-based MCP server. It empowers AI agents to perform essential file operations—including directory listing, reading, writing, and deletion—within a secure, restricted environment. By bridging the gap between the AI and local storage, it facilitates complex tasks like automated refactoring, system maintenance, and real-time log analysis while maintaining strict security boundaries.
Use Cases
- Automated Code Refactoring: Efficiently read source code and apply modifications across multiple files to streamline development workflows and ensure consistency.
- Log Retrieval and Analysis: Access and inspect local system or application logs to diagnose errors, monitor performance, and troubleshoot issues without manual intervention.
- Configuration Management: Safely modify configuration files, environment settings, and local metadata within a designated workspace root.
- Workspace Discovery: Explore and map complex directory structures to provide the AI with necessary context for subsequent coding, auditing, or administrative tasks.
- File Cleanup and Maintenance: Remove temporary artifacts, build logs, or obsolete files as part of a cleanup script or post-processing workflow.
| name | filesystem-maintenance |
|---|---|
| description | Use when Codex needs to inspect or modify files via the local Python filesystem MCP server running at `servers/filesystem`. |
Filesystem Maintenance
Purpose
Safely read, write, and delete files under MCP_FS_ROOT using the stdio-based filesystem MCP server bundled with this repository. Applies to refactors, log retrieval, and config updates when direct shell access is discouraged.
Setup Checklist
- Activate the repo virtual environment and install
servers/filesystem/requirements.txt. - Launch the server through
mcp.json(python servers/filesystem/server.py) withMCP_FS_ROOTpointing at the workspace root. - Confirm the server advertises the tools
list_dir,read_file,write_file, anddelete_path.
Workflow
- Discovery – call
list_dirto understand the structure before editing. Limit breadth by passing the nearest parent directory. - Read – fetch file contents using
read_file(relative_path)to avoid stale local copies. - Edit – stage modifications via normal repo tooling, then persist with
write_file. When writing, pass relative paths (e.g.,skills/github-operations/SKILL.md). - Cleanup – remove temporary artifacts using
delete_pathonly after verifying that the target path is insideMCP_FS_ROOT.
Notes
- The
_resolveguard insideserver.pyprevents escaping aboveMCP_FS_ROOT. If you see a permission error, double-check the path. - Use this skill when another skill (e.g.,
github-operations) references files you must read—chain the skills rather than reimplementing file access. - Keep writes idempotent: re-read the file to ensure committed changes match expectations.