shell-skill
Execute short-lived shell commands in a sandboxed environment. No PATH access -- use process_manager for npm/python/node commands.
Best use case
shell-skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Execute short-lived shell commands in a sandboxed environment. No PATH access -- use process_manager for npm/python/node commands.
Teams using shell-skill should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/shell-skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How shell-skill Compares
| Feature / Agent | shell-skill | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Execute short-lived shell commands in a sandboxed environment. No PATH access -- use process_manager for npm/python/node commands.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Shell Tool
Execute short-lived shell commands in a sandboxed workspace. The shell runs with a **restricted environment** (no system PATH). For commands that need `npm`, `python`, `node`, or other system tools, use the **process_manager** tool instead.
## shell_execute Tool
### Schema
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| command | string | Yes | Shell command to execute |
| timeout | int | No | Timeout in seconds (default: 30, max: 300) |
### Response
```json
{
"stdout": "command output",
"exit_code": 0,
"truncated": false,
"command": "dir"
}
```
### Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 124 | Timed out |
| non-zero | Failure |
## OS-Specific Commands
The shell uses the system's native shell (`cmd.exe` on Windows, `/bin/sh` on Linux/macOS). Use the correct commands for the platform.
### Detect OS first
```json
{"command": "ver"}
```
If output contains `Windows`, use Windows commands. Otherwise use Unix commands.
### Windows (cmd.exe)
| Task | Command |
|------|---------|
| List files | `dir` |
| List with details | `dir /a` |
| Read file | `type README.md` |
| Write to file | `echo hello > output.txt` |
| Find files | `dir /s /b *.py` |
| Search content | `findstr /s /i "pattern" *.py` |
| Copy file | `copy src.txt dst.txt` |
| Move file | `move src.txt dst.txt` |
| Delete file | `del output.txt` |
| Delete folder | `rmdir /s /q folder` |
| Create folder | `mkdir newfolder` |
| Show current dir | `cd` |
### Linux / macOS (sh)
| Task | Command |
|------|---------|
| List files | `ls -la` |
| Read file | `cat README.md` |
| Write to file | `echo hello > output.txt` |
| Find files | `find . -name '*.py' -type f` |
| Search content | `grep -r "pattern" --include='*.py' .` |
| Copy file | `cp src.txt dst.txt` |
| Move file | `mv src.txt dst.txt` |
| Delete file | `rm output.txt` |
| Delete folder | `rm -rf folder` |
| Create folder | `mkdir -p newfolder` |
| Show current dir | `pwd` |
## Shell vs Process Manager
| Need | Tool | Why |
|------|------|-----|
| List/read/copy/move files | **shell_execute** | Sandboxed, safe |
| Delete files | **shell_execute** | Confined to workspace |
| Search file content | **shell_execute** | Fast, no PATH needed |
| `npm install`, `pip install` | **process_manager** | Needs PATH |
| `python script.py`, `node app.js` | **process_manager** | Needs PATH |
| Dev servers, watchers | **process_manager** | Long-running |
The shell is the **only safe tool for file deletion**. It runs inside the agent's workspace with `virtual_mode=True` (path traversal blocked). The process_manager blocks destructive commands since it has full PATH.
## Guidelines
1. **Detect OS first** -- use `ver` to check Windows vs Unix, then use correct commands
2. **Short-lived commands only** -- the shell waits for completion
3. **No system PATH** -- `npm`, `python`, `node` will not be found. Use process_manager
4. **No daemons/servers** -- commands that don't exit will hang until timeout
5. Use relative paths (workspace is the working directory)
6. Chain with `&&` for sequential execution
7. Avoid interactive commands requiring user inputRelated Skills
powershell-skill
Windows PowerShell commands and patterns for process management, file operations, and system administration.
serper-search-skill
Search the web using Serper API for Google-powered search results including web, news, images, and places.
proxy-config-skill
Configure residential proxy providers and make proxied HTTP requests with geo-targeting.
perplexity-search-skill
Search the web using Perplexity Sonar AI for synthesized answers with citations, related questions, and optional images.
http-request-skill
Make HTTP requests to external APIs and web services. Supports GET, POST, PUT, DELETE, PATCH methods with headers and JSON body.
duckduckgo-search-skill
Search the web using DuckDuckGo for free, privacy-focused results with no API key required.
crawlee-scraper-skill
Read and extract content from any web page URL.
browser-skill
Interactive browser automation - navigate, click, type, fill forms, take screenshots, get accessibility snapshots. Supports system Chrome/Edge via auto-detection.
brave-search-skill
Search the web using Brave Search API for privacy-focused, independent search results with no tracking.
apify-skill
Run web scrapers and extract data from websites and social media platforms using Apify actors. Supports Instagram, TikTok, Twitter/X, LinkedIn, Facebook, YouTube, Google Search, and general web crawling.
nearby-places-skill
Search for nearby places like restaurants, cafes, stores, and services using Google Places API. Find places by type and location.
process-manager-skill
Start, stop, and manage long-running processes with full system PATH. Use for npm, python, node, dev servers, watchers, build tools. Destructive file commands blocked.