@@ -102,29 +102,73 @@ test('formats skills list as an aligned human table', () => {
102102 skill (
103103 'batch' ,
104104 'Research and plan a large-scale change, then execute it in parallel across 5–30 isolated worktree agents that each open a PR.' ,
105+ 'projectSettings' ,
106+ ) ,
107+ skill (
108+ 'debug' ,
109+ 'Enable debug logging for this session and help diagnose issues.' ,
110+ 'userSettings' ,
105111 ) ,
106- skill ( 'debug' , 'Enable debug logging for this session and help diagnose issues.' ) ,
107112 skill (
108113 'loop' ,
109114 'Run a prompt on a fixed interval or dynamically reschedule it, including bare maintenance-mode loops.' ,
115+ 'projectSettings' ,
110116 ) ,
111117 skill (
112118 'simplify' ,
113119 'Review changed code for reuse, quality, and efficiency, then fix any issues found.' ,
120+ 'projectSettings' ,
114121 ) ,
115122 skill (
116123 'update-config' ,
117124 'Use this skill to configure the Claude Code harness via settings.json. Automated behaviors require hooks.' ,
125+ 'projectSettings' ,
118126 ) ,
119127 ] ,
120128 80 ,
121129 )
122130
123131 assert . match ( output , / ^ S k i l l s : 5 e n a b l e d / )
124- assert . match ( output , / N a m e \s + S t a t u s \s + S o u r c e \s + D e s c r i p t i o n / )
132+ assert . match ( output , / N a m e \s + S t a t u s \s + D e s c r i p t i o n / )
133+ assert . doesNotMatch ( output , / \b S o u r c e \b / )
125134 assert . doesNotMatch ( output , / s o u r c e : b u n d l e d \| t r u s t : / )
126- assert . match ( output , / b a t c h \s + e n a b l e d \s + b u n d l e d \s + R e s e a r c h a n d p l a n / )
127- assert . match ( output , / u p d a t e - c o n f i g \s + e n a b l e d \s + b u n d l e d \s + C o n f i g u r e t h e C l a u d e C o d e h a r n e s s v i a / )
135+ assert . doesNotMatch ( output , / \b b u n d l e d \b / )
136+ assert . match ( output , / b a t c h \s + e n a b l e d \s + R e s e a r c h a n d p l a n / )
137+ assert . match ( output , / u p d a t e - c o n f i g \s + e n a b l e d \s + C o n f i g u r e t h e C l a u d e C o d e h a r n e s s v i a / )
138+ } )
139+
140+ test ( 'omits source column while preserving installed rows' , ( ) => {
141+ const output = formatSkillsListForDisplay (
142+ [
143+ skill ( 'docs-writer' , 'Writes project documentation.' , 'projectSettings' ) ,
144+ skill ( 'pr-review' , 'Reviews pull requests.' , 'userSettings' ) ,
145+ skill ( 'debug' , 'Enable debug logging.' , 'bundled' ) ,
146+ ] ,
147+ 100 ,
148+ )
149+
150+ assert . doesNotMatch ( output , / \b S o u r c e \b / )
151+ assert . doesNotMatch ( output , / d o c s - w r i t e r \s + e n a b l e d \s + p r o j e c t \s + / )
152+ assert . doesNotMatch ( output , / p r - r e v i e w \s + e n a b l e d \s + u s e r \s + / )
153+ assert . match ( output , / d o c s - w r i t e r \s + e n a b l e d \s + W r i t e s p r o j e c t d o c u m e n t a t i o n \. / )
154+ assert . match ( output , / p r - r e v i e w \s + e n a b l e d \s + R e v i e w s p u l l r e q u e s t s \. / )
155+ assert . doesNotMatch ( output , / \b d e b u g \b / )
156+ assert . doesNotMatch ( output , / E n a b l e d e b u g l o g g i n g / )
157+ } )
158+
159+ test ( 'omits bundled skills from the human table' , ( ) => {
160+ const output = formatSkillsListForDisplay (
161+ [
162+ skill ( 'debug' , 'Enable debug logging.' , 'bundled' ) ,
163+ skill ( 'docs-writer' , 'Writes project documentation.' , 'projectSettings' ) ,
164+ ] ,
165+ 100 ,
166+ )
167+
168+ assert . match ( output , / ^ S k i l l s : 1 e n a b l e d / )
169+ assert . doesNotMatch ( output , / \b d e b u g \b / )
170+ assert . doesNotMatch ( output , / E n a b l e d e b u g l o g g i n g / )
171+ assert . match ( output , / d o c s - w r i t e r \s + e n a b l e d \s + W r i t e s p r o j e c t d o c u m e n t a t i o n \. / )
128172} )
129173
130174test ( 'wraps description continuations under the Description column' , ( ) => {
@@ -133,16 +177,17 @@ test('wraps description continuations under the Description column', () => {
133177 skill (
134178 'batch' ,
135179 'Research and plan a large-scale change, then execute it in parallel across 5–30 isolated worktree agents that each open a PR.' ,
180+ 'projectSettings' ,
136181 ) ,
137182 ] ,
138- 70 ,
183+ 45 ,
139184 )
140185 const lines = output . split ( '\n' )
141186 const header = lines . find ( line => line . includes ( 'Description' ) )
142187 assert . ok ( header )
143188 const descriptionColumn = header . indexOf ( 'Description' )
144189 const continuation = lines . find ( line =>
145- line . trim ( ) . startsWith ( 'then execute ' ) ,
190+ line . trim ( ) . startsWith ( 'large-scale change ' ) ,
146191 )
147192 assert . ok ( continuation )
148193 assert . equal ( continuation . search ( / \S / ) , descriptionColumn )
@@ -155,6 +200,16 @@ test('formats empty skills list cleanly', () => {
155200 )
156201} )
157202
203+ test ( 'formats all-bundled skills as empty in the human table' , ( ) => {
204+ assert . equal (
205+ formatSkillsListForDisplay (
206+ [ skill ( 'debug' , 'Enable debug logging.' , 'bundled' ) ] ,
207+ 100 ,
208+ ) ,
209+ 'Skills: 0 enabled\n\nNo skills found.' ,
210+ )
211+ } )
212+
158213test ( 'formats skills list json as machine-readable metadata' , ( ) => {
159214 const description = 'Full description should remain in JSON. Extra sentence stays.'
160215 const parsed = JSON . parse (
0 commit comments