feat: custom prefix + SKILL_NAME templating — /g-ship, /g-qa in one command (v0.12.12.0)#586
Open
lucaslim wants to merge 6 commits intogarrytan:mainfrom
Open
feat: custom prefix + SKILL_NAME templating — /g-ship, /g-qa in one command (v0.12.12.0)#586lucaslim wants to merge 6 commits intogarrytan:mainfrom
lucaslim wants to merge 6 commits intogarrytan:mainfrom
Conversation
…-root on install
When a user opts into gstack- prefixed skills, Claude Code reads the name:
field in SKILL.md frontmatter to register slash commands. Previously that
field was hardcoded (e.g. name: ship) even when installed as gstack-ship/,
so /gstack-ship never triggered.
Fix: replace hardcoded name: fields in all 29 SKILL.md.tmpl files with
{{SKILL_NAME}}, resolved by a new SKILL_NAME resolver in gen-skill-docs.ts.
The resolver derives the name from the skill directory + the --prefix flag
(e.g. --prefix gstack- turns ship → gstack-ship, preserves gstack-upgrade).
setup now calls gen-skill-docs.ts with --output-root ~/.claude/skills/ and
--prefix gstack- (when configured), generating SKILL.md files directly into
real directories instead of symlinking. The installed SKILL.md reflects the
correct name: field so /gstack-ship, /gstack-qa, etc. all register properly.
Cleanup helpers updated to remove both old symlinks and generated directories
(identified by AUTO-GENERATED header) when switching prefix modes.
…put-root integration tests Two review-driven improvements: 1. generate_claude_skill_docs() now checks PIPESTATUS[0] after piping bun's output through grep. If bun exits non-zero (not in PATH, syntax error, module not found), the install previously appeared to succeed with no skills written. Now it prints a clear ERROR to stderr and returns 1. 2. New describe block in gen-skill-docs.test.ts: three integration tests that actually invoke gen-skill-docs.ts with --prefix gstack- --output-root /tmp/... and read the output SKILL.md files to assert correct name: values: - name: gstack-ship with prefix (happy path) - name: gstack-upgrade with prefix (already-prefixed, no double-prefix) - name: ship without prefix (unprefixed mode) These close the gap the eng review found: prior tests only checked that setup referenced the right function names, but nobody verified the actual output.
…tes skills instantly
Users can now choose a custom prefix word instead of just gstack- or none.
- setup interactive prompt: 3 options (flat / gstack- / custom word)
- --prefix <word> CLI flag accepts a word (dash appended automatically)
- gstack-config set skill_prefix g triggers immediate Claude skill regen
- gstack-config get skill_prefix migrates stored true→gstack, false→false
- Validation: [a-z0-9]{1,10} in both setup and gstack-config
- Universal cleanup_generated_skill_dirs replaces prefix-specific cleanup functions
- SKILL_PREFIX changes from int (0/1) to string (word or empty)
- Dash guard: empty prefix never produces --prefix - (dash-only)
- GSTACK_SKIP_REGEN=1 prevents double regen when setup calls gstack-config set
- Preamble text updated: handles any prefix word, not just "true"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Preamble SKILL_PREFIX guidance now handles arbitrary prefix words (g, gs, etc.) instead of only the legacy "true" boolean value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eld drives Claude slash command trigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
How the name templating works
Every SKILL.md template has `name: {{SKILL_NAME}}` in its frontmatter. When `gen-skill-docs.ts` runs:
Without this, renaming the directory to `g-ship/` would create the file path but Claude Code would still look for a different name. The `name:` field is the actual hook.
Test plan
Design doc
APPROVED by autoplan (CEO + Eng reviews): `~/.gstack/projects/lucaslim-gstack/lucaslim-lucaslim-skill-prefix-frontmatter-sync-design-20260327-131400.md`
9 MUST-FIX items from eng review — all addressed before coding began.