Skip to content

[Skills] serialize CLI commands across processes - #30489

Merged
raycastbot merged 3 commits into
raycast:mainfrom
DaleSeo:fix/skills-cli-concurrency
Aug 24, 2026
Merged

[Skills] serialize CLI commands across processes#30489
raycastbot merged 3 commits into
raycast:mainfrom
DaleSeo:fix/skills-cli-concurrency

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #30486

Description

Update All Skills and Manage Skills can launch separate npx skills@latest processes against the same npm cache. When their package installation phases overlap, npm can fail one process with ENOTEMPTY before the Skills CLI starts.

This change serializes Skills CLI invocations across Raycast command processes with a stale-safe filesystem lock. Manage Skills also waits for pending CLI work before reading installed-skill metadata, preventing stale or partially written state from being displayed after an update.

Screencast

This change has no UI.

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: skills Issues related to the skills extension AI Extension platform: macOS platform: Windows labels Aug 24, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @keito4 @raulgg @pernielsentikaer @kayotimoteo @alexibuild @alastairsounds you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="fix/skills-cli-concurrency"
FORK_URL="https://github.com/DaleSeo/extensions.git"
EXTENSION_NAME="skills"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@raycastbot raycastbot added the OP is contributor The OP of the PR is a contributor of the extension label Aug 24, 2026
@DaleSeo DaleSeo changed the title fix(skills): serialize CLI commands across processes [Skills] serialize CLI commands across processes Aug 24, 2026
@DaleSeo
DaleSeo force-pushed the fix/skills-cli-concurrency branch from da4eb40 to 4fee88b Compare August 24, 2026 14:18
@DaleSeo
DaleSeo marked this pull request as ready for review August 24, 2026 14:20
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR serializes Skills CLI work across Raycast command processes and reads installed-skill data from one locked snapshot.

  • Adds a stale-safe filesystem lock around Skills CLI execution.
  • Captures the installed-skill list and lock metadata while holding the shared lock.
  • Computes update status from the captured metadata and adds the required runtime dependency.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
extensions/skills/src/utils/skills-cli-runner.ts Adds in-process and cross-process serialization around every Skills CLI invocation.
extensions/skills/src/utils/installed-skills.ts Captures installed skills and lock metadata atomically, resolving the previously reported inconsistent-read window.
extensions/skills/src/utils/skills-cli.ts Allows the locked snapshot operation to inject a runner without reacquiring the lock.
extensions/skills/src/hooks/useInstalledSkills.ts Switches Manage Skills to the consolidated snapshot-and-update-status operation.
extensions/skills/package.json Adds proper-lockfile as a runtime dependency and its declarations as a development dependency.
extensions/skills/CHANGELOG.md Documents the cross-process serialization and consistent metadata snapshot behavior.

Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile

Comment thread extensions/skills/src/utils/installed-skills.ts Outdated

@raulgg raulgg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! thank you for the fix

@raycast-extensions-bot raycast-extensions-bot Bot added the Approved Approved by a user label Aug 24, 2026
@0xdhrv 0xdhrv self-assigned this Aug 24, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved ✅

@raycastbot
raycastbot merged commit 21ac1b2 into raycast:main Aug 24, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/keito4/skills

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Extension Approved Approved by a user extension fix / improvement Label for PRs with extension's fix improvements extension: skills Issues related to the skills extension OP is contributor The OP of the PR is a contributor of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Skills]...

4 participants