From f44c71e9c9b95806efd5268891d218c13a7dbafd Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 19:32:15 +0000 Subject: [PATCH] fix(skills): always prompt for plugin in sync, fix default target path, add setup hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - marketplace sync now only skips early when `plugin === 'all'` and nothing changed; previously, running sync with no plugin specified would silently exit when the marketplace was already up to date, preventing the interactive selection prompt - add --agent flag to sync (default: claude-code) so the target directory is derived from AGENT_PATHS consistently with install/list; fixes the default landing in ~/.agents/skills which no supported agent reads from — skills now default to ~/.claude/skills (claude-code user scope) - keep --claude as backward-compat shorthand for --agent claude-code - add post-setup warn hint to run sync after marketplace setup Closes #219 Co-authored-by: Sunny Kolattukudy --- src/services/skills/commands.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/services/skills/commands.ts b/src/services/skills/commands.ts index ed5d5b8..c03ab01 100644 --- a/src/services/skills/commands.ts +++ b/src/services/skills/commands.ts @@ -271,6 +271,7 @@ export function registerSkillsCommands(program: Command): void { existing.marketplace = { repoUrl: url, localPath: resolvedPath, ...(opts.token ? { token: opts.token } : {}) }; writeGlobalConfig(existing, configPath); + warn('Marketplace ready. Run: pncli skills marketplace sync to install skills.'); success({ repoUrl: url, localPath: resolvedPath, branch: opts.branch ?? null, tokenConfigured: !!opts.token }, 'skills', 'marketplace-setup', start); } catch (err) { fail(err, 'skills', 'marketplace-setup', start); @@ -281,9 +282,10 @@ export function registerSkillsCommands(program: Command): void { .command('sync') .description('Pull latest marketplace content and install a plugin\'s skills') .argument('[plugin]', 'Plugin name to install, or "all" to install every plugin (skips interactive selection)') - .option('--claude', 'Install to ~/.claude/skills instead of ~/.agents/skills') + .option('--agent ', 'Target agent host: github-copilot | claude-code (default: claude-code)') + .option('--claude', 'Shorthand for --agent claude-code') .option('--force', 'Force reinstall even if the marketplace repo has no new changes') - .action(async (plugin: string | undefined, opts: { claude?: boolean; force?: boolean }) => { + .action(async (plugin: string | undefined, opts: { agent?: string; claude?: boolean; force?: boolean }) => { const start = Date.now(); try { const configPath = getGlobalConfigPath(); @@ -316,7 +318,7 @@ export function registerSkillsCommands(program: Command): void { } warn(marketplaceUpdated ? 'Marketplace updated.' : 'Marketplace already up to date — no changes to sync.'); - if (!marketplaceUpdated && !plugin && !opts.force) { + if (!marketplaceUpdated && plugin === 'all' && !opts.force) { success({ marketplace: marketplacePath, marketplaceUpdated: false, @@ -332,9 +334,12 @@ export function registerSkillsCommands(program: Command): void { throw new Error('No plugins found in marketplace. Check the marketplace repository structure.'); } - const targetDir = opts.claude - ? path.join(os.homedir(), '.claude', 'skills') - : path.join(os.homedir(), '.agents', 'skills'); + const agentName = opts.claude ? 'claude-code' : (opts.agent ?? 'claude-code'); + const agentConfig = AGENT_PATHS[agentName]; + if (!agentConfig) { + throw new Error(`Unknown agent: "${agentName}". Use: ${Object.keys(AGENT_PATHS).join(' | ')}`); + } + const targetDir = agentConfig.user; if (plugin === 'all') { const results: Record = {};