@@ -6,6 +6,7 @@ import { Identifier } from "../id/id"
66import PROMPT_INITIALIZE from "./template/initialize.txt"
77import PROMPT_REVIEW from "./template/review.txt"
88import { MCP } from "../mcp"
9+ import { Skill } from "../skill"
910
1011export namespace Command {
1112 export const Event = {
@@ -27,6 +28,7 @@ export namespace Command {
2728 agent : z . string ( ) . optional ( ) ,
2829 model : z . string ( ) . optional ( ) ,
2930 mcp : z . boolean ( ) . optional ( ) ,
31+ skill : z . boolean ( ) . optional ( ) ,
3032 // workaround for zod not supporting async functions natively so we use getters
3133 // https://zod.dev/v4/changelog?id=zfunction
3234 template : z . promise ( z . string ( ) ) . or ( z . string ( ) ) ,
@@ -118,6 +120,21 @@ export namespace Command {
118120 }
119121 }
120122
123+ // Add skills as invokable commands
124+ for ( const skill of await Skill . all ( ) ) {
125+ // Skip if a command with this name already exists
126+ if ( result [ skill . name ] ) continue
127+ result [ skill . name ] = {
128+ name : skill . name ,
129+ description : skill . description ,
130+ skill : true ,
131+ get template ( ) {
132+ return Skill . content ( skill . name ) . then ( ( content ) => content ?? "" )
133+ } ,
134+ hints : [ ] ,
135+ }
136+ }
137+
121138 return result
122139 } )
123140
0 commit comments