fix(skills): make gstack slash skills visible in Cursor - #40
Conversation
Cursor indexes one-level skill dirs (.cursor/skills/<name>/SKILL.md), so the nested .claude/skills/gstack/<skill> pack was invisible as /plan-ceo-review. Flatten each skill into .cursor/skills and ~/.cursor/skills, and vendor gstack bin/setup so the skill-start preamble is runnable. Co-authored-by: Prax Lannister <praxstack@users.noreply.github.com>
|
Important Review skippedToo many files! This PR contains 238 files, which is 138 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (238)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45fb5e4850
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| local src="$1" dest="$2" | ||
| if [ -d "$src/bin" ]; then | ||
| mkdir -p "$dest/bin" | ||
| (cd "$src/bin" && find . -type f \ |
There was a problem hiding this comment.
Vendor dependencies required by copied gstack binaries
When the documented installer refreshes gstack, this copies bin/ but omits pack-level dependencies such as lib/, scripts/, and package.json. Many newly exposed workflows directly invoke affected binaries—for example, /ship runs gstack-next-version, gstack-evidence, and gstack-redact, all of which import modules from ../lib; the committed vendor tree has no lib/, so these commands fail with module-not-found errors even when Bun is installed. Copy the runtime dependency closure or avoid exposing binaries that cannot run.
Useful? React with 👍 / 👎.
| echo "link-agent-skills: left in place (not a symlink): $dest" | ||
| return 0 | ||
| fi | ||
| ln -sfn "$src" "$dest" |
There was a problem hiding this comment.
Preserve existing user-owned skill symlinks
When the boot linker encounters an existing symlink such as ~/.cursor/skills/review or spec that points to a user's personal or plugin skill, this unconditional ln -sfn replaces it with the gstack skill. The preceding guard protects only non-symlinks, despite the pruning logic claiming that only repository-managed gstack links are replaced; generic gstack names make collisions likely. Check that an existing symlink already targets this vendored pack before replacing it.
Useful? React with 👍 / 👎.
| '--skill', 'plan-ceo-review', | ||
| '--model', 'claude', | ||
| '--parent-pid', String(process.pid) | ||
| ], { encoding: 'utf8', cwd: ROOT }); |
There was a problem hiding this comment.
Isolate gstack state in the runtime smoke test
When a developer or CI runner has an existing ~/.gstack, this invocation inherits the real HOME and GSTACK_HOME. gstack-skill-start creates session and analytics files, removes stale session entries and pending analytics, reads the user's configuration, and may perform the update-check HTTP request, so an ordinary npm test can mutate real gstack state, contaminate telemetry, and become network-dependent. Run it with a temporary HOME/GSTACK_HOME and clean that directory afterward.
Useful? React with 👍 / 👎.
| @@ -0,0 +1 @@ | |||
| 1.74.0.0 | |||
There was a problem hiding this comment.
Keep the vendored gstack version metadata consistent
This runtime declares itself as gstack 1.74.0.0, while PACK_META.gstack.version and the generated skills index still identify the newly vendored bin/setup payload as 1.72.0.0. As a result, regenerating the index after the documented refresh preserves incorrect provenance, making it unclear which upstream runtime is being audited or updated. Derive the index version from this file or update the metadata to the same version.
Useful? React with 👍 / 👎.
| @@ -341,4 +378,6 @@ for entry in "${PACKS[@]}"; do | |||
| extract_pack "$pack" "$repo" "$subdir" "$license_rel" "$allow" "$ref" | |||
| done | |||
|
|
|||
| echo "Flattening gstack skills for Cursor discovery..." | |||
| bash "$REPO_ROOT/scripts/link-agent-skills.sh" | |||
There was a problem hiding this comment.
Avoid deleting global skill packs during a repository refresh
When a developer runs the documented repository refresh, this new call also invokes link_packs, which executes rm -rf on every colliding real directory under both ~/.claude/skills and ~/.agents/skills before replacing it with a repository symlink. A locally installed or customized pack named gstack, aws, microsoft, or any other vendored pack is therefore permanently deleted even though the command is presented as refreshing the repository checkout. Keep global activation separate from the vendor refresh, or make the linker preserve user-owned directories.
AGENTS.md reference: AGENTS.md:L42-L43
Useful? React with 👍 / 👎.
| const PROJECT_SKILLS = path.join(ROOT, '.cursor/skills'); | ||
|
|
||
| function runLink(home) { | ||
| execFileSync('bash', [SCRIPT], { |
There was a problem hiding this comment.
Keep the test suite runnable without Bash on Windows
On supported Windows installations that do not provide Git Bash or WSL, this test unconditionally spawns a bash executable and fails with ENOENT, preventing the otherwise Node-based npm test suite from running. The existing CI jobs are Ubuntu-only, so they do not catch this cross-platform regression. Skip this shell integration test when Bash is unavailable or provide a platform-neutral test harness.
Useful? React with 👍 / 👎.
📋 Description
Cursor indexes slash skills one level deep (
.cursor/skills/<name>/SKILL.mdor a pluginskills/tree). Vendored gstack lived only at.claude/skills/gstack/<skill>/SKILL.md, so/plan-ceo-reviewnever appeared next to pstack commands like/setup-pstack.This change flattens each gstack skill into project
.cursor/skills/<name>(and home~/.cursor/skillson environment boot), and vendors gstackbin/sogstack-skill-startis present.Official
./setup --host cursoris not used on boot: help text still lags issue #2361, and the clone installer requires bun.🔗 Related Issue
No issue. Follow-up to skill-pack vendoring on main.
🔄 Type of Change
✅ Checklist
link-agent-skills.shflattens gstack skills for Cursorplan-ceo-reviewis at.cursor/skills/plan-ceo-reviewnpm testpassed in the implementing run/plan-ceo-reviewappears in the Cursor slash-command list after pulling this branch📝 Additional Notes
Reload Cursor skills / reopen the project if the slash list is cached. Nested
.claude/skills/gstack/is unchanged for Claude Code and Codex.