agentleFS
dafaalzdafaalz/agent-skills/skills/wizard/SKILL.md

wizard

Skill2 starsChanged 51 days agoMITView on GitHub

Use when generating self-contained interactive bash scripts or terminal wizards that guide a human through manual setup, credential provisioning, third-party dashboards, or one-off cutovers. Don't use for unattended batch scripts (author shell scripts directly), CI pipelines (author CI configuration directly), or automated test runners (use testing-patterns).

  • Reads credentials

170 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, writing-beats and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 42 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 56 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 49 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 41 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 54 projects that use this

  • simo97Skill

    migrate-to-shoehorn

    Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

    Also in 47 projects that use this

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 154 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add immediate verification checks to prevent invalid state propagation:

    line 76
  2. Very specific:

    Test credentials against real APIs using curl before saving.

    line 85
  3. Distinctive:

    Write verified variables safely into the target environment file.

    line 103
  4. Distinctive:

    Write the script to disk and make it runnable:

    line 125
  5. Very specific:

    Read the script and check for the six invariants in ## Quick audit checklist.

    line 144
  6. Very specific:

    Do not modify the target script in Audit mode.

    line 146

“Common” is measured: kept by at least 6 in 10 of the 154 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Interactive wizard

Generate self-contained, interactive bash wizards that guide human operators through complex manual procedures, credential provisioning, cloud dashboard navigation, or critical production cutovers.

Boundary isolation

Wizard generation creates temporary or helper operational scripts (typically under scripts/wizards/ or scratch storage). Never execute irreversible commands or write production secrets directly into repository files.

Principles and constraints

  1. Fail-fast safety. Begin every generated script with set -euo pipefail. Trap SIGINT and SIGTERM to clean up temporary resources upon early exit.
  2. Idempotent re-runs. Check if a prerequisite or state already exists before prompting the user or modifying environment files.
  3. Sensitive data protection. Read tokens and passwords using read -s -p to prevent secrets from appearing in terminal logs or shell history.
  4. Immediate validation. Verify credentials against live endpoints or test commands immediately after input before proceeding to the next step.
  5. Clear visual separation. Use distinct terminal formatting, step banners, and explicit browser URLs to guide the operator without ambiguity.
<HARD-GATE> Write-Target Boundary. Write generated scripts only to `scripts/wizards/` or `.agents/state/wizard/`. Do not write to production application source, database configs, or secrets stores. Generated scripts must never write secrets into tracked files; only into gitignored environment files. Refuse to write to any path matching `**/.env`, `**/.env.*`, or `**/*credentials*` unless the path is confirmed in `.gitignore` at runtime using `git check-ignore --quiet <path>`. </HARD-GATE>

Modes

Select a mode before Step 1:

  • Generate mode (default). Draft a complete, executable bash wizard script and grant execution permissions.
  • Audit mode. Review existing manual setup runbooks or scripts to identify missing interactive confirmation guards.

Workflow (Generate mode)

Steps 1 to 4 apply to Generate mode only. Audit mode workflow follows in Step 5.

Step 1. Identify human prerequisites and manual boundaries

Isolate the exact operations requiring human agency before drafting code:

  1. Identify actions blocked by external access:
    • Third-party web dashboards (creating OAuth apps, generating API keys).
    • Hardware or 2FA authenticators (YubiKey, SMS codes, biometric prompts).
    • Elevated administrative privileges (sudo, cloud IAM role assumption).
  2. Map required inputs: identify variable names, validation patterns, and target destination files (such as .env.local).
  3. Define completion criteria: determine what endpoint check or exit code proves the setup succeeded.

Completion criterion. .agents/state/wizard/manual-steps.md exists on disk and lists every manual step, required input, destination file, and validation command.

Step 2. Draft script structure and terminal interaction

Assemble the script skeleton with clear interactive flow controls:

  1. Implement step headers and visual banners:
    #!/usr/bin/env bash
    set -euo pipefail
    
    echo "=== [Step 1/3] Cloud Provider Setup ==="
  2. Implement browser helper prompts: when an operator must visit a web console, print the exact URL and prompt for confirmation:
    echo "Open this URL in your browser: https://console.example.com/api-keys"
    read -r -p "Press [Enter] once you have created the key..."
  3. Implement masked input collection for secrets:
    read -s -p "Enter API Secret: " API_SECRET
    echo ""

Completion criterion. Script drafted with structured banners, external links, masked inputs, and confirmation gates.

Step 3. Implement validation probes and safe persistence

Add immediate verification checks to prevent invalid state propagation:

  1. Validate format and non-empty inputs:
    if [[ -z "${API_SECRET}" ]]; then
      echo "Error: API secret cannot be empty." >&2
      exit 1
    fi
  2. Test credentials against real APIs using curl before saving. Handle network failure separately from HTTP failure so that set -e does not mask the diagnostic message:
    HTTP_CODE_FILE="$(mktemp "${TMPDIR:-/tmp}/wizard-http.XXXXXX")"
    if ! curl -s -o /dev/null -w "%{http_code}" --max-time 10 \
         -H "Authorization: Bearer ${API_SECRET}" \
         https://api.example.com/v1/auth-check \
         > "${HTTP_CODE_FILE}"; then
      echo "Error: network failure reaching auth endpoint. Check connectivity and DNS." >&2
      rm -f "${HTTP_CODE_FILE}"
      exit 1
    fi
    HTTP_CODE="$(cat "${HTTP_CODE_FILE}")"
    rm -f "${HTTP_CODE_FILE}"
    if [[ "${HTTP_CODE}" -ne 200 ]]; then
      echo "Verification failed with status ${HTTP_CODE}. Check your token." >&2
      exit 1
    fi
  3. Write verified variables safely into the target environment file. Abort on any write or read failure:
    ENV_FILE="${ENV_FILE:-.env}"
    TMP_FILE="$(mktemp "${TMPDIR:-/tmp}/wizard-env.XXXXXX")"
    
    if [[ -f "${ENV_FILE}" ]]; then
      if ! grep -v "^API_KEY=" "${ENV_FILE}" > "${TMP_FILE}"; then
        echo "Error: cannot read ${ENV_FILE}. Aborting to prevent data loss." >&2
        rm -f "${TMP_FILE}"
        exit 1
      fi
    fi
    
    printf 'API_KEY=%s\n' "${API_SECRET}" >> "${TMP_FILE}"
    mv -- "${TMP_FILE}" "${ENV_FILE}"
    chmod 600 "${ENV_FILE}"

Completion criterion. Script contains live validation checks and safe file persistence.

Step 4. Deliver script and verify executable permissions

Write the script to disk and make it runnable:

  1. Save the file to scripts/wizards/<wizard-name>.sh.
  2. Grant executable permissions:
    chmod +x scripts/wizards/<wizard-name>.sh
  3. Inform the operator with the exact execution command:
    ./scripts/wizards/<wizard-name>.sh

Completion criterion. Script file saved, permissions confirmed with ls -l, and invocation instructions provided to the operator.

Step 5. Audit existing wizard scripts

Applies only when Audit mode is selected:

  1. Locate the target script path recorded in .agents/state/wizard/audit-target.txt.
  2. Read the script and check for the six invariants in ## Quick audit checklist.
  3. Emit .agents/state/wizard/audit-report.md with one row per invariant: invariant | status (pass/fail) | evidence line number.
  4. Do not modify the target script in Audit mode. Emit suggested patches as separate files under .agents/state/wizard/patches/.

Completion criterion. .agents/state/wizard/audit-report.md exists on disk and covers all six invariants with line-number evidence.

Quick audit checklist

CheckPassing condition
Fail-fast headerScript starts with set -euo pipefail
Masked secretsPasswords and tokens captured with read -s
Live validationInputs tested against live endpoints before saving
Safe persistenceEnvironment file updates use safe temporary file replacement
IdempotencyScript checks existing state before prompting operator
Executable permissionFile has executable bit set (chmod +x)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.