43 lines
1.0 KiB
PowerShell
43 lines
1.0 KiB
PowerShell
#requires -Version 5.1
|
|
[CmdletBinding()]
|
|
param(
|
|
[switch] $Check,
|
|
[switch] $AllowCopy
|
|
)
|
|
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
Import-Module (Join-Path $PSScriptRoot 'AgentAssets.psm1') -Force
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
$skills = @('kompas-3d', 'kompas-fdm-design')
|
|
$targetRoots = @(
|
|
(Join-Path $repoRoot '.claude\skills'),
|
|
(Join-Path $repoRoot '.agents\skills')
|
|
)
|
|
|
|
$failed = $false
|
|
foreach ($root in $targetRoots) {
|
|
foreach ($skill in $skills) {
|
|
$source = Join-Path $repoRoot "plugin\skills\$skill"
|
|
$link = Join-Path $root $skill
|
|
|
|
if ($Check) {
|
|
if (Test-AgentSkillLink -SourcePath $source -LinkPath $link) {
|
|
Write-Host "ok $link"
|
|
}
|
|
else {
|
|
Write-Host "БИТО $link"
|
|
$failed = $true
|
|
}
|
|
continue
|
|
}
|
|
|
|
$state = Sync-AgentSkillLink -SourcePath $source -LinkPath $link -AllowCopy:$AllowCopy
|
|
Write-Host "$state $link"
|
|
}
|
|
}
|
|
|
|
if ($failed) { exit 1 }
|