Summary
npx skills add <pkg> --skill <name> --agent <a> <b> -g -y reports a successful install with status: "installed" and lists the target agents under "agents": [...], but when run non-interactively (auto-detected claude-code_2-1-275_agent) it never actually creates the per-agent skill file/symlink for any agent except the one it auto-detected as invoking it. Exit code is 0 and there is no warning/error in stdout or stderr.
Repro
npx --yes skills add typesafe-ai/skills --skill typesafe-ai --agent codex cursor -g -y --json
Output (trimmed):
● claude-code_2-1-275_agent Agent detected — installing non-interactively
◇ Installation Summary
│ ~/.agents/skills/typesafe-ai
│ copy → Codex, Cursor
◇ Installation complete
◇ Installed 1 skill
│ ✓ typesafe-ai (copied)
│ → ~/.agents/skills/typesafe-ai
└ Done!
[
{
"name": "typesafe-ai",
"status": "installed",
"path": "/Users/mishaalmurawala/.agents/skills/typesafe-ai",
"scope": "global",
"agents": ["Codex", "Cursor"],
"mode": "copy"
}
]
Exit code: 0. No stderr output. Ran it twice — same result both times.
Expected
Per the documented per-agent shapes (confirmed by inspecting other already-working skills on the same machine, e.g. origami):
- Codex gets a real copied directory at
~/.codex/skills/typesafe-ai/
- Cursor gets a symlink at
~/.cursor/skills/typesafe-ai → ../../.agents/skills/typesafe-ai
Actual
Only the shared source directory ~/.agents/skills/typesafe-ai (containing SKILL.md + LICENSE) is created. Neither ~/.codex/skills/typesafe-ai nor ~/.cursor/skills/typesafe-ai exists on disk:
$ ls ~/.codex/skills/typesafe-ai
ls: /Users/mishaalmurawala/.codex/skills/typesafe-ai: No such file or directory
$ ls ~/.cursor/skills/typesafe-ai
ls: /Users/mishaalmurawala/.cursor/skills/typesafe-ai: No such file or directory
npx skills ls -g -a codex and npx skills ls -g -a cursor both list typesafe-ai as installed for that agent (Agents: Codex, Cursor) even though the on-disk artifact the agent would actually read is missing — so list is reporting from the same source-of-truth the add command already trusted, not verifying the per-agent copy actually landed.
I confirmed this isn't a one-off race: reproduced identically on two separate runs, both with -y and --json.
Workaround
Manually replicating the install shape used for other working skills closes the gap:
cp -R ~/.agents/skills/typesafe-ai ~/.codex/skills/typesafe-ai
ln -s ../../.agents/skills/typesafe-ai ~/.cursor/skills/typesafe-ai
Environment
skills CLI: 1.7.0 (via npx --yes skills)
- Invoking agent: Claude Code
2.1.275 (auto-detected by the CLI as claude-code_2-1-275_agent, which is likely why only its own non-interactive path ran and the explicit --agent codex cursor targets were skipped)
- OS: macOS (Darwin 27.0.0)
- Node: run via
npx, no local pin
Suspected root cause
The "Agent detected — installing non-interactively" branch appears to special-case the auto-detected invoking agent and skip the explicit --agent <list> targets entirely when running non-interactively — i.e. --agent codex cursor is silently ignored once the tool decides it's running inside an agent session, rather than being honored in addition to (or instead of) the auto-detected one. The success report/exit code should not be 0/"installed" for agents whose files were never written.
Happy to provide the full raw terminal capture if useful.
Summary
npx skills add <pkg> --skill <name> --agent <a> <b> -g -yreports a successful install withstatus: "installed"and lists the target agents under"agents": [...], but when run non-interactively (auto-detectedclaude-code_2-1-275_agent) it never actually creates the per-agent skill file/symlink for any agent except the one it auto-detected as invoking it. Exit code is 0 and there is no warning/error in stdout or stderr.Repro
Output (trimmed):
[ { "name": "typesafe-ai", "status": "installed", "path": "/Users/mishaalmurawala/.agents/skills/typesafe-ai", "scope": "global", "agents": ["Codex", "Cursor"], "mode": "copy" } ]Exit code:
0. No stderr output. Ran it twice — same result both times.Expected
Per the documented per-agent shapes (confirmed by inspecting other already-working skills on the same machine, e.g.
origami):~/.codex/skills/typesafe-ai/~/.cursor/skills/typesafe-ai→../../.agents/skills/typesafe-aiActual
Only the shared source directory
~/.agents/skills/typesafe-ai(containingSKILL.md+LICENSE) is created. Neither~/.codex/skills/typesafe-ainor~/.cursor/skills/typesafe-aiexists on disk:npx skills ls -g -a codexandnpx skills ls -g -a cursorboth listtypesafe-aias installed for that agent (Agents: Codex, Cursor) even though the on-disk artifact the agent would actually read is missing — solistis reporting from the same source-of-truth theaddcommand already trusted, not verifying the per-agent copy actually landed.I confirmed this isn't a one-off race: reproduced identically on two separate runs, both with
-yand--json.Workaround
Manually replicating the install shape used for other working skills closes the gap:
Environment
skillsCLI:1.7.0(vianpx --yes skills)2.1.275(auto-detected by the CLI asclaude-code_2-1-275_agent, which is likely why only its own non-interactive path ran and the explicit--agent codex cursortargets were skipped)npx, no local pinSuspected root cause
The "Agent detected — installing non-interactively" branch appears to special-case the auto-detected invoking agent and skip the explicit
--agent <list>targets entirely when running non-interactively — i.e.--agent codex cursoris silently ignored once the tool decides it's running inside an agent session, rather than being honored in addition to (or instead of) the auto-detected one. The success report/exit code should not be0/"installed" for agents whose files were never written.Happy to provide the full raw terminal capture if useful.