bash-strategy

Configure shell commands with non-interactive flags and environment variables for headless automation.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/jralph/.config-opencode --skill bash-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash-strategy
Source: https://github.com/jralph/.config-opencode/tree/main/skills/bash-strategy
Command: npx skills add https://github.com/jralph/.config-opencode --skill bash-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a non-interactive shell workflow in headless environments to prevent prompts and hangs.

Core Features & Use Cases

  • Process Continuity: Always drive the workflow without waiting for user input.
  • Environment Hardening: Pre-set environment variables to disable interactive prompts.
  • Use Case: Automate CI pipelines, deployments, and batch scripts that run unattended.

Quick Start

Apply this strategy to a task by forcing non-interactive behavior in commands (for example, use -y/--yes, set CI=true, and avoid editors or pagers).

Frequently Asked Questions about bash-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent bash scripts from hanging on interactive prompts in CI pipelines?

Headless shell environments hang when commands trigger interactive prompts expecting user input. Setting environment variables like CI=true and GIT_TERMINAL_PROMPT=0 disables these prompts, ensuring automation workflows continue deterministically without waiting for human intervention.

What environment variables disable interactive prompts in headless shell automation?

Key environment variables for disabling interactive prompts include CI=true, GIT_TERMINAL_PROMPT=0, and GIT_PAGER=cat. These harden the shell environment by pre-empting interactive modes, ensuring unattended automation workflows execute deterministically without waiting for user input.

How do I configure git commands to run non-interactively in deployment scripts?

To configure git commands to run non-interactively in deployment scripts, set GIT_TERMINAL_PROMPT=0 and GIT_PAGER=cat in your environment. This prevents git from opening pagers or prompting for credentials, allowing batch scripts to execute unattended.

Why do my batch scripts stall during unattended execution in headless shells?

Batch scripts stall during unattended execution in headless shells when commands enter interactive modes or open pagers. Specifying non-interactive flags like -y/--yes and setting CI=true prevents these stalls by forcing deterministic command behavior.

What flags force commands to skip interactive confirmation in bash automation?

Flags like -y or --yes force commands to skip interactive confirmation in bash automation. Combining these flags with environment hardening ensures commands proceed automatically without requiring user input in headless CI environments.

Does setting CI=true affect how shell commands execute in batch scripting?

Setting CI=true signals to shell commands that they are running in a continuous integration environment, which often disables interactive modes automatically. This environment hardening ensures commands execute deterministically without opening editors or pagers.