Remove detectAgents() workaround after upstream fix is merged
Author: vgpastorCreated Mar 31, 2026Updated Apr 8, 2026
Labelsenhancement
Context
In #15 we added detectAgents() and AGENT_FOLDER_MAP to auto-detect installed agents by scanning ~/.<agent>/skills directories. This is a workaround for a bug in the upstream skills CLI where the interactive agent selection prompt hangs when stdio is piped (our case via child_process.spawn).
The upstream already has detectInstalledAgents() that does the same detection — the problem is that it falls through to an interactive prompt when multiple agents are found. We submitted a fix: https://github.com/vercel-labs/skills/pull/816
What to do when the upstream fix is merged
Once vercel-labs/skills#816 (or an equivalent fix) is released:
- Remove
AGENT_FOLDER_MAPfromskills-map.mjs - Remove
detectAgents()fromlib.mjs - Remove the
AGENT_FOLDER_MAPre-export fromlib.mjs - Simplify
index.mjs— stop resolving agents when no-aflag; let the upstream handle it - Remove
tests/detect-agents.test.mjs - Remove the agent-related CLI tests from
tests/cli.test.mjs
The -a flag passthrough for user overrides should remain as-is.
Upstream references
- PR: https://github.com/vercel-labs/skills/pull/816
- Related issues: vercel-labs/skills#793, vercel-labs/skills#178, vercel-labs/skills#304
Source: midudev/autoskills