From 7b17d02a093bd971231948a9621e989a4bd600d4 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sat, 29 Aug 2026 03:20:43 -0700 Subject: [PATCH] =?UTF-8?q?feat(optional-skills):=20add=20setup-wizard-gen?= =?UTF-8?q?erator=20=E2=80=94=20bash=20wizard=20for=20human-only=20setup?= =?UTF-8?q?=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ports the MIT-licensed 'wizard' skill from mattpocock/skills as setup-wizard-generator (optional-skills/devops). Generates an interactive bash wizard that walks a human through manual procedures: opens dashboard URLs, captures values (hidden entry for secrets), writes .env / GitHub secrets idempotently, and confirms each stage. Vendors upstream's template.sh library verbatim (bash -n verified) plus a staging test suite covering frontmatter, template integrity, and de-upstreaming. --- .../devops/setup-wizard-generator/SKILL.md | 116 ++++++++++ .../templates/template.sh | 204 ++++++++++++++++++ .../test_setup_wizard_generator_skill.py | 87 ++++++++ .../docs/reference/optional-skills-catalog.md | 1 + .../devops/devops-setup-wizard-generator.md | 133 ++++++++++++ website/sidebars.ts | 1 + 6 files changed, 542 insertions(+) create mode 100644 optional-skills/devops/setup-wizard-generator/SKILL.md create mode 100644 optional-skills/devops/setup-wizard-generator/templates/template.sh create mode 100644 tests/skills/test_setup_wizard_generator_skill.py create mode 100644 website/docs/user-guide/skills/optional/devops/devops-setup-wizard-generator.md diff --git a/optional-skills/devops/setup-wizard-generator/SKILL.md b/optional-skills/devops/setup-wizard-generator/SKILL.md new file mode 100644 index 0000000000..c5c339e25e --- /dev/null +++ b/optional-skills/devops/setup-wizard-generator/SKILL.md @@ -0,0 +1,116 @@ +--- +name: setup-wizard-generator +description: "Generate a bash wizard guiding a human through manual setup." +version: 1.0.0 +author: "Matt Pocock (mattpocock/skills, wizard) + Hermes Agent" +license: MIT +platforms: [linux, macos] +metadata: + hermes: + tags: [wizard, setup, onboarding, credentials, secrets, migration, bash, human-in-the-loop] + related_skills: [] +--- + +# Setup Wizard Generator + +Generates an interactive bash **wizard**: a script that walks a human, step +by step, through a manual procedure that is tedious to do by hand and tedious +to re-explain every time. It opens each URL, says exactly what to click and +copy, captures the values, writes them where they belong (`.env`, GitHub +secrets), confirms at every stage, and shows how many stages are left. + +Ported from mattpocock/skills' MIT-licensed `wizard` skill. + +## When to Use + +- Provisioning infrastructure or third-party services (Stripe, Supabase, + DNS, OAuth apps) where only a human can click through the dashboard +- Setting up credentials, CI secrets, or repo variables +- One-off migrations or cutovers with irreversible human-gated steps +- Any procedure the user will hand to a teammate to run + +Do NOT use for steps the agent can perform itself — do those directly. + +## Prerequisites + +- `bash`; `gh` CLI only if stages write GitHub secrets/variables +- The library template: `templates/template.sh` in this skill's directory + +## Procedure + +### 1. Scope the procedure + +Work out every manual step the human must take and every value captured +along the way. Read the repo first, don't ask cold: + +- Setup: `.env`, `.env.example`, `README`, `docker-compose*`, framework + config, and `.github/workflows/*` (every `secrets.*` / `vars.*` reference + is a value the wizard must produce). +- Migration/cutover: the current state, the target state, and the + irreversible actions between them. + +Show the user the ordered stage list and the values each produces; they may +add, drop, or reorder. Done when every stage is named in order and, for each +captured value, you know (a) where the human gets it, (b) where it's written +(`.env`, a GitHub secret, both, or nowhere), and (c) whether it's secret +(hidden entry) or public. + +### 2. Map each stage's journey + +For each stage, write the precise path a human follows: which URL to open, +what to do there, where the value is shown — e.g. "Dashboard → Developers → +API keys → Reveal test key → copy". Where you don't know the current UI or +exact command, say so and check the docs or ask — never invent steps that +may not exist. + +### 3. Author the wizard + +Copy `templates/template.sh` (from this skill's directory) to the target +path. Replace the example stage with one `stage` per step, in dependency +order. Set `TOTAL_STAGES` to the number of stages you wrote. + +Library helpers: `stage`, `say`/`step`/`note`/`warn`, `open_url`, +`ask`/`ask_secret`, `write_env`, `set_secret`/`set_var`, `pause`/`confirm`, +`banner`, `finish`. The library above the `STAGES` marker is identical in +every wizard — never hand-edit it; that consistency is the point. + +Hold the bar the template sets: open the URL before asking for its value, +`ask_secret` for anything secret, `write_env` every persisted value, +`set_secret` only what CI actually needs, and `confirm` before anything +irreversible. Each `stage` clears the screen — keep one focused task per +stage so nothing the human needs scrolls away. + +A wizard is ephemeral by default: save it to a scratch or `scripts/` path, +delete it when the job's done. Commit it only when the user wants a +repeatable setup path living in the repo. + +### 4. Verify and hand off + +- `bash -n