Coding

Terminal Command Execution

Run terminal commands incrementally with pre-checks, failure diagnosis, and outcome verification.

What it does

Run shell and CLI commands with pre-flight inspection, incremental execution, and verification after each state-changing step. The workflow checks paths, binaries, and current state; diagnoses stderr by failure class; and reports what ran, what changed, and the current status. Destructive or privileged actions require explicit approval.

When to use it

  • Installing and verifying CLI tools
  • Diagnosing failed shell commands
  • Inspecting services and listening processes
  • Applying scoped file or configuration changes

The skill document

Terminal Command Execution

Overview

Use this skill to run terminal commands with minimal risk and predictable outcomes. Prefer fast inspection, explicit intent checks, and verification after each state-changing step.

Workflow

  1. Clarify goal and scope.
  • Infer the exact command target from context (path, service, tool, environment).
  • If request is ambiguous and risky, ask one concise clarifying question.
  1. Pre-flight checks.
  • Confirm working directory and required binaries.
  • Inspect current state before changing it (for example ls, git status, process/listen state).
  • Prefer non-destructive probes first.
  1. Execute commands incrementally.
  • Run the smallest command that advances the task.
  • For multi-step tasks, validate each step before continuing.
  • Use reproducible commands and avoid interactive flows when non-interactive options exist.
  1. Handle failures systematically.
  • Read stderr first and identify root cause class: permission, path, missing dependency, syntax, network, or runtime state.
  • Apply one fix at a time, then re-run only the affected command.
  • If privileged/destructive action is required, request user approval before proceeding.
  1. Verify outcomes.
  • Check exit status and observable state changes.
  • For installs, verify with a version/health command.
  • For edits, verify resulting files and behavior.
  1. Report clearly.
  • Summarize what ran, what changed, and current status.
  • Include exact next command only when additional user action is required.

Safety Rules

  • Avoid destructive commands by default (rm -rf, force resets, broad chmod/chown) unless explicitly requested.
  • Never assume network, permissions, or package managers are available; test first.
  • Prefer scoped operations (specific files/paths/services) over global changes.
  • Keep secrets out of command output and logs.

Command Patterns

  • Discovery: pwd, ls -la, rg --files, which
  • Validation: --version, health/status commands, targeted smoke tests
  • Diagnostics: inspect logs/errors first, then adjust one variable at a time

Questions people ask

How does it reduce the risk of running the wrong command?
It clarifies the target and scope, checks the working directory and required binaries, and inspects current state with non-destructive probes before making changes.
What happens when a command fails?
It reads stderr, classifies the likely cause—such as permissions, paths, dependencies, syntax, network, or runtime state—and applies one fix at a time before rerunning only the affected command.
How are successful changes confirmed?
It checks exit status and observable state changes. Installs are verified with version or health commands, while edits are checked through resulting files and behavior.

Related skills

Check calendars, find open times, and manage Google Calendar events with confirmation before every change.

by Jay81 installs33 stars

Save, search, organize, and manage Get Notes content and knowledge bases through explicit commands.

755 installs66 stars

Build and operate a testable learning plan with practice, spaced review, transfer checks, and durable local records.

by Iván93 installs3 stars

Learn a topic through level checks, adaptive explanations, retrieval practice, and review across sessions.

270 installs8 stars

Discover and trade Polymarket crypto fast markets using CEX momentum or a custom signal.

262 installs50 stars

Extract email dates, links, and deadlines for review, then create or update tracked Google Calendar events.

236 installs5 stars