# Mastra Workspace

> Mastra Workspace development - filesystem providers, sandbox execution, skills system, search/indexing, and tool configuration. Covers LocalFilesystem/S3 mounts, LocalSandbox and E2BSandbox code execution, BM25/vector/hybrid search via workspace.search()/index(), and restricting agent file tools with WORKSPACE_TOOLS (read/search/write/exec permissions).

- Skill: `artsmc-claude-dev-agents/mastra-workspace` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add artsmc-claude-dev-agents/mastra-workspace`
- Raw SKILL.md: https://api.skillmd.com/api/skills/artsmc-claude-dev-agents/mastra-workspace/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: artsmc (https://skillmd.com/u/artsmc-claude-dev-agents)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/artsmc-claude-dev-agents/mastra-workspace

---


# Mastra Workspace Development

Comprehensive guide for Mastra workspaces. Covers filesystem providers (LocalFilesystem, S3Filesystem, GCSFilesystem), sandbox execution (LocalSandbox, E2BSandbox), mounts for multi-provider composition, skills system (Agent Skills spec), BM25/vector/hybrid search, tool configuration with WORKSPACE_TOOLS, and containment security.

## Usage

```bash
/mastra-workspace
```

Provides context for:
- `Workspace` class from `@mastra/core/workspace`
- `filesystem` vs `mounts` (mutually exclusive)
- `LocalFilesystem({ basePath, contained, readOnly, allowedPaths })`
- `LocalSandbox({ workingDirectory })` and `E2BSandbox({ id })`
- `WORKSPACE_TOOLS` for per-tool config (enabled, requireApproval, requireReadBeforeWrite)
- Skills with SKILL.md (Agent Skills spec)
- Search: `workspace.search()`, `workspace.index()`, BM25/vector/hybrid
- Global workspace via `Mastra({ workspace })` or agent-scoped

