fix(skills): default skills install to detected agents instead of --all#150
Open
Xefreh wants to merge 1 commit into
Open
fix(skills): default skills install to detected agents instead of --all#150Xefreh wants to merge 1 commit into
Xefreh wants to merge 1 commit into
Conversation
firecrawl init/setup skills always appended --all to the underlying `npx skills add` call, installing skills into every agent the `skills` package knows about (60+), regardless of whether it's actually present on the machine. This littered $HOME with dozens of unused hidden directories (.openclaw, .qwen, .tabnine, .kiro, ...). Reuse the existing agent-detection logic (previously only reachable from the native no-npx fallback) so both entry points scope the install to agents actually detected on the machine by default, falling back to --all only when detection finds nothing. Fixes firecrawl#149
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
Fixes #149.
firecrawl initandfirecrawl setup skillsalways appended--allto theunderlying
npx skills addcall, which installs skills into every agent theskillspackage (vercel-labs/skills) knows about — 60+ agents — regardlessof whether the agent is actually present on the machine. In practice this
litters
$HOMEwith dozens of unused hidden directories (.openclaw,.qwen,.tabnine,.kiro,.trae,.vibe, ...) for tools the user neverinstalled.
The codebase already has the right detection logic —
detectInstalledAgents()insrc/commands/skills-native.ts— but it wasonly reachable from the native no-npx fallback path, never from the default
npx-based install path that basically everyone hits.Changes
skills-native.ts: exportdetectInstalledAgentNames(), a thin wrapperaround the existing detection.
skills-install.ts: addresolveSkillsTarget()— explicit--agentor--allstill win, otherwise install is scoped to agents actually detectedon the machine, falling back to
--allonly if nothing is detected (so anon-interactive run never ends up with no target).
buildSkillsInstallArgsno longer defaults to
--allon its own, andagentcan now be a list somultiple detected agents can be passed in one
npx skills addcall.init.ts/setup.ts: both entry points now callresolveSkillsTargetinstead of leaving the
--alldefault implicit.init.test.ts/setup.test.tsto cover the new default(detection-based) behavior and the fallback-to-
--allcase, isolating$HOMEper test (mkdtempSync) so results don't depend on the machinerunning the suite.
Test plan
npm run buildpassesnpx vitest run— 363/363 tests passinit -y --skip-install --skip-authagainst a$HOMEcontaining only~/.claude; confirmed skills were installed into~/.claude/skillsand
~/.agents/skillsonly, with none of the other 60+ agentdirectories created.