Shell & Code Execution
OrcBot provides powerful system-level execution capabilities including shell commands, TypeScript compilation, and Python virtual environments. All execution skills include safety guardrails and resource limits.run_command
Execute shell commands on the host system.Parameters
Shell command to execute. Uses PowerShell on Windows, bash/sh on Unix.
Working directory for command execution. Auto-extracted from
cd /path && command patterns.Return Value
Combined stdout + stderr. Capped at 8 KB with tail hint if truncated.
Platform Detection
The skill automatically adapts to the host platform:- Windows: Uses PowerShell via
powershell -Command - Unix/Linux/macOS: Uses
/bin/sh -c
Working Directory Auto-Extraction
The skill intelligently extracts working directory from common patterns:Safety Features
- Command allow/deny lists: Configured via
commandAllowList/commandDenyList - Stdout capping: Output limited to 8 KB to prevent memory overflow
- Process tree kill: Reliable termination on timeout (uses
taskkill /T /Fon Windows) - Safe mode enforcement: Disabled when
safeMode: true
Example Usage
Run npm test:Response Examples
Success:Configuration Options
Allow specific commands:Metadata
- isDeep:
true- Commands are substantive work - isDangerous:
true- Requires admin approval in autonomy mode
execute_typescript
Write, compile, and execute TypeScript code on the fly.Parameters
TypeScript code to compile and execute
Optional filename to save/reuse the script. If omitted, saves to
scratchpad.ts.Command-line arguments to pass to the script
Return Value
Combined stdout + stderr from the compiled and executed JavaScript
Features
- Persistent scratchpad: If
filenameis omitted, code is saved to a reusablescratchpad.ts - Named scripts: Provide
filenameto save for future reuse - Execute saved scripts: Call with only
filename(nocode) to re-run - TypeScript compilation: Automatically compiles to JavaScript via
tsc - Full Node.js API access: Import any installed package
Example Usage
Execute TypeScript snippet:Response Example
Use Cases
- Data processing: Parse CSV, JSON, or XML files
- API calls: Hit undocumented endpoints with custom logic
- Calculations: Complex math or statistics
- Prototyping: Test algorithms before implementing as skills
- One-off tasks: Tasks that don’t warrant a full skill
Metadata
- isDeep:
true - isDangerous:
false(sandboxed to Node.js API)
execute_python_code
Execute Python code in an isolated virtual environment.Parameters
Python code to execute
Optional filename to save/reuse the script (e.g.,
"script.py")Return Value
Combined stdout + stderr from the Python interpreter
Features
- Isolated virtual environment: Uses
~/.orcbot/python-venv/ - Persistent environment: Installed packages persist across runs
- Auto-activation: Virtual environment activated automatically
- Named scripts: Save scripts for reuse with
filename - Re-execution: Call with only
filenameto re-run saved scripts
Example Usage
Data analysis:Response Example
Metadata
- isDeep:
true - isDangerous:
false
Only use Python for tasks requiring Python libraries. Prefer
execute_typescript for general scripting since Node.js is already available.install_npm_dependency
Install an NPM package for use in custom skills or TypeScript execution.Parameters
NPM package name (e.g.,
"axios", "lodash", "@types/node")Return Value
npm install output
Example Usage
Response Example
Metadata
- isDeep:
false - isDangerous:
false
install_python_package
Install a Python package via pip into the isolated virtual environment.Parameters
Package name (e.g.,
"pandas", "numpy", "requests")Return Value
pip install output
Example Usage
Response Example
Metadata
- isDeep:
false - isDangerous:
false
get_system_info
Get platform, OS, Node version, shell, and command guidance.Parameters
None.Return Value
System information:
platform: OS platform (linux, darwin, win32)arch: CPU architecturenodeVersion: Node.js versionshell: Default shelltimestamp: Current date/timeguidance: Platform-specific command tips
Example Usage
Response Example
Metadata
- isDeep:
false
system_check
Verify that commands, shared libraries, and file paths exist.Parameters
Command names to check (e.g.,
["node", "git", "docker"])Shared library names (e.g.,
["libssl.so", "libcrypto.so"])File paths to verify (e.g.,
["/etc/hosts", "/usr/bin/python3"])Return Value
Verification results for each category with pass/fail status
Example Usage
Response Example
Metadata
- isDeep:
false
Best Practices
Common Workflows
Git Operations
NPM Project Management
Data Processing Pipeline
Troubleshooting
”Command not found”
- Cause: Command not installed or not in PATH
- Fix: Use
system_checkto verify, then install missing command or use absolute path
”Permission denied”
- Cause: Insufficient file permissions
- Fix: Use
chmod +xor run with appropriate user permissions
”Timeout”
- Cause: Command took too long
- Fix: Increase timeout in config or split into smaller operations
”Output truncated”
- Cause: Command output exceeded 8 KB
- Fix: Redirect output to file, then read file in chunks