shell-exec
Skill0 starsChanged 51 days agoMITView on GitHub
Execute shell commands over SSH on an authorized server. Use when: running a single or multiple commands, capturing stdout/stderr, or running background tasks; dangerous commands are auto-blocked, require a second confirmation, and are audited. Boundary: authorized servers only; never bypass confirmation.
- Deletes or force-pushes
- Installs packages
In this repository27 other files it gives its agents.
- mysql-opsSkill
- redis-opsSkill
- data-opsSkill
- docker-containerSkill
- docker-imageSkill
- docker-installSkill
- docker-opsSkill
- apt-repoSkill
- file-opsSkill
- server-settingsSkill
- infra-opsSkill
- ssh-terminalSkill
- bbrSkill
- firewallSkill
- net-secSkill
- ssh-keysSkill
- monitorSkill
- process-manageSkill
- obs-opsSkill
- opsSkill
- lnmpSkill
- nginx-rewriteSkill
- php-manageSkill
- reverse-proxySkill
- site-manageSkill
- web-stackSkill
- ssl-manageSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run a single / multiple shell commands
- Very specific: line 34
Every command records: ts / host / cmd / decision / reason / code (exit code) to ~/.opsctl/audit.log.
- Distinctive: line 42
Run against unauthorized hosts
- Very specific: line 54
Every decision (allow/confirm/block) is written to ~/.opsctl/audit.log.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
shell-exec — SSH command execution
Capabilities
- Run a single / multiple shell commands
- Capture stdout / stderr for non-interactive commands
- Long tasks: prefer
nohup ... &ortmux
Safety gate (required)
Blacklist (hard-blocked on match, --mode yes cannot override; regex is case-insensitive):
- Recursive delete:
rm -rf /,rm -rf * - Format / wipe disk:
mkfs,mkfs.*,dd … of=/dev/*,wipefs,parted … mklabel - Database destruction:
DROP DATABASE,TRUNCATE,FLUSHALL,FLUSHDB - System lockup:
reboot,shutdown, fork bomb:(){ :|:& };: - Critical files:
>/>>overwrite/etc/passwd,/etc/shadow - Others:
find -delete,kill -9 1,chattr -i /etc/…
Second confirmation (warnlist, --mode auto denies / --mode yes or interactive allows):
rm, rmi, chmod, chown, systemctl stop|restart|disable, kill,
ufw disable|delete|deny 22, iptables -F|-P, docker system prune,
PasswordAuthentication no, sysctl -w
Second-confirmation prompt: "About to run on {host}: {cmd}. Confirm? (yes/abort)"
Audit
Every command records: ts / host / cmd / decision / reason / code (exit code) to ~/.opsctl/audit.log.
Scenarios
- Check load:
uptime; free -h; df -h - List processes:
ps aux --sort=-%mem | head - Install package:
apt update && apt install -y xxx
Forbidden
- Run against unauthorized hosts
- Bypass the second confirmation
- Silently run destructive commands
EXECUTION (real engine)
This skill is executed by the shell-exec subcommand of bin/opsctl.js (src/transport.js calls system ssh).
opsctl shell-exec --host web1 --cmd "uptime; free -h" --mode auto
# --mode auto : auto-block dangerous commands; warn class needs explicit --mode yes or interactive
# --mode yes : auto-approve warn class (trusted scripts only)
# --mode interactive: per-command stdin confirmationEvery decision (allow/confirm/block) is written to ~/.opsctl/audit.log.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

