-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-copy.ps1
More file actions
44 lines (35 loc) · 1.61 KB
/
install-copy.ps1
File metadata and controls
44 lines (35 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env pwsh
# Claude Skills Installation Script (Copy Method)
# Copies skills to the Claude skills directory.
# Use this method if you cannot create symbolic links on Windows.
$ErrorActionPreference = "Stop"
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$SkillsDir = Join-Path (Join-Path $env:USERPROFILE ".claude") "skills"
# Ensure target directory exists
if (-not (Test-Path $SkillsDir)) {
Write-Host "Creating skills directory: $SkillsDir" -ForegroundColor Cyan
New-Item -ItemType Directory -Path $SkillsDir -Force | Out-Null
}
# Get all skill directories (any directory with a SKILL.md file)
$SkillDirs = Get-ChildItem -Path $ScriptDir -Directory |
Where-Object { Test-Path (Join-Path $_.FullName "SKILL.md") }
Write-Host "`nFound $($SkillDirs.Count) skills to install:`n" -ForegroundColor Green
$Copied = 0
$Updated = 0
foreach ($SkillDir in $SkillDirs) {
$SkillName = $SkillDir.Name
$SourcePath = $SkillDir.FullName
$TargetPath = Join-Path $SkillsDir $SkillName
if (Test-Path $TargetPath) {
Write-Host " [SKIP] $SkillName - already exists (delete to update)" -ForegroundColor DarkGray
}
else {
Copy-Item -Path $SourcePath -Destination $TargetPath -Recurse
Write-Host " [OK] $SkillName -> $TargetPath" -ForegroundColor Green
$Copied++
}
}
Write-Host "`nInstallation summary:" -ForegroundColor Cyan
Write-Host " Copied: $Copied" -ForegroundColor Green
Write-Host "`nSkills are now available in Claude Code!" -ForegroundColor Green
Write-Host "Note: Copied skills won't update automatically. Re-run to update after deleting old folders.`n"