← ClaudeAtlas

cli-scriptinglisted

Use when writing or changing shell scripts, CLI commands, or user-facing terminal output — covers the bash-is-only-an-entrypoint rule, scripts/agent_collab_lib.sh, and the CLI output marker convention.
lauriparviainen/agent_collab · ★ 2 · AI & Automation · score 68
Install: claude install-skill lauriparviainen/agent_collab
# CLI Scripting and Terminal Output Use this skill when touching `agent_collab.sh`, `agent_collab_dev.sh`, anything under `scripts/`, or Python code that prints user-facing CLI output (install, uninstall, daemon lifecycle, session commands). ## Bash Is Only an Entrypoint Shell scripts orchestrate; they do not implement. A wrapper script may select a Python interpreter, resolve the venv, set environment, and dispatch to `python -m agent_collab.<module>` — nothing more. All real logic (installing, migrating config, managing the daemon, formatting output) lives in Python modules such as `agent_collab/user_install.py`. **Why:** Python is the portable layer. Keeping bash to a thin dispatch shim means porting to another OS later (Windows, or a different shell) only requires replacing the entrypoint, not rewriting behavior. It also keeps the logic testable by the hermetic unittest suite, which shell code is not. Before adding a function to a shell script, ask whether it is dispatch or logic. Branching on user input, parsing files, computing paths beyond venv resolution, and producing multi-step output are logic — move them to Python. ## Script Layout - `agent_collab.sh` — user-facing entrypoint: `install`, `uninstall`, `help`, and runtime pass-through commands (`daemon`, `serve`, `start`, `watch`, `list`, `status`, `stop`). - `agent_collab_dev.sh` — developer entrypoint: `build`, `test`, `integration-test`, `smoke`. - `scripts/agent_collab_lib.sh` — shared bash sourced