feat: add Skill Hub feature for managing community skills

- Implemented Skill Hub page with tabs for remote, local, and installed skills.
- Added localization support for Chinese in skill-hub.json.
- Created API routes for fetching remote skills, listing local skills, and managing installed skills.
- Developed functionality for installing and uninstalling skills from both remote and local sources.
- Introduced caching mechanism for remote skills and handling updates for installed skills.
This commit is contained in:
catlog22
2026-02-22 19:02:57 +08:00
parent 87634740a3
commit 367fb94718
23 changed files with 2952 additions and 171 deletions

View File

@@ -2,7 +2,7 @@ import { Command } from 'commander';
import { viewCommand } from './commands/view.js';
import { serveCommand } from './commands/serve.js';
import { stopCommand } from './commands/stop.js';
import { installCommand } from './commands/install.js';
import { installCommand, installSkillHubCommand } from './commands/install.js';
import { uninstallCommand } from './commands/uninstall.js';
import { upgradeCommand } from './commands/upgrade.js';
import { listCommand } from './commands/list.js';
@@ -115,7 +115,21 @@ export function run(argv: string[]): void {
.option('-m, --mode <mode>', 'Installation mode: Global or Path')
.option('-p, --path <path>', 'Installation path (for Path mode)')
.option('-f, --force', 'Force installation without prompts')
.action(installCommand);
.option('--skill-hub [skillId]', 'Install skill from skill-hub (use --list to see available)')
.option('--cli <type>', 'Target CLI for skill installation (claude or codex)', 'claude')
.option('--list', 'List available skills in skill-hub')
.action((options) => {
// If skill-hub option is used, route to skill hub command
if (options.skillHub !== undefined || options.list) {
return installSkillHubCommand({
skillId: typeof options.skillHub === 'string' ? options.skillHub : undefined,
cliType: options.cli,
list: options.list,
});
}
// Otherwise use normal install
return installCommand(options);
});
// Uninstall command
program