@@ -262,11 +262,12 @@ function printPluginSummary(
262262 contents : ReturnType < typeof readPluginContents > ,
263263 info : ( msg : string ) => void ,
264264) : void {
265- if ( contents . skills . length > 0 || contents . commands . length > 0 ) {
265+ if ( contents . skills . length > 0 || contents . commands . length > 0 || contents . agents . length > 0 ) {
266266 info ( '' ) ;
267267 info ( `${ pluginName } :` ) ;
268- if ( contents . skills . length > 0 ) {
269- info ( ` Skills (${ contents . skills . length } ): ${ contents . skills . join ( ', ' ) } ` ) ;
268+ // Alphabetical order: Agents, Commands, Hooks, MCP Servers, Skills
269+ if ( contents . agents . length > 0 ) {
270+ info ( ` Agents (${ contents . agents . length } ): ${ contents . agents . join ( ', ' ) } ` ) ;
270271 }
271272 if ( contents . commands . length > 0 ) {
272273 const maxShow = 5 ;
@@ -283,13 +284,17 @@ function printPluginSummary(
283284 if ( contents . mcpServers . length > 0 ) {
284285 info ( ` MCP Servers (${ contents . mcpServers . length } ): ${ contents . mcpServers . join ( ', ' ) } ` ) ;
285286 }
287+ if ( contents . skills . length > 0 ) {
288+ info ( ` Skills (${ contents . skills . length } ): ${ contents . skills . join ( ', ' ) } ` ) ;
289+ }
286290 }
287291}
288292
289293/**
290- * Read plugin contents (skills, commands, hooks, permissions, mcpServers)
294+ * Read plugin contents (skills, commands, hooks, agents, permissions, mcpServers)
291295 */
292296function readPluginContents ( marketplaceName : string , pluginName : string ) : {
297+ agents : string [ ] ;
293298 commands : string [ ] ;
294299 hooks : number ;
295300 mcpServers : string [ ] ;
@@ -307,6 +312,7 @@ function readPluginContents(marketplaceName: string, pluginName: string): {
307312 ) ;
308313
309314 const result = {
315+ agents : [ ] as string [ ] ,
310316 commands : [ ] as string [ ] ,
311317 hooks : 0 ,
312318 mcpServers : [ ] as string [ ] ,
@@ -326,6 +332,18 @@ function readPluginContents(marketplaceName: string, pluginName: string): {
326332 }
327333 }
328334
335+ // Read agents
336+ const agentsDir = join ( pluginDir , 'agents' ) ;
337+ if ( existsSync ( agentsDir ) ) {
338+ try {
339+ result . agents = readdirSync ( agentsDir , { withFileTypes : true } )
340+ . filter ( dirent => dirent . isFile ( ) && dirent . name . endsWith ( '.md' ) )
341+ . map ( dirent => dirent . name . replace ( / \. m d $ / , '' ) ) ;
342+ } catch {
343+ // Ignore
344+ }
345+ }
346+
329347 // Read commands
330348 const commandsDir = join ( pluginDir , 'commands' ) ;
331349 result . commands = findMarkdownFiles ( commandsDir ) ;
0 commit comments