Skip to content

fix(skills): default skills install to detected agents instead of --all#150

Open
Xefreh wants to merge 1 commit into
firecrawl:mainfrom
Xefreh:fix/skills-install-default-to-detected-agents
Open

fix(skills): default skills install to detected agents instead of --all#150
Xefreh wants to merge 1 commit into
firecrawl:mainfrom
Xefreh:fix/skills-install-default-to-detected-agents

Conversation

@Xefreh

@Xefreh Xefreh commented Jul 4, 2026

Copy link
Copy Markdown

Summary

Fixes #149.

firecrawl init and firecrawl setup skills always appended --all to the
underlying npx skills add call, which installs skills into every agent the
skills package (vercel-labs/skills) knows about — 60+ agents — regardless
of whether the agent is actually present on the machine. In practice this
litters $HOME with dozens of unused hidden directories (.openclaw,
.qwen, .tabnine, .kiro, .trae, .vibe, ...) for tools the user never
installed.

The codebase already has the right detection logic —
detectInstalledAgents() in src/commands/skills-native.ts — but it was
only reachable from the native no-npx fallback path, never from the default
npx-based install path that basically everyone hits.

Changes

  • skills-native.ts: export detectInstalledAgentNames(), a thin wrapper
    around the existing detection.
  • skills-install.ts: add resolveSkillsTarget() — explicit --agent or
    --all still win, otherwise install is scoped to agents actually detected
    on the machine, falling back to --all only if nothing is detected (so a
    non-interactive run never ends up with no target). buildSkillsInstallArgs
    no longer defaults to --all on its own, and agent can now be a list so
    multiple detected agents can be passed in one npx skills add call.
  • init.ts / setup.ts: both entry points now call resolveSkillsTarget
    instead of leaving the --all default implicit.
  • Updated init.test.ts / setup.test.ts to cover the new default
    (detection-based) behavior and the fallback-to---all case, isolating
    $HOME per test (mkdtempSync) so results don't depend on the machine
    running the suite.

Test plan

  • npm run build passes
  • npx vitest run — 363/363 tests pass
  • Manually verified on a real machine: ran the built CLI's
    init -y --skip-install --skip-auth against a $HOME containing only
    ~/.claude; confirmed skills were installed into ~/.claude/skills
    and ~/.agents/skills only, with none of the other 60+ agent
    directories created.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

firecrawl init installs skills to every known agent by default, even ones not installed on the machine

1 participant