@agent-native/core 0.51.14 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/connect.d.ts +4 -3
  3. package/dist/cli/connect.d.ts.map +1 -1
  4. package/dist/cli/connect.js +67 -26
  5. package/dist/cli/connect.js.map +1 -1
  6. package/dist/cli/mcp-config-writers.d.ts +20 -13
  7. package/dist/cli/mcp-config-writers.d.ts.map +1 -1
  8. package/dist/cli/mcp-config-writers.js +152 -13
  9. package/dist/cli/mcp-config-writers.js.map +1 -1
  10. package/dist/cli/mcp.d.ts +2 -2
  11. package/dist/cli/mcp.d.ts.map +1 -1
  12. package/dist/cli/mcp.js +41 -193
  13. package/dist/cli/mcp.js.map +1 -1
  14. package/dist/cli/plan-local.d.ts +13 -1
  15. package/dist/cli/plan-local.d.ts.map +1 -1
  16. package/dist/cli/plan-local.js +62 -8
  17. package/dist/cli/plan-local.js.map +1 -1
  18. package/dist/cli/recap.d.ts.map +1 -1
  19. package/dist/cli/recap.js +1 -1
  20. package/dist/cli/recap.js.map +1 -1
  21. package/dist/cli/skills.d.ts +13 -6
  22. package/dist/cli/skills.d.ts.map +1 -1
  23. package/dist/cli/skills.js +224 -59
  24. package/dist/cli/skills.js.map +1 -1
  25. package/dist/client/agent-engine-key.d.ts +6 -4
  26. package/dist/client/agent-engine-key.d.ts.map +1 -1
  27. package/dist/client/agent-engine-key.js +9 -6
  28. package/dist/client/agent-engine-key.js.map +1 -1
  29. package/dist/client/chat/run-recovery.js +1 -1
  30. package/dist/client/chat/run-recovery.js.map +1 -1
  31. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  32. package/dist/client/settings/SettingsPanel.js +7 -14
  33. package/dist/client/settings/SettingsPanel.js.map +1 -1
  34. package/dist/coding-tools/run-code.d.ts +7 -0
  35. package/dist/coding-tools/run-code.d.ts.map +1 -1
  36. package/dist/coding-tools/run-code.js +21 -106
  37. package/dist/coding-tools/run-code.js.map +1 -1
  38. package/dist/coding-tools/sandbox/adapter.d.ts +79 -0
  39. package/dist/coding-tools/sandbox/adapter.d.ts.map +1 -0
  40. package/dist/coding-tools/sandbox/adapter.js +24 -0
  41. package/dist/coding-tools/sandbox/adapter.js.map +1 -0
  42. package/dist/coding-tools/sandbox/index.d.ts +51 -0
  43. package/dist/coding-tools/sandbox/index.d.ts.map +1 -0
  44. package/dist/coding-tools/sandbox/index.js +79 -0
  45. package/dist/coding-tools/sandbox/index.js.map +1 -0
  46. package/dist/coding-tools/sandbox/local-child-process-adapter.d.ts +24 -0
  47. package/dist/coding-tools/sandbox/local-child-process-adapter.d.ts.map +1 -0
  48. package/dist/coding-tools/sandbox/local-child-process-adapter.js +141 -0
  49. package/dist/coding-tools/sandbox/local-child-process-adapter.js.map +1 -0
  50. package/dist/server/agent-engine-api-key-route.d.ts +37 -0
  51. package/dist/server/agent-engine-api-key-route.d.ts.map +1 -0
  52. package/dist/server/agent-engine-api-key-route.js +105 -0
  53. package/dist/server/agent-engine-api-key-route.js.map +1 -0
  54. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  55. package/dist/server/core-routes-plugin.js +10 -6
  56. package/dist/server/core-routes-plugin.js.map +1 -1
  57. package/dist/server/create-server.js +1 -1
  58. package/dist/server/create-server.js.map +1 -1
  59. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -4
  60. package/docs/content/plan-plugin.md +5 -4
  61. package/docs/content/pr-visual-recap.md +1 -1
  62. package/docs/content/template-plan.md +1 -1
  63. package/package.json +1 -1
  64. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -4
@@ -19,9 +19,9 @@ const HELP = `npx @agent-native/core@latest skills
19
19
 
20
20
  Usage:
21
21
  npx @agent-native/core@latest skills list
22
- npx @agent-native/core@latest skills status [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|all] [--scope user|project] [--json]
23
- npx @agent-native/core@latest skills update [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|all] [--scope user|project] [--dry-run] [--json]
24
- npx @agent-native/core@latest skills add assets|design-exploration|visual-plan|visual-recap|context-xray [--client codex|claude-code|claude-code-cli|cowork|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
22
+ npx @agent-native/core@latest skills status [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
23
+ npx @agent-native/core@latest skills update [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
24
+ npx @agent-native/core@latest skills add assets|design-exploration|visual-plan|visual-recap|context-xray [--client codex|claude-code|claude-code-cli|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
25
25
  npx @agent-native/core@latest skills add <manifest-or-app-dir|skill-repo> [--skill <name>] [--client ...] [--yes]
26
26
 
27
27
  Examples:
@@ -44,11 +44,14 @@ Examples:
44
44
 
45
45
  The add command installs the SKILL.md instructions, registers the app-backed
46
46
  MCP connector, and then authenticates it in one step so you do not hit an OAuth
47
- wall on the first tool call. By default, add targets every supported local
48
- client this CLI can configure (Claude Code, Codex, and Cowork);
49
- pass --client to narrow it. Authentication reuses "npx @agent-native/core@latest connect":
50
- OAuth-capable clients (Claude Code) get a URL-only entry and a /mcp authenticate
51
- prompt, while Codex / Cowork run the browser device-code flow. In a
47
+ wall on the first tool call. Hosted installs can configure Claude Code, Codex,
48
+ Claude Cowork, Cursor, OpenCode, and GitHub Copilot / VS Code; local-files
49
+ instruction installs target the shared .agents skill path used by Codex, Pi,
50
+ Cursor, OpenCode, Copilot, and similar agents, plus Claude Code's native skill
51
+ path when selected. Pass --client to narrow it. Authentication reuses
52
+ "npx @agent-native/core@latest connect": OAuth-capable clients (Claude Code,
53
+ Cursor, OpenCode, GitHub Copilot / VS Code) get URL-only entries and authenticate
54
+ inside that host, while Codex / Cowork run the browser device-code flow. In a
52
55
  non-interactive shell or CI the auth step is skipped and the exact
53
56
  "npx @agent-native/core@latest connect <url> --client all" command is printed instead.
54
57
 
@@ -71,7 +74,7 @@ MDX folders, and local preview.
71
74
  When installing visual-recap interactively, the CLI offers to add the optional PR
72
75
  Visual Recap GitHub Action. Pass --with-github-action to write it directly, then
73
76
  run "npx @agent-native/core@latest recap setup" / "npx @agent-native/core@latest recap doctor" to configure and
74
- verify GitHub Actions.
77
+ verify GitHub Actions. Docs: https://www.agent-native.com/docs/pr-visual-recap.
75
78
 
76
79
  The status/update commands inspect copied Agent Native skill folders and refresh
77
80
  their instruction files from the current @agent-native/core package.`;
@@ -1334,8 +1337,8 @@ The local-files contract is:
1334
1337
  - Write the plan as a local MDX folder under \`plans/<slug>/\`: \`plan.mdx\`,
1335
1338
  optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
1336
1339
  \`.plan-state.json\`.
1337
- - Run \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan\` after
1338
- writing or updating the folder. Report the returned local URL or the
1340
+ - Run \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan --open\`
1341
+ after writing or updating the folder. Report the returned local URL or the
1339
1342
  \`/local-plans/<slug>\` route if the local Plan app is running with the same
1340
1343
  \`PLAN_LOCAL_DIR\`.
1341
1344
  - Do **not** call \`create-visual-plan\`, \`create-ui-plan\`,
@@ -1483,8 +1486,8 @@ In local-files mode:
1483
1486
  optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
1484
1487
  \`.plan-state.json\`. Set \`kind: "recap"\` and \`localOnly: true\` in
1485
1488
  frontmatter/state when authoring the source.
1486
- - Run \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind recap\` after
1487
- writing or updating the folder. Report the returned local URL or the
1489
+ - Run \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind recap --open\`
1490
+ after writing or updating the folder. Report the returned local URL or the
1488
1491
  \`/local-plans/<slug>\` route if the local Plan app is running with the same
1489
1492
  \`PLAN_LOCAL_DIR\`.
1490
1493
  - Do **not** call \`create-visual-recap\`, \`create-visual-plan\`,
@@ -2111,7 +2114,7 @@ export const BUILT_IN_APP_SKILLS = {
2111
2114
  mcp: { serverName: "plan", aliases: ["agent-native-plans"] },
2112
2115
  auth: {
2113
2116
  mode: "oauth",
2114
- setup: "Install with the Agent-Native CLI to add the /visual-plan and /visual-recap skills plus the Plan MCP connector. Authenticate only for hosted/account-backed sharing.",
2117
+ setup: "The marketplace plugin uses hosted Agent-Native Plans by default. To choose local-files or self-hosted mode, install with the Agent-Native CLI. Authenticate only for hosted/account-backed sharing.",
2115
2118
  },
2116
2119
  surfaces: [
2117
2120
  {
@@ -2239,20 +2242,45 @@ const CLIENT_LABELS = {
2239
2242
  "claude-code-cli": "Claude Code CLI",
2240
2243
  codex: "Codex",
2241
2244
  cowork: "Claude Cowork",
2245
+ cursor: "Cursor",
2246
+ opencode: "OpenCode",
2247
+ "github-copilot": "GitHub Copilot / VS Code",
2242
2248
  };
2243
2249
  const CLIENT_HINTS = {
2244
2250
  "claude-code": ".mcp.json or ~/.claude.json",
2245
2251
  "claude-code-cli": ".mcp.json or ~/.claude.json",
2246
2252
  codex: "$CODEX_HOME/config.toml or ~/.codex/config.toml",
2247
2253
  cowork: "~/.cowork/mcp.json",
2254
+ cursor: ".cursor/mcp.json or ~/.cursor/mcp.json",
2255
+ opencode: "opencode.json or ~/.config/opencode/opencode.json",
2256
+ "github-copilot": ".vscode/mcp.json or VS Code user mcp.json",
2257
+ };
2258
+ const SKILLS_CLIENTS = [
2259
+ "claude-code",
2260
+ "codex",
2261
+ "cowork",
2262
+ "cursor",
2263
+ "opencode",
2264
+ "github-copilot",
2265
+ ];
2266
+ const SKILL_INSTRUCTION_CLIENTS = [
2267
+ "codex",
2268
+ "claude-code",
2269
+ "pi",
2270
+ ];
2271
+ const SKILL_INSTRUCTION_CLIENT_LABELS = {
2272
+ "claude-code": "Claude Code",
2273
+ "claude-code-cli": "Claude Code",
2274
+ codex: "Shared .agents skills",
2275
+ cowork: "MCP only",
2276
+ pi: "Pi",
2248
2277
  };
2249
- const SKILLS_CLIENTS = ["claude-code", "codex", "cowork"];
2250
- const SKILL_INSTRUCTION_CLIENTS = ["claude-code", "codex"];
2251
2278
  const SKILL_INSTRUCTION_CLIENT_HINTS = {
2252
- "claude-code": ".claude/skills or .claude/commands",
2253
- "claude-code-cli": ".claude/skills or .claude/commands",
2254
- codex: ".agents/skills or ~/.codex/skills",
2279
+ "claude-code": "Also write Claude Code's native .claude/skills and commands files.",
2280
+ "claude-code-cli": "Also write Claude Code's native .claude/skills and commands files.",
2281
+ codex: "Project scope writes .agents skills/commands for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents; user scope writes Codex's ~/.codex skills/commands.",
2255
2282
  cowork: "MCP only",
2283
+ pi: "Project scope writes .agents/skills plus .pi/prompts; user scope writes ~/.agents/skills plus ~/.pi/agent/prompts.",
2256
2284
  };
2257
2285
  function normalizeKnownSkillTarget(value) {
2258
2286
  const key = value?.trim().toLowerCase();
@@ -2322,7 +2350,7 @@ Default storage for this installation: local files. Create and update plans and
2322
2350
  recaps as MDX folders under \`plans/<slug>/\`. Before authoring structured MDX,
2323
2351
  run \`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read
2324
2352
  the no-auth block catalog; it sends no plan content. Then run
2325
- \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan|recap\`,
2353
+ \`npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan|recap --open\`,
2326
2354
  and report the local preview URL or path. No sharing, all local. Use a hosted
2327
2355
  or self-hosted Plan MCP connector only if the user explicitly asks to publish or
2328
2356
  share.`;
@@ -2420,17 +2448,68 @@ function writeSkillFolder(dir, bundle, installedAt = new Date().toISOString()) {
2420
2448
  function builtInSkillsRootForAgent(agent, scope, baseDir) {
2421
2449
  const home = homeDir() ?? baseDir;
2422
2450
  if (scope === "project") {
2423
- return agent === "codex"
2424
- ? path.join(baseDir, ".agents", "skills")
2425
- : path.join(baseDir, ".claude", "skills");
2451
+ if (agent === "codex")
2452
+ return path.join(baseDir, ".agents", "skills");
2453
+ if (agent === "pi")
2454
+ return path.join(baseDir, ".agents", "skills");
2455
+ return path.join(baseDir, ".claude", "skills");
2426
2456
  }
2427
2457
  if (agent === "codex") {
2428
2458
  return process.env.CODEX_HOME
2429
2459
  ? path.join(process.env.CODEX_HOME, "skills")
2430
2460
  : path.join(home, ".codex", "skills");
2431
2461
  }
2462
+ if (agent === "pi") {
2463
+ return path.join(home, ".agents", "skills");
2464
+ }
2432
2465
  return path.join(home, ".claude", "skills");
2433
2466
  }
2467
+ function builtInCommandsRootForAgent(agent, scope, baseDir) {
2468
+ const home = homeDir() ?? baseDir;
2469
+ if (scope === "project") {
2470
+ if (agent === "codex")
2471
+ return path.join(baseDir, ".agents", "commands");
2472
+ if (agent === "pi")
2473
+ return path.join(baseDir, ".pi", "prompts");
2474
+ return path.join(baseDir, ".claude", "commands");
2475
+ }
2476
+ if (agent === "codex") {
2477
+ return process.env.CODEX_HOME
2478
+ ? path.join(process.env.CODEX_HOME, "commands")
2479
+ : path.join(home, ".codex", "commands");
2480
+ }
2481
+ if (agent === "pi") {
2482
+ const piHome = process.env.PI_CODING_AGENT_DIR || path.join(home, ".pi", "agent");
2483
+ return path.join(piHome, "prompts");
2484
+ }
2485
+ return path.join(home, ".claude", "commands");
2486
+ }
2487
+ function slashCommandForBuiltInSkill(skillName) {
2488
+ if (skillName === "visual-plan") {
2489
+ return `---
2490
+ description: Create an interactive Agent-Native visual plan for the current task.
2491
+ argument-hint: [optional request or scope]
2492
+ ---
2493
+
2494
+ Use the visual-plan skill for this task. Treat any arguments as the user's
2495
+ requested plan scope or focus:
2496
+
2497
+ $ARGUMENTS
2498
+ `;
2499
+ }
2500
+ if (skillName === "visual-recap") {
2501
+ return `---
2502
+ description: Create an interactive Agent-Native visual recap for a PR, branch, commit, or diff.
2503
+ argument-hint: [PR, branch, commit, diff, or scope]
2504
+ ---
2505
+
2506
+ Use the visual-recap skill. Treat any arguments as the recap target or focus:
2507
+
2508
+ $ARGUMENTS
2509
+ `;
2510
+ }
2511
+ return null;
2512
+ }
2434
2513
  /**
2435
2514
  * Write a built-in skill's instruction folders straight into each client's
2436
2515
  * skills directory. Built-in skills ship their SKILL.md inside this package, so
@@ -2445,11 +2524,21 @@ function installBuiltInInstructions(input) {
2445
2524
  const written = [];
2446
2525
  for (const agent of input.skillsAgents) {
2447
2526
  const root = builtInSkillsRootForAgent(agent, input.scope, input.baseDir);
2527
+ const commandsRoot = builtInCommandsRootForAgent(agent, input.scope, input.baseDir);
2448
2528
  for (const bundle of bundles) {
2449
2529
  const dir = path.join(root, bundle.skillName);
2450
2530
  if (!input.dryRun)
2451
2531
  writeSkillFolder(dir, bundle);
2452
2532
  written.push(dir);
2533
+ const command = slashCommandForBuiltInSkill(bundle.skillName);
2534
+ if (command) {
2535
+ const commandPath = path.join(commandsRoot, `${bundle.skillName}.md`);
2536
+ if (!input.dryRun) {
2537
+ fs.mkdirSync(path.dirname(commandPath), { recursive: true });
2538
+ fs.writeFileSync(commandPath, command, "utf-8");
2539
+ }
2540
+ written.push(commandPath);
2541
+ }
2453
2542
  }
2454
2543
  }
2455
2544
  return written;
@@ -2508,6 +2597,10 @@ function skillSearchRoots(input) {
2508
2597
  if (hasClient("claude-code") || hasClient("claude-code-cli")) {
2509
2598
  add(path.join(input.baseDir, ".claude", "skills"), "project", "claude-code");
2510
2599
  }
2600
+ if (hasClient("pi")) {
2601
+ add(path.join(input.baseDir, ".agents", "skills"), "project", "pi");
2602
+ add(path.join(input.baseDir, ".pi", "skills"), "project", "pi");
2603
+ }
2511
2604
  if (includeAll)
2512
2605
  add(path.join(input.baseDir, "skills"), "project", "repo");
2513
2606
  }
@@ -2522,6 +2615,12 @@ function skillSearchRoots(input) {
2522
2615
  if (hasClient("claude-code") || hasClient("claude-code-cli")) {
2523
2616
  add(home ? path.join(home, ".claude", "skills") : undefined, "user", "claude-code");
2524
2617
  }
2618
+ if (hasClient("pi")) {
2619
+ const piHome = process.env.PI_CODING_AGENT_DIR ||
2620
+ (home ? path.join(home, ".pi", "agent") : undefined);
2621
+ add(home ? path.join(home, ".agents", "skills") : undefined, "user", "pi");
2622
+ add(piHome ? path.join(piHome, "skills") : undefined, "user", "pi");
2623
+ }
2525
2624
  }
2526
2625
  const seen = new Set();
2527
2626
  return roots.filter((entry) => {
@@ -2551,7 +2650,7 @@ function scopeFilterForStatus(parsed) {
2551
2650
  : ["project", "user"];
2552
2651
  }
2553
2652
  function clientFilterForStatus(parsed) {
2554
- return parsed.clientExplicit ? resolveClients(parsed.client) : [];
2653
+ return parsed.clientExplicit ? resolveSkillsClientArg(parsed.client) : [];
2555
2654
  }
2556
2655
  function collectSkillInstallStates(parsed, options) {
2557
2656
  const appSkillIds = targetIdsForStatus(parsed);
@@ -2640,11 +2739,28 @@ function normalizeClientIds(values) {
2640
2739
  }
2641
2740
  return out;
2642
2741
  }
2643
- function normalizeSkillsClientIds(values) {
2742
+ function isMcpClientId(value) {
2743
+ return CLIENTS.includes(value);
2744
+ }
2745
+ function normalizeSkillInstructionClientIds(values) {
2746
+ if (!Array.isArray(values))
2747
+ return [];
2644
2748
  const seen = new Set();
2645
2749
  const out = [];
2646
- for (const client of normalizeClientIds(values)) {
2647
- const normalized = client === "claude-code-cli" ? "claude-code" : client;
2750
+ for (const value of values) {
2751
+ if (typeof value !== "string")
2752
+ continue;
2753
+ const id = value.toLowerCase();
2754
+ let normalized = null;
2755
+ if (id === "pi") {
2756
+ normalized = "pi";
2757
+ }
2758
+ else if (CLIENTS.includes(id)) {
2759
+ const client = id;
2760
+ normalized = client === "claude-code-cli" ? "claude-code" : client;
2761
+ }
2762
+ if (!normalized)
2763
+ continue;
2648
2764
  if (seen.has(normalized))
2649
2765
  continue;
2650
2766
  seen.add(normalized);
@@ -2652,22 +2768,37 @@ function normalizeSkillsClientIds(values) {
2652
2768
  }
2653
2769
  return out;
2654
2770
  }
2655
- function resolveSkillsClientArg(client) {
2656
- return normalizeSkillsClientIds(resolveClients(client));
2771
+ function resolveSkillsClientArg(client, installsMcp = false) {
2772
+ if (installsMcp)
2773
+ return normalizeSkillInstructionClientIds(resolveClients(client));
2774
+ const values = client.split(",").flatMap((raw) => {
2775
+ const id = raw.trim().toLowerCase();
2776
+ if (!id)
2777
+ return [];
2778
+ if (id === "all")
2779
+ return SKILL_INSTRUCTION_CLIENTS;
2780
+ if (id === "pi")
2781
+ return ["pi"];
2782
+ return resolveClients(id);
2783
+ });
2784
+ return normalizeSkillInstructionClientIds(values);
2657
2785
  }
2658
2786
  function skillsClients(installsMcp) {
2659
2787
  return installsMcp ? SKILLS_CLIENTS : SKILL_INSTRUCTION_CLIENTS;
2660
2788
  }
2661
2789
  function filterSkillsClients(clients, installsMcp) {
2662
- if (installsMcp)
2663
- return clients;
2790
+ if (installsMcp) {
2791
+ return clients.filter((client) => isMcpClientId(client) && SKILLS_CLIENTS.includes(client));
2792
+ }
2664
2793
  return clients.filter((client) => SKILL_INSTRUCTION_CLIENTS.includes(client));
2665
2794
  }
2666
2795
  function clientPromptOptions(installsMcp) {
2667
2796
  return skillsClients(installsMcp).map((client) => ({
2668
2797
  value: client,
2669
- label: CLIENT_LABELS[client],
2670
- hint: installsMcp
2798
+ label: installsMcp && isMcpClientId(client)
2799
+ ? CLIENT_LABELS[client]
2800
+ : SKILL_INSTRUCTION_CLIENT_LABELS[client],
2801
+ hint: installsMcp && isMcpClientId(client)
2671
2802
  ? CLIENT_HINTS[client]
2672
2803
  : SKILL_INSTRUCTION_CLIENT_HINTS[client],
2673
2804
  }));
@@ -2702,6 +2833,13 @@ const BUILT_IN_SKILL_PROMPT_OPTIONS = [
2702
2833
  },
2703
2834
  ];
2704
2835
  const DEFAULT_SKILL_PROMPT_TARGETS = ["visual-plan", "visual-recap"];
2836
+ function hiddenBuiltInSkillTargets(options) {
2837
+ return new Set((options.hiddenBuiltInSkillTargets ?? []).map((target) => target.trim().toLowerCase()));
2838
+ }
2839
+ function builtInSkillPromptOptions(options) {
2840
+ const hidden = hiddenBuiltInSkillTargets(options);
2841
+ return BUILT_IN_SKILL_PROMPT_OPTIONS.filter((entry) => !hidden.has(entry.value));
2842
+ }
2705
2843
  function publicSkillEntries(options) {
2706
2844
  if (options.catalogMode !== "all")
2707
2845
  return [];
@@ -2732,7 +2870,7 @@ function publicSkillPromptOptions(options) {
2732
2870
  }
2733
2871
  function skillPromptOptions(options = {}) {
2734
2872
  return [
2735
- ...BUILT_IN_SKILL_PROMPT_OPTIONS,
2873
+ ...builtInSkillPromptOptions(options),
2736
2874
  ...publicSkillPromptOptions(options),
2737
2875
  ];
2738
2876
  }
@@ -2760,6 +2898,7 @@ function prVisualRecapWorkflowPath(baseDir) {
2760
2898
  function prVisualRecapWorkflowDisplayPath() {
2761
2899
  return path.join(".github", "workflows", "pr-visual-recap.yml");
2762
2900
  }
2901
+ const PR_VISUAL_RECAP_DOCS_URL = "https://www.agent-native.com/docs/pr-visual-recap";
2763
2902
  function prVisualRecapInstallCommand() {
2764
2903
  return "npx @agent-native/core@latest skills add visual-recap --with-github-action";
2765
2904
  }
@@ -2773,6 +2912,7 @@ async function promptForGithubAction(context) {
2773
2912
  " Posts a human-friendly recap on every pull request — a high-altitude\n" +
2774
2913
  " overview of what the PR does, with annotated code, diagrams, and\n" +
2775
2914
  " before/after notes instead of a raw diff.\n" +
2915
+ ` Learn more: ${PR_VISUAL_RECAP_DOCS_URL}\n` +
2776
2916
  ` Writes ${context.workflowPath}; ${context.setupCommand} finishes the GitHub secrets.`,
2777
2917
  initialValue: false,
2778
2918
  });
@@ -2796,9 +2936,9 @@ function shouldPrompt(parsed, options) {
2796
2936
  async function promptForClients(context) {
2797
2937
  const clack = await import("@clack/prompts");
2798
2938
  const message = context.installsMcp
2799
- ? "Install the MCP connector and skills for which local agents?\n" +
2939
+ ? "Install the MCP connector for which clients?\n" +
2800
2940
  " (space toggles, enter confirms; saved for next time)"
2801
- : "Install skill instructions for which local agents?\n" +
2941
+ : "Where should the skill instructions be written?\n" +
2802
2942
  " (space toggles, enter confirms; saved for next time)";
2803
2943
  const result = await clack.multiselect({
2804
2944
  message,
@@ -2810,7 +2950,7 @@ async function promptForClients(context) {
2810
2950
  clack.cancel("Cancelled.");
2811
2951
  return null;
2812
2952
  }
2813
- return normalizeClientIds(result);
2953
+ return normalizeSkillInstructionClientIds(result);
2814
2954
  }
2815
2955
  async function promptForScope(context) {
2816
2956
  const clack = await import("@clack/prompts");
@@ -2843,7 +2983,7 @@ async function promptForPlanMode(context) {
2843
2983
  options: [
2844
2984
  {
2845
2985
  value: "hosted",
2846
- label: "Hosted Plans, shareable links",
2986
+ label: "Hosted Plans, shareable links (recommended)",
2847
2987
  hint: "100% free and open source. Stores plans at plan.agent-native.com with sharing, comments, and browser editor. Requires one-time browser sign-in.",
2848
2988
  },
2849
2989
  {
@@ -2917,15 +3057,17 @@ async function promptForSkills(context) {
2917
3057
  }
2918
3058
  async function resolveSkillsClients(parsed, options, installsMcp) {
2919
3059
  if (parsed.clientExplicit || !shouldPrompt(parsed, options)) {
2920
- const clients = filterSkillsClients(resolveSkillsClientArg(parsed.client), installsMcp);
3060
+ const clients = filterSkillsClients(resolveSkillsClientArg(parsed.client, installsMcp), installsMcp);
2921
3061
  if (clients.length === 0) {
2922
- throw new Error("Local-file skill instructions only support Codex or Claude Code clients.");
3062
+ throw new Error(installsMcp
3063
+ ? "MCP setup supports Claude Code, Codex, Claude Cowork, Cursor, OpenCode, or GitHub Copilot / VS Code clients. Use --mode local-files or --no-mcp for Pi."
3064
+ : "Skill instructions use shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files.");
2923
3065
  }
2924
3066
  return clients;
2925
3067
  }
2926
3068
  const initialClients = skillsClients(installsMcp);
2927
3069
  const prompt = options.promptClients ?? promptForClients;
2928
- const selected = normalizeSkillsClientIds(await prompt({
3070
+ const selected = normalizeSkillInstructionClientIds(await prompt({
2929
3071
  initialClients,
2930
3072
  options: clientPromptOptions(installsMcp),
2931
3073
  installsMcp,
@@ -2934,7 +3076,7 @@ async function resolveSkillsClients(parsed, options, installsMcp) {
2934
3076
  return null;
2935
3077
  if (!parsed.dryRun) {
2936
3078
  try {
2937
- writeConnectClientPreferences(selected);
3079
+ writeConnectClientPreferences(selected.filter(isMcpClientId));
2938
3080
  }
2939
3081
  catch { }
2940
3082
  }
@@ -3225,6 +3367,8 @@ function skillsAgentsForClients(clients) {
3225
3367
  if (client === "claude-code" || client === "claude-code-cli") {
3226
3368
  agents.add("claude-code");
3227
3369
  }
3370
+ if (client === "pi")
3371
+ agents.add("pi");
3228
3372
  }
3229
3373
  return [...agents];
3230
3374
  }
@@ -3237,7 +3381,7 @@ function commandString(cmd, args) {
3237
3381
  return [cmd, ...args].map(shellArg).join(" ");
3238
3382
  }
3239
3383
  function clientArgForClients(clients) {
3240
- if (clients.length === CLIENTS.length)
3384
+ if (clients.length === CLIENTS.length && clients.every(isMcpClientId))
3241
3385
  return "all";
3242
3386
  if (clients.length === 1)
3243
3387
  return clients[0];
@@ -3272,7 +3416,8 @@ function preserveMcpUrlAppPathOverride(target, input) {
3272
3416
  };
3273
3417
  }
3274
3418
  function dryRunInstallCommand(parsed, target) {
3275
- const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client);
3419
+ const clients = parsed.clients ??
3420
+ resolveSkillsClientArg(parsed.client, targetInstallsMcp(target, parsed));
3276
3421
  const args = [
3277
3422
  "@agent-native/core@latest",
3278
3423
  "skills",
@@ -3410,6 +3555,7 @@ function agentNativeSkillsInstallArgs(parsed, target, clients, baseDir) {
3410
3555
  "--yes",
3411
3556
  "@agent-native/skills@latest",
3412
3557
  "add",
3558
+ "--quiet",
3413
3559
  "--copy",
3414
3560
  target,
3415
3561
  "--client",
@@ -3457,12 +3603,12 @@ async function addPlainSkillRepo(parsed, options) {
3457
3603
  const skillsAgents = skillsAgentsForClients(clients);
3458
3604
  const selectedSkillNames = parsed.plainSkillNames ?? [];
3459
3605
  if (skillsAgents.length === 0) {
3460
- throw new Error("Plain skill repositories can only install instructions for Codex or Claude Code clients.");
3606
+ throw new Error("Plain skill repositories install through shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files.");
3461
3607
  }
3462
3608
  const args = agentNativeSkillsInstallArgs(parsed, target, clients, options.baseDir);
3463
3609
  if (!parsed.dryRun) {
3464
3610
  const code = await (options.runCommand ?? runCommand)("npx", args, {
3465
- stdio: parsed.yes ? "silent" : "inherit",
3611
+ stdio: "silent",
3466
3612
  });
3467
3613
  if (code !== 0)
3468
3614
  throw new Error(`npx @agent-native/skills@latest add exited with ${code}.`);
@@ -3622,7 +3768,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3622
3768
  if (!parsed.instructions && parsed.mcp) {
3623
3769
  throw new Error("Context X-Ray does not need MCP config yet. Run without --mcp-only.");
3624
3770
  }
3625
- const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client);
3771
+ const clients = (parsed.clients ?? resolveSkillsClientArg(parsed.client)).filter(isMcpClientId);
3626
3772
  const skillsAgents = skillsAgentsForClients(clients);
3627
3773
  if (parsed.dryRun) {
3628
3774
  const githubActionPath = parsed.withGithubAction && knownTarget === "visual-plans"
@@ -3677,7 +3823,11 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3677
3823
  if (parsed.mcpUrl) {
3678
3824
  installTarget = withMcpUrlOverride(installTarget, parsed.mcpUrl);
3679
3825
  }
3680
- const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client);
3826
+ const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client, shouldRegisterMcp);
3827
+ const mcpClients = clients.filter(isMcpClientId);
3828
+ if (shouldRegisterMcp && mcpClients.length === 0) {
3829
+ throw new Error("MCP setup supports Claude Code, Codex, Claude Cowork, Cursor, OpenCode, or GitHub Copilot / VS Code clients. Use --mode local-files or --no-mcp for Pi.");
3830
+ }
3681
3831
  installTarget = preserveMcpUrlAppPathOverride(installTarget, parsed.mcpUrl);
3682
3832
  const skillsAgents = skillsAgentsForClients(clients);
3683
3833
  if (parsed.dryRun) {
@@ -3702,7 +3852,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3702
3852
  mcpUrl: knownTarget === "visual-plans" && planMode === "local-files"
3703
3853
  ? ""
3704
3854
  : installTarget.loaded.manifest.hosted.mcpUrl,
3705
- mcpClients: shouldRegisterMcp ? clients : [],
3855
+ mcpClients: shouldRegisterMcp ? mcpClients : [],
3706
3856
  dryRun: true,
3707
3857
  commands: [dryRunInstallCommand(parsed, target)],
3708
3858
  githubActionPath,
@@ -3720,12 +3870,12 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3720
3870
  let instructionsWritten;
3721
3871
  let connected = false;
3722
3872
  let connectCommand;
3723
- let registeredMcpClients = shouldRegisterMcp ? clients : [];
3873
+ let registeredMcpClients = shouldRegisterMcp ? mcpClients : [];
3724
3874
  try {
3725
3875
  if (parsed.instructions) {
3726
3876
  if (skillsAgents.length === 0) {
3727
3877
  if (!shouldRegisterMcp) {
3728
- throw new Error("Skill instructions can only be installed for Codex or Claude Code clients. Use an MCP-capable client or omit --instructions-only.");
3878
+ throw new Error("Skill instructions use shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files. Use an MCP-capable client or omit --instructions-only.");
3729
3879
  }
3730
3880
  }
3731
3881
  else if (knownTarget) {
@@ -3755,6 +3905,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3755
3905
  "--yes",
3756
3906
  "@agent-native/skills@latest",
3757
3907
  "add",
3908
+ "--quiet",
3758
3909
  instructionSource,
3759
3910
  "--copy",
3760
3911
  ...installTarget.skillNames.flatMap((skill) => ["--skill", skill]),
@@ -3784,7 +3935,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3784
3935
  commands.push(`npx @agent-native/core@latest app-skill ensure --manifest ${installTarget.loaded.file} --client ${parsed.client} --scope ${parsed.scope} --yes`);
3785
3936
  if (!parsed.dryRun) {
3786
3937
  const ensureResult = await ensureAppSkill(installTarget.loaded, {
3787
- clients,
3938
+ clients: mcpClients,
3788
3939
  scope: parsed.scope,
3789
3940
  baseDir: options.baseDir,
3790
3941
  yes: parsed.yes || Boolean(knownTarget),
@@ -3800,16 +3951,16 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3800
3951
  // does not hit an OAuth wall on the first tool call. `--no-connect`
3801
3952
  // opts out; non-interactive shells get the exact command to run.
3802
3953
  if (parsed.connect) {
3803
- const result = await connectAfterEnsure(installTarget, clients, parsed, options);
3954
+ const result = await connectAfterEnsure(installTarget, mcpClients, parsed, options);
3804
3955
  connected = result.connected;
3805
3956
  connectCommand = result.connectCommand || undefined;
3806
3957
  if (connected)
3807
- registeredMcpClients = clients;
3958
+ registeredMcpClients = mcpClients;
3808
3959
  if (connectCommand)
3809
3960
  commands.push(connectCommand);
3810
3961
  }
3811
3962
  else {
3812
- const pendingClients = clients.filter((client) => !registeredMcpClients.includes(client));
3963
+ const pendingClients = mcpClients.filter((client) => !registeredMcpClients.includes(client));
3813
3964
  if (pendingClients.length > 0) {
3814
3965
  connectCommand = connectCommandFor(installTarget.loaded.manifest.hosted.url, pendingClients, parsed.scope);
3815
3966
  commands.push(connectCommand);
@@ -3835,6 +3986,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3835
3986
  const choice = await prompt({
3836
3987
  workflowPath: prVisualRecapWorkflowDisplayPath(),
3837
3988
  setupCommand: prVisualRecapSetupCommand(),
3989
+ docsUrl: PR_VISUAL_RECAP_DOCS_URL,
3838
3990
  });
3839
3991
  if (choice === null) {
3840
3992
  options.telemetry?.track("skills_cli cancelled", {
@@ -3892,8 +4044,11 @@ export async function addAgentNativeSkill(parsed, options = {}) {
3892
4044
  }
3893
4045
  }
3894
4046
  function listSkills(options = {}) {
4047
+ const hidden = hiddenBuiltInSkillTargets(options);
3895
4048
  return [
3896
- ...Object.values(BUILT_IN_APP_SKILLS).map((entry) => ({
4049
+ ...Object.values(BUILT_IN_APP_SKILLS)
4050
+ .filter((entry) => !hidden.has(entry.skillName))
4051
+ .map((entry) => ({
3897
4052
  id: entry.manifest.id,
3898
4053
  aliases: BUILT_IN_APP_SKILL_DISPLAY_ALIASES[entry.manifest.id] ?? [],
3899
4054
  name: entry.manifest.displayName,
@@ -3946,6 +4101,15 @@ function planModeSummary(mode) {
3946
4101
  return "Self-hosted/custom Plan app";
3947
4102
  return "Hosted Plans - shareable links and comments";
3948
4103
  }
4104
+ function skillInstructionAgentLabel(agent) {
4105
+ if (agent === "codex")
4106
+ return SKILL_INSTRUCTION_CLIENT_LABELS.codex;
4107
+ if (agent === "claude-code")
4108
+ return SKILL_INSTRUCTION_CLIENT_LABELS["claude-code"];
4109
+ if (agent === "pi")
4110
+ return SKILL_INSTRUCTION_CLIENT_LABELS.pi;
4111
+ return agent;
4112
+ }
3949
4113
  function targetInstallsMcp(target, parsed) {
3950
4114
  if (!parsed.mcp)
3951
4115
  return false;
@@ -4223,6 +4387,7 @@ export async function runSkills(argv, options = {}) {
4223
4387
  const choice = await prompt({
4224
4388
  workflowPath: prVisualRecapWorkflowDisplayPath(),
4225
4389
  setupCommand: prVisualRecapSetupCommand(),
4390
+ docsUrl: PR_VISUAL_RECAP_DOCS_URL,
4226
4391
  });
4227
4392
  if (choice === null) {
4228
4393
  telemetry.track("skills_cli cancelled", { step: "github-action" });
@@ -4278,7 +4443,7 @@ export async function runSkills(argv, options = {}) {
4278
4443
  ];
4279
4444
  const localCommands = [
4280
4445
  ...new Set(results
4281
- .filter((result) => result.local)
4446
+ .filter((result) => result.local && result.scriptPath)
4282
4447
  .flatMap((result) => result.commands)),
4283
4448
  ];
4284
4449
  const planModes = [
@@ -4316,10 +4481,10 @@ export async function runSkills(argv, options = {}) {
4316
4481
  const clack = await import("@clack/prompts");
4317
4482
  const summary = [
4318
4483
  skillsAgents.length
4319
- ? `Skill instructions ${skillsAgents.join(", ")}`
4484
+ ? `Skill instructions ${skillsAgents.map(skillInstructionAgentLabel).join(", ")}`
4320
4485
  : "Skill instructions skipped",
4321
4486
  mcpClients.length
4322
- ? `MCP config ${mcpClients.join(", ")}`
4487
+ ? `MCP config ${mcpClients.map((client) => CLIENT_LABELS[client]).join(", ")}`
4323
4488
  : "MCP config not required",
4324
4489
  mcpUrls.length ? `MCP URL ${mcpUrls.join(", ")}` : "",
4325
4490
  planModes.length