Llm Filesystem Tools
Description
Python filesystem tools for AI models and LLMs. Secure directory access, file reading, grep search for Ollama, OpenAI, Anthropic Claude. Built-in path validation and security policies. Framework-agnostic function calling tools. Ideal for AI coding assistants and automated code analysis.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
LLM Filesystem Tools
**Secure filesystem access for Large Language Models with governance-first design.**
[](https://badge.fury.io/py/llm-fs-tools) [](https://opensource.org/licenses/MIT) [](https://www.python.org/downloads/)
Stop reinventing filesystem tools for every LLM project. `llm-fs-tools` provides production-ready, secure file operations that work with any LLM supporting function calling - Ollama, OpenAI, Anthropic, and more.
The Problem
You want your AI assistant to analyze code, search files, or explore directories. You have three bad options:
- Inject everything into the prompt - Wastes tokens, hits context limits, can't scale
- Use heavy frameworks - LangChain/LlamaIndex lock you into their ecosystem
- Roll your own - Reinvent security, path validation, and tool schemas every time
The Solution
pip install llm-fs-tools
from llm_fs_tools import FileSystemTools, SecurityPolicy
# Define security boundaries
policy = SecurityPolicy(
allowed_roots=["./my-project"],
max_file_size_mb=5,
blocked_patterns=["*.env", ".git/*"]
)
# Initialize tools
fs_tools = FileSystemTools(policy)
# Use with any LLM (Ollama example)
import ollama
response = ollama.chat(
model='qwen2.5-coder',
messages=[{'role': 'user', 'content': 'Analyze the codebase structure'}],
tools=fs_tools.get_tool_definitions() # Auto-generates schemas
)
# Execute tool calls
for tool_call in response.message.tool_calls:
result = fs_tools.execute(
tool_call.function.name,
tool_call.function.arguments
)
**That's it.** Your model can now safely explore filesystems.
Features
🔒 Security First
- Path traversal protection - Validates all paths stay within allowed roots
- Configurable boundaries
Related Skills
Defense in Depth
Implement multi-layered testing and security best practices.
Security SecLists Official Repository
[OWASP Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)
Security Threat Hunting with Sigma Rules
Use Sigma detection rules to hunt for threats and analyze security events
Security Maintenance Walkthrough - 2026-03-29
- Re-triaged the full 2026-03-15 security finding set against current `main` and wrote a fresh current-head re
Security Google Workspace Model Armor
Filter user-generated content for safety
Security Google Workspace Alert Center
Manage security alerts
Security Related Agents
Token Auditor
Scans ui/src/ for hardcoded visual values, duplicate components, and shadcn replacement candidates; produces d
Gitnexus Security Boundary Reviewer
GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing,
Accessibility Audit
| You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive tec... | -