agentleFS
pji2918pji2918/agent-skills/skills/terminal-exec/SKILL.md

terminal-exec

Skill1 starsChanged 12 days agoApache-2.0View on GitHub

Use whenever a terminal command needs to be run (build, test, lint, git, package manager, scripts, etc.). The orchestrator must not use Bash directly; it delegates every command to the `terminal-exec` subagent.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All shell commands are delegated to the terminal-exec subagent (Agent tool, subagent_type: "terminal-exec").

    line 8
  2. Distinctive:

    Follow the user's approval rules for risky work (e.g.

    line 13
  3. Distinctive:

    Write a self-contained prompt.

    line 17
  4. Distinctive:

    When it reports one:

    line 28
  5. Distinctive:

    Do not run it yourself and do not work around it.

    line 30
  6. Distinctive:

    Check the report. If it failed, diagnose from the reported error and re-delegate a corrected command if safe.

    line 35
  7. Distinctive:

    Never delete files. Tell the user the target file and the reason, and ask them to delete it.

    line 40
  8. Distinctive:

    Never bypass a sandbox restriction on the subagent's behalf.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Terminal Execution via Subagent

All shell commands are delegated to the terminal-exec subagent (Agent tool, subagent_type: "terminal-exec"). Do not call Bash yourself.

Before delegating

  • Decide the exact commands first. The subagent runs only what it is given.
  • Follow the user's approval rules for risky work (e.g. git branch merge): present the plan and get approval before delegating.

What to hand down

Write a self-contained prompt. The subagent has no conversation context.

  • Exact command(s), in order
  • Working directory
  • Purpose, and what output matters (exit code, failing test names, etc.)
  • Expected report: commands run, exit code and key output, commands not executed, failure cause

Dangerous commands

The subagent refuses to run dangerous commands (file deletion, sudo, git push, hard reset, merge/rebase, deployment, destructive DB/cloud operations, etc.) and reports them instead.

When it reports one:

  • Do not run it yourself and do not work around it.
  • Relay the command and the reason to the user, and let the user run it (suggest the ! <command> prefix in the prompt).

After delegating

  • Check the report. If it failed, diagnose from the reported error and re-delegate a corrected command if safe.
  • Summarize the outcome for the user.

Never

  • Never delete files. Tell the user the target file and the reason, and ask them to delete it.
  • Never bypass a sandbox restriction on the subagent's behalf; report it to the user.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.