1414
1515. PARAMETER Agents
1616 Comma or space separated subset of agents to build (default: all)
17- Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, shai, tabnine, agy, vibe, kimi, openclaw , generic
17+ Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, junie, codex, kilocode, auggie, roo, codebuddy, amp, kiro-cli, bob, qodercli, shai, tabnine, agy, vibe, kimi, trae, pi, iflow , generic
1818
1919. PARAMETER Scripts
2020 Comma or space separated subset of script types to build (default: both)
@@ -201,20 +201,26 @@ agent: $basename
201201 }
202202}
203203
204- # Create Kimi Code skills in .kimi/skills/<name>/SKILL.md format.
205- # Kimi CLI discovers skills as directories containing a SKILL.md file,
206- # invoked with /skill:<name> (e.g. /skill:speckit.specify).
207- function New-KimiSkills {
204+ # Create skills in <skills_dir>\<name>\SKILL.md format.
205+ # Most agents use hyphenated names (e.g. speckit-plan); Kimi is the
206+ # current dotted-name exception (e.g. speckit.plan).
207+ #
208+ # Technical debt note:
209+ # Keep SKILL.md frontmatter aligned with `install_ai_skills()` and extension
210+ # overrides (at minimum: name/description/compatibility/metadata.{author,source}).
211+ function New-Skills {
208212 param (
209213 [string ]$SkillsDir ,
210- [string ]$ScriptVariant
214+ [string ]$ScriptVariant ,
215+ [string ]$AgentName ,
216+ [string ]$Separator = ' -'
211217 )
212218
213219 $templates = Get-ChildItem - Path " templates/commands/*.md" - File - ErrorAction SilentlyContinue
214220
215221 foreach ($template in $templates ) {
216222 $name = [System.IO.Path ]::GetFileNameWithoutExtension($template.Name )
217- $skillName = " speckit. $name "
223+ $skillName = " speckit${Separator} $name"
218224 $skillDir = Join-Path $SkillsDir $skillName
219225 New-Item - ItemType Directory - Force - Path $skillDir | Out-Null
220226
@@ -267,7 +273,7 @@ function New-KimiSkills {
267273
268274 $body = $outputLines -join " `n "
269275 $body = $body -replace ' \{ARGS\}' , ' $ARGUMENTS'
270- $body = $body -replace ' __AGENT__' , ' kimi '
276+ $body = $body -replace ' __AGENT__' , $AgentName
271277 $body = Rewrite- Paths - Content $body
272278
273279 # Strip existing frontmatter, keep only body
@@ -283,7 +289,7 @@ function New-KimiSkills {
283289 if ($inBody ) { $templateBody += " $line `n " }
284290 }
285291
286- $skillContent = " ---`n name: `" $skillName `"`n description: `" $description `"`n ---`n`n $templateBody "
292+ $skillContent = " ---`n name: `" $skillName `"`n description: `" $description `"`n compatibility: `" Requires spec-kit project structure with .specify/ directory `"`n metadata: `n author: `" github-spec-kit `"`n source: `" templates/commands/ $name .md `"` n ---`n`n $templateBody "
287293 Set-Content - Path (Join-Path $skillDir " SKILL.md" ) - Value $skillContent - NoNewline
288294 }
289295}
@@ -483,9 +489,14 @@ function Build-Variant {
483489 $cmdDir = Join-Path $baseDir " .windsurf/workflows"
484490 Generate- Commands - Agent ' windsurf' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $cmdDir - ScriptVariant $Script
485491 }
492+ ' junie' {
493+ $cmdDir = Join-Path $baseDir " .junie/commands"
494+ Generate- Commands - Agent ' junie' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $cmdDir - ScriptVariant $Script
495+ }
486496 ' codex' {
487- $cmdDir = Join-Path $baseDir " .codex/prompts"
488- Generate- Commands - Agent ' codex' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $cmdDir - ScriptVariant $Script
497+ $skillsDir = Join-Path $baseDir " .agents/skills"
498+ New-Item - ItemType Directory - Force - Path $skillsDir | Out-Null
499+ New-Skills - SkillsDir $skillsDir - ScriptVariant $Script - AgentName ' codex' - Separator ' -'
489500 }
490501 ' kilocode' {
491502 $cmdDir = Join-Path $baseDir " .kilocode/workflows"
@@ -540,7 +551,20 @@ function Build-Variant {
540551 ' kimi' {
541552 $skillsDir = Join-Path $baseDir " .kimi/skills"
542553 New-Item - ItemType Directory - Force - Path $skillsDir | Out-Null
543- New-KimiSkills - SkillsDir $skillsDir - ScriptVariant $Script
554+ New-Skills - SkillsDir $skillsDir - ScriptVariant $Script - AgentName ' kimi' - Separator ' .'
555+ }
556+ ' trae' {
557+ $rulesDir = Join-Path $baseDir " .trae/rules"
558+ New-Item - ItemType Directory - Force - Path $rulesDir | Out-Null
559+ Generate- Commands - Agent ' trae' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $rulesDir - ScriptVariant $Script
560+ }
561+ ' pi' {
562+ $cmdDir = Join-Path $baseDir " .pi/prompts"
563+ Generate- Commands - Agent ' pi' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $cmdDir - ScriptVariant $Script
564+ }
565+ ' iflow' {
566+ $cmdDir = Join-Path $baseDir " .iflow/commands"
567+ Generate- Commands - Agent ' iflow' - Extension ' md' - ArgFormat ' $ARGUMENTS' - OutputDir $cmdDir - ScriptVariant $Script
544568 }
545569 ' openclaw' {
546570 $skillsDir = Join-Path $baseDir " .openclaw/skills"
@@ -563,7 +587,7 @@ function Build-Variant {
563587}
564588
565589# Define all agents and scripts
566- $AllAgents = @ (' claude' , ' gemini' , ' copilot' , ' cursor-agent' , ' qwen' , ' opencode' , ' windsurf' , ' codex' , ' kilocode' , ' auggie' , ' roo' , ' codebuddy' , ' amp' , ' kiro-cli' , ' bob' , ' qodercli' , ' shai' , ' tabnine' , ' agy' , ' vibe' , ' kimi' , ' openclaw ' , ' generic' )
590+ $AllAgents = @ (' claude' , ' gemini' , ' copilot' , ' cursor-agent' , ' qwen' , ' opencode' , ' windsurf' , ' junie ' , ' codex' , ' kilocode' , ' auggie' , ' roo' , ' codebuddy' , ' amp' , ' kiro-cli' , ' bob' , ' qodercli' , ' shai' , ' tabnine' , ' agy' , ' vibe' , ' kimi' , ' trae ' , ' pi ' , ' iflow ' , ' generic' )
567591$AllScripts = @ (' sh' , ' ps' )
568592
569593function Normalize-List {
0 commit comments