terminal-hygiene

Enforce deterministic terminal modes, cleanup, and retry hygiene in Pester-based workflow runs.

3|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/Grimblaz/agent-orchestra --skill terminal-hygiene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terminal-hygiene
Source: https://github.com/Grimblaz/agent-orchestra/tree/main/skills/terminal-hygiene
Command: npx skills add https://github.com/Grimblaz/agent-orchestra --skill terminal-hygiene

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Terminal hygiene and guardrails ensure Agent Orchestra workflow terminals behave predictably, preventing stalled or overlapping terminals and reducing flaky executions.

Core Features & Use Cases

  • Deterministic terminal modes: select sync vs async execution to control parallelism and stability.
  • Background terminal lifecycle: automatic cleanup at phase boundaries, preserving only active or unknown terminals.
  • Retry hygiene: safe kill-before-retry protocol for background terminals and port checks to avoid resource leaks and stalls.
  • Guidance for red-green iteration: align terminal usage with step boundaries and validation gates to maintain determinism.

Quick Start

Activate the terminal-hygiene skill to apply and enforce deterministic terminal behavior across steps.

Frequently Asked Questions about terminal-hygiene

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

FAQPage Schema
How do I prevent flaky terminal workflow runs during Pester test execution?

Terminal hygiene establishes robust guardrails to prevent flaky workflow runs by enforcing deterministic sync or async execution modes. It automatically cleans up background terminals at phase boundaries to prevent stalled or overlapping executions.

How do I clean up background terminals automatically between workflow phases?

You can clean up background terminals automatically by enforcing terminal hygiene guardrails at phase boundaries. This lifecycle management preserves only active or unknown terminals, preventing resource leaks and overlapping executions across sync and async modes.

How do I implement a safe kill-before-retry protocol for background commands?

Implement a safe kill-before-retry protocol for background commands by applying terminal retry hygiene guardrails. This protocol safely kills stalled background terminals and performs port checks before retrying, avoiding resource leaks and ensuring predictable state.

Does PowerShell support deterministic terminal modes for async execution?

Yes, PowerShell supports deterministic terminal modes for async execution through terminal hygiene guardrails. You can select sync versus async execution to control parallelism and stability, aligning terminal usage with step boundaries and validation gates.

Why do my background terminal processes stall during red-green iteration?

Background terminal processes stall during red-green iteration due to overlapping executions and resource leaks without proper guardrails. Applying terminal hygiene enforces step boundary alignment, automatic cleanup, and safe retry protocols to maintain deterministic state.

Can I enforce terminal cleanup and mode defaults without manual intervention?

Yes, you can enforce terminal cleanup and mode defaults automatically by activating terminal hygiene guardrails. This skill enforces deterministic terminal behavior across workflow steps, handling background terminal lifecycle and safe retries without manual intervention.