portable-safe-skills
Create portable, safe Codex skills focused on file or I/O operations under WASIp1 constraints. Use when authoring skills that must be portable across environments and avoid unsafe assumptions about paths, preopens, or stdio.
When & Why to Use This Skill
This Claude skill facilitates the creation of portable and secure Codex skills by enforcing WASIp1 constraints. It provides a standardized workflow for authoring agentic tools that perform file and I/O operations safely across diverse environments, ensuring robust path resolution and environment-agnostic execution.
Use Cases
- Standardizing Skill Architecture: Implementing the skill-creator workflow to ensure consistent naming, directory structure, and packaging for all custom agent tools.
- Cross-Platform File Management: Developing skills that handle file reading and writing using WASIp1 preopens, ensuring they function correctly regardless of the host operating system's path conventions.
- Secure I/O Implementation: Building safe data processing tools that utilize unified stdio and restricted path access to prevent unauthorized file system operations within the agent's environment.
- Wasm-Based Tool Deployment: Packaging complex logic into portable WebAssembly modules using mbt-wasip1-tools for seamless integration into the Codex ecosystem.
| name | portable-safe-skills |
|---|---|
| description | Create portable, safe Codex skills focused on file or I/O operations under WASIp1 constraints. Use when authoring skills that must be portable across environments and avoid unsafe assumptions about paths, preopens, or stdio. |
Portable and Safe Skills
Use skill-creator
- Follow the
skill-creatorworkflow for skill structure, naming, and packaging. - Keep SKILL.md short and move detailed content to
references/orassets/.
Required dependency
- Use
mbt-wasip1-toolsfor concrete CLI patterns (echo, wc, read/write) and example project structure.
Constraints to document
- WASIp1 path resolution uses longest-prefix matching against preopen names. No cwd. No fallback.
- Absolute paths only work if a preopen named
/(or starting with/) exists. - Stdio is unified:
@wasi/stdiovalues implement both sync and async reader/writer traits.
Minimal workflow
- Start from an
assets/example inmbt-wasip1-tools. - Keep logic simple and deterministic; only I/O is async.
- Document the required
wasmtime run --dir host::guestusage and expected preopens. - Add a README to each example with build/run commands.
- Package the skill using the
skill-creatorguidelines when done.