@@ -304,6 +304,48 @@ describe("ClaudecodeSkill", () => {
304304 } ) ;
305305 } ) ;
306306
307+ it ( "should convert to RulesyncSkill with disable-model-invocation true" , ( ) => {
308+ const frontmatter : ClaudecodeSkillFrontmatter = {
309+ name : "no-invoke-skill" ,
310+ description : "Skill with disabled invocation" ,
311+ "disable-model-invocation" : true ,
312+ } ;
313+
314+ const skill = new ClaudecodeSkill ( {
315+ dirName : "no-invoke-skill" ,
316+ frontmatter,
317+ body : "No invoke body" ,
318+ } ) ;
319+
320+ const rulesyncSkill = skill . toRulesyncSkill ( ) ;
321+ const rulesyncFrontmatter = rulesyncSkill . getFrontmatter ( ) ;
322+
323+ expect ( rulesyncFrontmatter . claudecode ) . toEqual ( {
324+ "disable-model-invocation" : true ,
325+ } ) ;
326+ } ) ;
327+
328+ it ( "should convert to RulesyncSkill with disable-model-invocation false" , ( ) => {
329+ const frontmatter : ClaudecodeSkillFrontmatter = {
330+ name : "invoke-skill" ,
331+ description : "Skill with explicit false" ,
332+ "disable-model-invocation" : false ,
333+ } ;
334+
335+ const skill = new ClaudecodeSkill ( {
336+ dirName : "invoke-skill" ,
337+ frontmatter,
338+ body : "Invoke body" ,
339+ } ) ;
340+
341+ const rulesyncSkill = skill . toRulesyncSkill ( ) ;
342+ const rulesyncFrontmatter = rulesyncSkill . getFrontmatter ( ) ;
343+
344+ expect ( rulesyncFrontmatter . claudecode ) . toEqual ( {
345+ "disable-model-invocation" : false ,
346+ } ) ;
347+ } ) ;
348+
307349 it ( "should preserve other files during conversion" , ( ) => {
308350 const frontmatter : ClaudecodeSkillFrontmatter = {
309351 name : "test-skill" ,
@@ -409,6 +451,40 @@ describe("ClaudecodeSkill", () => {
409451 expect ( fm [ "allowed-tools" ] ) . toEqual ( [ "Bash" ] ) ;
410452 } ) ;
411453
454+ it ( "should convert from RulesyncSkill with disable-model-invocation" , ( ) => {
455+ const rulesyncFrontmatter : RulesyncSkillFrontmatterInput = {
456+ name : "no-invoke-skill" ,
457+ description : "Skill with disabled invocation" ,
458+ claudecode : { "disable-model-invocation" : true } ,
459+ } ;
460+
461+ const rulesyncSkill = new RulesyncSkill ( {
462+ dirName : "no-invoke-skill" ,
463+ frontmatter : rulesyncFrontmatter ,
464+ body : "No invoke body" ,
465+ } ) ;
466+
467+ const claudecodeSkill = ClaudecodeSkill . fromRulesyncSkill ( { rulesyncSkill } ) ;
468+ expect ( claudecodeSkill . getFrontmatter ( ) [ "disable-model-invocation" ] ) . toBe ( true ) ;
469+ } ) ;
470+
471+ it ( "should convert from RulesyncSkill with disable-model-invocation false" , ( ) => {
472+ const rulesyncFrontmatter : RulesyncSkillFrontmatterInput = {
473+ name : "invoke-skill" ,
474+ description : "Skill with explicit false" ,
475+ claudecode : { "disable-model-invocation" : false } ,
476+ } ;
477+
478+ const rulesyncSkill = new RulesyncSkill ( {
479+ dirName : "invoke-skill" ,
480+ frontmatter : rulesyncFrontmatter ,
481+ body : "Invoke body" ,
482+ } ) ;
483+
484+ const claudecodeSkill = ClaudecodeSkill . fromRulesyncSkill ( { rulesyncSkill } ) ;
485+ expect ( claudecodeSkill . getFrontmatter ( ) [ "disable-model-invocation" ] ) . toBe ( false ) ;
486+ } ) ;
487+
412488 it ( "should set correct relativeDirPath" , ( ) => {
413489 const rulesyncFrontmatter : RulesyncSkillFrontmatterInput = {
414490 name : "test-skill" ,
@@ -754,6 +830,33 @@ Global skill content.`;
754830 expect ( result . success ) . toBe ( true ) ;
755831 } ) ;
756832
833+ it ( "should validate frontmatter with disable-model-invocation true" , ( ) => {
834+ const result = ClaudecodeSkillFrontmatterSchema . safeParse ( {
835+ name : "test-skill" ,
836+ description : "Test" ,
837+ "disable-model-invocation" : true ,
838+ } ) ;
839+ expect ( result . success ) . toBe ( true ) ;
840+ } ) ;
841+
842+ it ( "should validate frontmatter with disable-model-invocation false" , ( ) => {
843+ const result = ClaudecodeSkillFrontmatterSchema . safeParse ( {
844+ name : "test-skill" ,
845+ description : "Test" ,
846+ "disable-model-invocation" : false ,
847+ } ) ;
848+ expect ( result . success ) . toBe ( true ) ;
849+ } ) ;
850+
851+ it ( "should reject non-boolean disable-model-invocation value" , ( ) => {
852+ const result = ClaudecodeSkillFrontmatterSchema . safeParse ( {
853+ name : "test-skill" ,
854+ description : "Test" ,
855+ "disable-model-invocation" : "yes" ,
856+ } ) ;
857+ expect ( result . success ) . toBe ( false ) ;
858+ } ) ;
859+
757860 it ( "should reject non-string model value" , ( ) => {
758861 const result = ClaudecodeSkillFrontmatterSchema . safeParse ( {
759862 name : "test-skill" ,
@@ -765,6 +868,44 @@ Global skill content.`;
765868 } ) ;
766869
767870 describe ( "round-trip conversion" , ( ) => {
871+ it ( "should preserve disable-model-invocation through round-trip" , ( ) => {
872+ const originalFrontmatter : ClaudecodeSkillFrontmatter = {
873+ name : "round-trip-skill" ,
874+ description : "Round trip test" ,
875+ "disable-model-invocation" : true ,
876+ } ;
877+
878+ const original = new ClaudecodeSkill ( {
879+ dirName : "round-trip-skill" ,
880+ frontmatter : originalFrontmatter ,
881+ body : "Round trip body" ,
882+ } ) ;
883+
884+ const rulesyncSkill = original . toRulesyncSkill ( ) ;
885+ const restored = ClaudecodeSkill . fromRulesyncSkill ( { rulesyncSkill } ) ;
886+
887+ expect ( restored . getFrontmatter ( ) [ "disable-model-invocation" ] ) . toBe ( true ) ;
888+ } ) ;
889+
890+ it ( "should preserve disable-model-invocation false through round-trip" , ( ) => {
891+ const originalFrontmatter : ClaudecodeSkillFrontmatter = {
892+ name : "round-trip-skill" ,
893+ description : "Round trip test" ,
894+ "disable-model-invocation" : false ,
895+ } ;
896+
897+ const original = new ClaudecodeSkill ( {
898+ dirName : "round-trip-skill" ,
899+ frontmatter : originalFrontmatter ,
900+ body : "Round trip body" ,
901+ } ) ;
902+
903+ const rulesyncSkill = original . toRulesyncSkill ( ) ;
904+ const restored = ClaudecodeSkill . fromRulesyncSkill ( { rulesyncSkill } ) ;
905+
906+ expect ( restored . getFrontmatter ( ) [ "disable-model-invocation" ] ) . toBe ( false ) ;
907+ } ) ;
908+
768909 it ( "should preserve model through ClaudecodeSkill -> RulesyncSkill -> ClaudecodeSkill" , ( ) => {
769910 const originalFrontmatter : ClaudecodeSkillFrontmatter = {
770911 name : "round-trip-skill" ,
0 commit comments