@@ -771,15 +771,12 @@ def _register_skills(
771771 if skill_subdir .exists () and not skill_subdir .is_dir ():
772772 continue
773773 skill_subdir .mkdir (parents = True , exist_ok = True )
774- frontmatter_data = {
775- "name" : target_skill_name ,
776- "description" : enhanced_desc ,
777- "compatibility" : "Requires spec-kit project structure with .specify/ directory" ,
778- "metadata" : {
779- "author" : "github-spec-kit" ,
780- "source" : f"preset:{ manifest .id } " ,
781- },
782- }
774+ frontmatter_data = registrar .build_skill_frontmatter (
775+ selected_ai ,
776+ target_skill_name ,
777+ enhanced_desc ,
778+ f"preset:{ manifest .id } " ,
779+ )
783780 frontmatter_text = yaml .safe_dump (frontmatter_data , sort_keys = False ).strip ()
784781 skill_content = (
785782 f"---\n "
@@ -861,15 +858,12 @@ def _unregister_skills(self, skill_names: List[str], preset_dir: Path) -> None:
861858 original_desc or f"Spec-kit workflow command: { short_name } " ,
862859 )
863860
864- frontmatter_data = {
865- "name" : skill_name ,
866- "description" : enhanced_desc ,
867- "compatibility" : "Requires spec-kit project structure with .specify/ directory" ,
868- "metadata" : {
869- "author" : "github-spec-kit" ,
870- "source" : f"templates/commands/{ short_name } .md" ,
871- },
872- }
861+ frontmatter_data = registrar .build_skill_frontmatter (
862+ selected_ai if isinstance (selected_ai , str ) else "" ,
863+ skill_name ,
864+ enhanced_desc ,
865+ f"templates/commands/{ short_name } .md" ,
866+ )
873867 frontmatter_text = yaml .safe_dump (frontmatter_data , sort_keys = False ).strip ()
874868 skill_title = self ._skill_title_from_command (short_name )
875869 skill_content = (
@@ -894,15 +888,12 @@ def _unregister_skills(self, skill_names: List[str], preset_dir: Path) -> None:
894888 command_name = extension_restore ["command_name" ]
895889 title_name = self ._skill_title_from_command (command_name )
896890
897- frontmatter_data = {
898- "name" : skill_name ,
899- "description" : frontmatter .get ("description" , f"Extension command: { command_name } " ),
900- "compatibility" : "Requires spec-kit project structure with .specify/ directory" ,
901- "metadata" : {
902- "author" : "github-spec-kit" ,
903- "source" : extension_restore ["source" ],
904- },
905- }
891+ frontmatter_data = registrar .build_skill_frontmatter (
892+ selected_ai if isinstance (selected_ai , str ) else "" ,
893+ skill_name ,
894+ frontmatter .get ("description" , f"Extension command: { command_name } " ),
895+ extension_restore ["source" ],
896+ )
906897 frontmatter_text = yaml .safe_dump (frontmatter_data , sort_keys = False ).strip ()
907898 skill_content = (
908899 f"---\n "
0 commit comments