$npx -y skills add thanh-abaii/gstack-windows-port --skill gstack-skillifyPackage a custom developer workflow into a reusable agent skill. (gstack)
| 1 | ## Preamble (run first) |
| 2 | |
| 3 | ```bash |
| 4 | python "bin/gstack-boot.py" --skill skillify | iex |
| 5 | ``` |
| 6 | |
| 7 | ## When to invoke this skill |
| 8 | |
| 9 | Use when the user explicitly asks to package, skillify, or automate a series of manual steps or command history into a reusable, structured gstack skill. |
| 10 | |
| 11 | ## Plan Mode Safe Operations |
| 12 | |
| 13 | In plan mode, allowed because they inform the plan: `$B`, `$D`, `codex exec`/`codex review`, writes to `$HOME/.gstack/`, writes to the plan file, and `open` (or `Start-Process`) for generated artifacts. |
| 14 | |
| 15 | ## Skill Invocation During Plan Mode |
| 16 | |
| 17 | If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant — `mcp__*__AskUserQuestion` or native; see "AskUserQuestion Format → Tool resolution") satisfies plan mode's end-of-turn requirement. If no variant is callable, the skill is BLOCKED — stop and report `BLOCKED — AskUserQuestion unavailable` per the AskUserQuestion Format rule. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION — ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode. |
| 18 | |
| 19 | If `PROACTIVE` is `"false"`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?" |
| 20 | |
| 21 | If `SKILL_PREFIX` is `"true"`, suggest/invoke `/gstack-*` names. Disk paths stay `$HOME/.claude/skills/gstack/[skill-name]/SKILL.md`. |
| 22 | |
| 23 | If output shows `UPGRADE_AVAILABLE <old> <new>`: read `$HOME/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). |
| 24 | |
| 25 | If output shows `JUST_UPGRADED <from> <to>`: print "Running gstack v{to} (just updated!)". If `SPAWNED_SESSION` is true, skip feature discovery. |
| 26 | |
| 27 | Feature discovery, max one prompt per session: |
| 28 | |
| 29 | - Missing `$HOME/.claude/skills/gstack/.feature-prompted-continuous-checkpoint`: AskUserQuestion for Continuous checkpoint auto-commits. If accepted, run `python "bin/gstack-config.py" set checkpoint_mode continuous`. Always create marker. |
| 30 | - Missing `$HOME/.claude/skills/gstack/.feature-prompted-model-overlay`: inform "Model overlays are active. MODEL_OVERLAY shows the patch." Always create marker. |
| 31 | |
| 32 | After upgrade prompts, continue workflow. |
| 33 | |
| 34 | If `WRITING_STYLE_PENDING` is `yes`: ask once about writing style: |
| 35 | |
| 36 | > v1 prompts are simpler: first-use jargon glosses, outcome-framed questions, shorter prose. Keep default or restore terse? |
| 37 | |
| 38 | Options: |
| 39 | |
| 40 | - A) Keep the new default (recommended — good writing helps everyone) |
| 41 | - B) Restore V0 prose — set `explain_level: terse` |
| 42 | |
| 43 | If A: leave `explain_level` unset (defaults to `default`). |
| 44 | If B: run `python "bin/gstack-config.py" set explain_level terse`. |
| 45 | |
| 46 | Always run (regardless of choice): |
| 47 | |
| 48 | ```powershell |
| 49 | Remove-Item -Force "$HOME/.gstack/.writing-style-prompt-pending" -ErrorAction SilentlyContinue |
| 50 | New-Item -Path "$HOME/.gstack/.writing-style-prompted" -ItemType File -Force |
| 51 | ``` |
| 52 | |
| 53 | Skip if `WRITING_STYLE_PENDING` is `no`. |
| 54 | |
| 55 | If `LAKE_INTRO` is `no`: say "gstack follows the **Boil the Lake** principle — do the complete thing when AI makes marginal cost near-zero. Read more: https://garryslist.org/posts/boil-the-ocean" Offer to open: |
| 56 | |
| 57 | ```powershell |
| 58 | Start-Process "https://garryslist.org/posts/boil-the-ocean" |
| 59 | New-Item -Path "$HOME/.gstack/.completeness-intro-seen" -ItemType File -Force |
| 60 | ``` |
| 61 | |
| 62 | Only run `Start-Process` if yes. Always run `New-Item`. |
| 63 | |
| 64 | If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: ask telemetry once via AskUserQuestion: |
| 65 | |
| 66 | > Help gstack get better. Share usage data only: skill, duration, crashes, stable device ID. No code, file paths, or repo names. |
| 67 | |
| 68 | Options: |
| 69 | |
| 70 | - A) Help gstack get better! (recommended) |
| 71 | - B) No thanks |
| 72 | |
| 73 | If A: run `python "bin/gstack-config.py" set telemetry community` |
| 74 | |
| 75 | If B: ask follow-up: |
| 76 | |
| 77 | > Anonymous mode sends only aggregate usage, no unique ID. |
| 78 | |
| 79 | Options: |
| 80 | |
| 81 | - A) Sure, anonymous is fine |
| 82 | - B) No thanks, fully off |
| 83 | |
| 84 | If B→A: run `python "bin/gstack-config.py" set telemetry anonymous` |
| 85 | If B→B: run `python "bin/gstack-config.py" set telemetry off` |
| 86 | |
| 87 | Always run: |
| 88 | |
| 89 | ```powershell |
| 90 | New-Item -Path "$HOME/.gstack/.telemetry-prompted" -ItemType File -Force |
| 91 | ``` |
| 92 | |
| 93 | Skip if `TEL_PROMPTED` is `yes`. |
| 94 | |
| 95 | If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: ask once: |
| 96 | |
| 97 | > Let gstack proactively suggest skills, like /qa for "doe |