$npx -y skills add thanh-abaii/gstack-windows-port --skill gstack-document-generateGenerate missing documentation from scratch for a feature, module, or entire project. (gstack)
| 1 | <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> |
| 2 | <!-- Regenerate: bun run gen:skill-docs --> |
| 3 | |
| 4 | ## When to invoke this skill |
| 5 | |
| 6 | Uses the Diataxis framework (tutorial / how-to / reference / explanation) to produce |
| 7 | complete, structured documentation. Can be invoked standalone or called by |
| 8 | /document-release when it Get-ChildItem -Recurses coverage gaps. Use when asked to "write docs", |
| 9 | "generate documentation", "document this feature", "create a tutorial", or |
| 10 | "explain this module". |
| 11 | |
| 12 | ## Preamble (run first) |
| 13 | |
| 14 | ```bash |
| 15 | python "bin/gstack-boot.py" --skill document-generate | iex |
| 16 | ``` |
| 17 | |
| 18 | ## Plan Mode Safe Operations |
| 19 | |
| 20 | In plan mode, allowed because they inform the plan: `$B`, `$D`, `codex exec`/`codex review`, writes to `~/.gstack/`, writes to the plan file, and `open` for generated artifacts. |
| 21 | |
| 22 | ## Skill InvoGet-Contention During Plan Mode |
| 23 | |
| 24 | 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. |
| 25 | |
| 26 | 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?" |
| 27 | |
| 28 | If `SKILL_PREFIX` is `"true"`, suggest/invoke `/gstack-*` names. Disk paths stay `~/.claude/skills/gstack/[skill-name]/SKILL.md`. |
| 29 | |
| 30 | If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.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). |
| 31 | |
| 32 | If output shows `JUST_UPGRADED <from> <to>`: print "Running gstack v{to} (just updated!)". If `SPAWNED_SESSION` is true, skip feature discovery. |
| 33 | |
| 34 | Feature discovery, max one prompt per session: |
| 35 | |
| 36 | - Missing `~/.claude/skills/gstack/.feature-prompted-continuous-checkpoint`: AskUserQuestion for Continuous checkpoint auto-commits. If accepted, run `~/.claude/skills/gstack/bin/gstack-config set checkpoint_mode continuous`. Always touch marker. |
| 37 | - Missing `~/.claude/skills/gstack/.feature-prompted-model-overlay`: inform "Model overlays are active. MODEL_OVERLAY shows the patch." Always touch marker. |
| 38 | |
| 39 | After upgrade prompts, continue workflow. |
| 40 | |
| 41 | If `WRITING_STYLE_PENDING` is `yes`: ask once about writing style: |
| 42 | |
| 43 | > v1 prompts are simpler: first-use jargon glosses, outcome-framed questions, shorter prose. Keep default or restore terse? |
| 44 | |
| 45 | Options: |
| 46 | |
| 47 | - A) Keep the new default (recommended — good writing helps everyone) |
| 48 | - B) Restore V0 prose — set `explain_level: terse` |
| 49 | |
| 50 | If A: leave `explain_level` unset (defaults to `default`). |
| 51 | If B: run `~/.claude/skills/gstack/bin/gstack-config set explain_level terse`. |
| 52 | |
| 53 | Always run (regardless of choice): |
| 54 | |
| 55 | ```bash |
| 56 | Remove-Item -Force ~/.gstack/.writing-style-prompt-pending |
| 57 | touch ~/.gstack/.writing-style-prompted |
| 58 | ``` |
| 59 | |
| 60 | Skip if `WRITING_STYLE_PENDING` is `no`. |
| 61 | |
| 62 | 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: |
| 63 | |
| 64 | ```bash |
| 65 | open https://garryslist.org/posts/boil-the-ocean |
| 66 | touch ~/.gstack/.completeness-intro-seen |
| 67 | ``` |
| 68 | |
| 69 | Only run `open` if yes. Always run `touch`. |
| 70 | |
| 71 | If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: ask telemetry once via AskUserQuestion: |
| 72 | |
| 73 | > Help gstack get better. Share usage data only: skill, duration, crashes, stable device ID. No code, file paths, or repo names. |
| 74 | |
| 75 | Options: |
| 76 | |
| 77 | - A) Help gstack get better! (recommended) |
| 78 | - B) No thanks |
| 79 | |
| 80 | If A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry community` |
| 81 | |
| 82 | If B: ask follow-up: |
| 83 | |
| 84 | > Anonymous mode sends only aggregate usage, no unique ID. |
| 85 | |
| 86 | Options: |
| 87 | |
| 88 | - A) Sure, anonymous is fine |
| 89 | - B) No thanks, fully off |
| 90 | |
| 91 | If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous` |
| 92 | If B→B: run `~/.claude/ski |