@@ -5,7 +5,8 @@ import { defineCommand, getConfigDir } from "bailian-cli-core";
55import { CLI_VERSION } from "../version.ts" ;
66import { NPM_PACKAGE , fetchLatestVersion } from "../utils/update-checker.ts" ;
77
8- const SKILL_NAME = "bailian-cli" ;
8+ const SKILL_SOURCE = "modelstudioai/cli" ;
9+ const SKILL_INSTALL_CMD = `npx skills add ${ SKILL_SOURCE } --all -g -y` ;
910
1011/** Build the install command */
1112function detectInstallCommand ( ) : { cmd : string ; label : string } {
@@ -16,11 +17,13 @@ function updateAgentSkill(colors: { green: string; yellow: string; reset: string
1617 const { green, yellow, reset } = colors ;
1718 process . stderr . write ( "\nUpdating agent skill...\n" ) ;
1819 try {
19- execSync ( `npx skills update ${ SKILL_NAME } -g -y` , { stdio : "inherit" } ) ;
20+ // Reinstall (not `skills update`) into ~/.agents/skills/ and sync to all agent apps.
21+ // `--all` on `skills add` means --skill '*' --agent '*' -y (Cursor, Claude Code, etc.).
22+ execSync ( SKILL_INSTALL_CMD , { stdio : "inherit" } ) ;
2023 process . stderr . write ( `${ green } \u2713 Agent skill updated.${ reset } \n` ) ;
2124 } catch {
2225 process . stderr . write (
23- `${ yellow } Agent skill update skipped. Run manually: npx skills update ${ SKILL_NAME } -g -y ${ reset } \n` ,
26+ `${ yellow } Agent skill update skipped. Run manually: ${ SKILL_INSTALL_CMD } ${ reset } \n` ,
2427 ) ;
2528 }
2629}
@@ -45,6 +48,7 @@ export default defineCommand({
4548
4649 if ( latest && latest === CLI_VERSION ) {
4750 process . stderr . write ( `${ green } \u2713 Already up to date (${ CLI_VERSION } ).${ reset } \n` ) ;
51+ updateAgentSkill ( { green, yellow, reset } ) ;
4852 return ;
4953 }
5054
0 commit comments