Initial commit with project setup and basic structure established.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: skill-sync
|
||||
description: Synchronize skills from the current project to the global Claude skills directory (~/.claude/skills). Use this when you have modified skills in the project and want to update the global installation. Supports Windows 11.
|
||||
---
|
||||
|
||||
# Skill Sync
|
||||
|
||||
Synchronize skills from the project's `skills/` directory to the global Claude environment.
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Synchronize All Skills
|
||||
When changes are made to skills within this project, run the synchronization script to update the global installation.
|
||||
|
||||
- **Operation**: Run `powershell -ExecutionPolicy Bypass -File skills/skill-sync/scripts/sync.ps1`
|
||||
- **Effect**: All skill directories in `skills/` will be copied to `~\.claude\skills`. Existing skills in the target directory will be updated, while additional skills in the target that are not in the project remain untouched.
|
||||
|
||||
## Resources
|
||||
|
||||
### scripts/
|
||||
- `sync.ps1`: PowerShell script for synchronizing skill directories to the global Claude skills folder.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Get the current skill directory (the parent of the scripts folder)
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$SkillDir = Split-Path -Parent $ScriptDir
|
||||
$ProjectSkillsDir = Split-Path -Parent $SkillDir
|
||||
$GlobalSkillsDir = Join-Path $HOME ".claude\skills"
|
||||
|
||||
Write-Host "Syncing skills from $ProjectSkillsDir to $GlobalSkillsDir..." -ForegroundColor Cyan
|
||||
|
||||
if (-not (Test-Path $GlobalSkillsDir)) {
|
||||
Write-Host "Global skills directory does not exist. Creating it..." -ForegroundColor Yellow
|
||||
New-Item -ItemType Directory -Path $GlobalSkillsDir -Force
|
||||
}
|
||||
|
||||
# Get all skill directories in the project
|
||||
$Skills = Get-ChildItem -Path $ProjectSkillsDir -Directory
|
||||
|
||||
foreach ($Skill in $Skills) {
|
||||
$SkillName = $Skill.Name
|
||||
$TargetDir = Join-Path $GlobalSkillsDir $SkillName
|
||||
|
||||
Write-Host "Syncing skill: $SkillName..." -ForegroundColor Green
|
||||
|
||||
# Sync the skill directory
|
||||
# Note: Copy-Item -Recurse -Force will overwrite existing files
|
||||
Copy-Item -Path $Skill.FullName -Destination $GlobalSkillsDir -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Host "Sync completed successfully." -ForegroundColor Green
|
||||
Reference in New Issue
Block a user