lauren-framework/lauren-ai/filesystem-tool
Claude Code and agent skill by lauren-framework/lauren-ai
- community
Checking that the SKILL.md file is still in the repository.
Implements a sandboxed file system tool for agents using @tool() class-form. Use when building tools that read, write, or list files within a restricted base directory, with path traversal protection to prevent access outside the allowed workspace.
Install
npx vskill@latest install lauren-framework/lauren-ai/filesystem-toolSKILL.md
The same SKILL.md was published earlier as lauren-framework/lauren-ai/filesystem-tool.
Usecodemap find "SymbolName"to locate any symbol before reading — it givesexact file + line range and is faster than grep across the whole repo.
File System Operation Tool with Path Restrictions
Critical rule — tool annotations must resolve
`from __future__ import annotations` is supported, but every type used by `@tool()` must resolve when schema generation runs.
@tool() resolves annotations when it builds the JSON schema. Future annotations are supported, but unresolved forward references and circular imports in function-form tool files still break schema generation.
Overview
The FileSystemTool is a class-form @tool() that reads, writes, and lists files within a configurable base directory. It resolves all paths via Path.resolve() and rejects any path that resolves outside the base — blocking ../ traversal attacks.
Implementation
AgentRunner test pattern
Use tempfile.TemporaryDirectory for isolated test directories. Create a fresh tool instance and agent factory per test to avoid shared state.
Path safety rules
| Input path | Result | |
|---|---|---|
"notes.txt" | Allowed — stays in base | |
"subdir/notes.txt" | Allowed — stays in base | |
"../../etc/passwd" | Blocked — resolves outside base | |
"/etc/passwd" | Blocked — absolute path outside base |
The safety check uses str(target).startswith(str(self._base)) after both paths are fully resolved. This is robust against symlink tricks on most platforms.
Reference files
| File | Contents | |
|---|---|---|
src/lauren_ai/_tools/__init__.py | @tool(), ToolContext | |
src/lauren_ai/_tools/_executor.py | ToolExecutor dispatch | |
src/lauren_ai/_tools/_schema.py | JSON schema generation |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/filesystem-tool/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lauren-framework/lauren-ai/filesystem-tool)