forked from bchanot/claude
feat(profile): add gstack on|off verb to lib/profile.sh
Centralize gstack toggling in the `profile` command without losing the
active-profile label.
- `gstack on` re-enables ALL parked gstack skills (moves
skills-disabled/gstack__* back) but does NOT touch .active-profile,
so the user layers full gstack on top of their current profile and
the statusline label is preserved. Unlike `reset`, which clears the
label to "none".
- `gstack off` disables gstack skills not listed in the active profile;
errors cleanly when no profile is active (needs one to know what to
keep).
Refactor (behavior-preserving): extract three shared helpers
`enable_all_gstack`, `disable_gstack_not_in`, `parked_gstack_count` and
rewire `cmd_reset` + `cmd_set` to reuse them instead of duplicating the
symlink-toggle loops. Wire `gstack` into main() dispatch, usage(), and the
header usage block.
Docs: SKILL.md argument-hint, examples, and output-policy updated. The
generic `make profile cmd="gstack on"` target already covers Make usage.
Verified: shellcheck CLEAN, `bash -n` OK, 6-case test (help, bad-action,
off-with-no-profile, on, off-trim, on-cycle) with final assertion that the
live symlink state was restored exactly to its pre-test value.
Memory: capitalize BDR-018 (decision), LRN-024 (DRY helper-extraction
pattern), BLK-007 (6 gstack source skills ios-*/spec unlinked post
submodule bump — open follow-up), EVAL-002 (self-eval, false "full.profile
bug" flag corrected pre-edit). Backfill index drift: BDR-017, BLK-005/006.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0d9f3d41eb
commit
da4e6b9590
@@ -8,7 +8,7 @@ description: |
|
||||
"switch to design", "set profile", "active profile", "quel profil",
|
||||
"profil design", "active les skills design", "désactive gstack",
|
||||
"réduire le bruit gstack".
|
||||
argument-hint: list | show <name> | current | apply <name> | set <name> | reset | diff <a> <b>
|
||||
argument-hint: list | show <name> | current | apply <name> | set <name> | reset | gstack on|off | diff <a> <b>
|
||||
disable-model-invocation: false
|
||||
allowed-tools:
|
||||
- Bash
|
||||
@@ -81,9 +81,13 @@ bash "$HOME/.claude/lib/profile.sh" apply <name>
|
||||
# Enable only skills in profile (disables non-listed gstack skills)
|
||||
bash "$HOME/.claude/lib/profile.sh" set <name>
|
||||
|
||||
# Re-enable every gstack skill (undo any set/apply)
|
||||
# Re-enable every gstack skill (undo any set/apply) — resets active label to "none"
|
||||
bash "$HOME/.claude/lib/profile.sh" reset
|
||||
|
||||
# Toggle gstack only, keeping the active-profile label intact
|
||||
bash "$HOME/.claude/lib/profile.sh" gstack on # re-enable ALL gstack on top of current profile
|
||||
bash "$HOME/.claude/lib/profile.sh" gstack off # disable gstack skills not in the active profile
|
||||
|
||||
# Compare two profiles
|
||||
bash "$HOME/.claude/lib/profile.sh" diff <a> <b>
|
||||
```
|
||||
@@ -101,9 +105,9 @@ bash "$HOME/.claude/lib/profile.sh" $ARGUMENTS
|
||||
|
||||
## Output policy
|
||||
|
||||
- After `set` / `apply` / `reset`: show the count of skills moved + tell the
|
||||
user to start a new Claude session to pick up the changes (Claude scans
|
||||
`skills/` at session start).
|
||||
- After `set` / `apply` / `reset` / `gstack on|off`: show the count of skills
|
||||
moved + tell the user to start a new Claude session to pick up the changes
|
||||
(Claude scans `skills/` at session start).
|
||||
- After `current`: report the active profile + match percentage.
|
||||
- After `show`: render the table directly — no extra commentary unless the user
|
||||
asks.
|
||||
|
||||
Reference in New Issue
Block a user