Index of every page on this site: llms.txt
All skills
cli avatar

/cli-exercise

@f24a94f
by GitHub CLIcli/cli47k stars
9,433
Run it yourself

Exercises real command-line programs from explicit cases or a goal, with faithful terminal recordings and observed results. Use when asked to record CLI test cases, demonstrate command behavior, validate an interactive workflow, or explore a command against a goal; not for ordinary unit-test execution or skill authoring.

Use this Skill: https://skilld.dev/gh/cli/cli/cli-exercise

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescontrollers.md

≈989 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Declarative controllers

Contents

Use the shared runtime interface to launch, observe, and close a run. Load this reference only when authoring or running a controller. The calling AI chooses the strategy; the Go owner executes deterministic rules and does not invoke another model. The Node adapter has no controller logic.

Rule shape

A controller contains bounded literal rules, not executable code. Use the actual observation revision instead of the illustrative value below:

{
  "op": "run_controller",
  "revision": 3,
  "reason": "Follow the supplied interactions where their screens are recognized.",
  "controller": {
    "id": "known-menu",
    "maxActions": 3,
    "maxDurationSeconds": 15,
    "waitForMatchMs": 1000,
    "rules": [
      {
        "id": "continue",
        "when": {"screenContains":"Choose","selected":"Continue"},
        "action": {"type":"key","key":"enter"},
        "reason": "The case specifies Enter on the selected Continue option.",
        "maxMatches": 1
      }
    ]
  }
}

The first eligible matching rule runs. Conditions combine literal screenContains, questionPrefix, and selected with AND. Regular expressions, generated predicates, and arbitrary code are not accepted.

maxMatches defaults to one per rule and source hash for the lifetime of the run. Explicit repetitions remain bounded by controller and run limits. Reusing the same controller resumes its remaining rules; it does not reset match counts. Controller bounds cannot relax the enclosing run's limits. The duration budget covers actions, typing delays, menu navigation, and waiting for acknowledgements, not just the gaps between rules.

Pause and resume

Terminal input delivery can finish before its echo or next prompt arrives. waitForMatchMs bounds how long the controller observes for a matching rule before declaring the current screen uncovered. It defaults to 1000 milliseconds and accepts 0 through 60000, within the controller's duration limit. It sends no input, resets no match counts, and cannot waive an exact action's timing window.

No matching rule after that wait produces controllerStatus: "paused" with reason: "unhandled_state". The terminal remains available to the live agent until it exits or the run reaches its limits. Observe the new state, then continue with an authorized live action or resume an appropriate controller. Do not turn an unexpected prompt into unprovided input in an exact case.

Fidelity and evidence

Each rule uses the same canonical actions and timing as live input. In exact mode, its action must match the next supplied step, including timing fields. Controller execution cannot replace a specified key sequence with a semantic selector or add unprovided interactions.

An exact action that fails after delivering partial input stops the run as blocked. Do not replay its already delivered prefix. This differs from a controller pausing after a completed action. If the controller deadline expires during input, the request reports controller_limit and warns that delivery may be partial. Expiry before any input pauses the controller without executing the pending action.

Controller sources are saved as JSON under capture/controllers/<sha256>.json. Events retain the source hash, matched observations, input reasons, execution mode (ai, controller, or host), and guard evidence. Controller strategy does not change the contract's exact or explore fidelity.

Source documents must not contain actual credentials, including secrets split across literal steps. See privacy and environment for the shared safeguards and limitations, and maintenance for isolated validation commands.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    A development tool for exercising, validating, and recording CLI programs. It includes robust security measures such as directory isolation to prevent access to the user's home profile and a privacy guard that identifies and redacts potential secrets from recordings.

  • Socket1mo

    1 alert: gptSecurity

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at f24a94f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
Other metadata
compatibility
Requires Go 1.27+ to build the helper, Node with Tuistory, ffmpeg/ffprobe, and an installed monospaced font. Builds start offline; ask before downloading missing dependencies.

README badge

README badge for cli/cli/cli-exercise