subprocess-safety
OfficialEnsure safe, reliable subprocess calls in OpenCode Swarm.
Software Engineering#cross-platform#subprocess-safety#injection-prevention#test-mocking#opencode-swarm#child-process#engineering-invariants
AuthorZaxbyHub
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Unsafe child process spawning in OpenCode Swarm code causes silent plugin failures, orphaned background processes, command injection security risks, and cross-platform compatibility issues (especially on Windows) that often leave users with no visible error or working agents.
Core Features & Use Cases
- Mandatory subprocess guardrails: Enforces six non-negotiable properties for all child process calls (array-form arguments, explicit working directory, ignored stdin, per-call timeouts, bounded output streams, and explicit kill in finally blocks) to prevent hangs and resource leaks.
- Cross-platform compatibility guidance: Provides specific fixes for Windows-specific issues like .cmd wrapper PATH resolution, stdin inheritance bugs in Bun v7.3.3, and fs.rename limitations that cause unexpected failures on non-Unix systems.
- Testable subprocess patterns: Replaces leaky mock.module() usage with a dependency injection _internals seam for isolated, reliable testing of subprocess-dependent code.
- Use Case: When adding a new git utility function that spawns child processes to check repository status, this skill ensures the implementation will not cause silent plugin failures on Windows or leave orphaned git processes running in the background.
Quick Start
Use the subprocess-safety skill to audit all subprocess calls in your new git utility module before submitting the pull request for review.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: subprocess-safety Download link: https://github.com/ZaxbyHub/opencode-swarm/archive/main.zip#subprocess-safety Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.