Add Windows installation scripts

- Add install.ps1 (PowerShell one-liner)
- Add install.bat (Batch script for double-click)
- Update README.md with Windows instructions

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
empty
2026-01-11 17:37:23 +08:00
parent 207e3a01f0
commit 81111fbb77
3 changed files with 193 additions and 2 deletions

View File

@@ -12,12 +12,22 @@ Skills 是 Claude Code 的扩展模块,为特定的领域或任务提供专业
### 一键安装脚本
**macOS / Linux:**
```bash
bash <(curl -s https://git.let5see.xyz/let5see/skills/raw/main/install.sh)
```
**Windows (PowerShell):**
```powershell
irm https://git.let5see.xyz/let5see/skills/raw/main/install.ps1 | iex
```
**Windows (批处理):**
下载 `install.bat` 文件,双击运行
### 手动安装步骤
**macOS / Linux:**
```bash
# 1. 克隆仓库
git clone https://git.let5see.xyz/let5see/skills.git ~/tmp-skills
@@ -32,6 +42,21 @@ rm -rf ~/tmp-skills
ls ~/.claude/skills/
```
**Windows:**
```powershell
# 1. 克隆仓库
git clone https://git.let5see.xyz/let5see/skills.git $env:TEMP\tmp-skills
# 2. 复制所有 skills 到本地
Copy-Item -Recurse $env:TEMP\tmp-skills\* $env:USERPROFILE\.claude\skills\
# 3. 清理临时文件
Remove-Item -Recurse -Force $env:TEMP\tmp-skills
# 4. 验证安装
dir $env:USERPROFILE\.claude\skills\
```
## 可用 Skills
### codex-collab
@@ -67,6 +92,7 @@ Claude Code[自动触发 codex-collab skill]
## 目录结构
**macOS / Linux:**
```
~/.claude/skills/
├── codex-collab/
@@ -79,6 +105,19 @@ Claude Code[自动触发 codex-collab skill]
│ └── complete-session.md
```
**Windows:**
```
%USERPROFILE%\.claude\skills\
├── codex-collab\
│ ├── SKILL.md
│ └── references\
│ ├── code-review.md
│ ├── requirement-analysis.md
│ ├── design-proposal.md
│ ├── debug-analysis.md
│ └── complete-session.md
```
## 更新 Skills
```bash
@@ -95,9 +134,14 @@ A: Claude Code 目前仅支持 GitHub URL 格式的技能仓库。自托管仓
### Q: 如何卸载某个 skill
A: 删除对应的目录即可:
**macOS / Linux:**
```bash
rm -rf ~/.claude/sills/skill-name
rm -rf ~/.claude/skills/skill-name
```
**Windows:**
```powershell
Remove-Item -Recurse -Force $env:USERPROFILE\.claude\skills\skill-name
```
### Q: 如何贡献新的 skill

69
install.bat Normal file
View File

@@ -0,0 +1,69 @@
@echo off
REM Claude Code Skills 安装脚本 (Windows - 备用方案)
REM 双击运行此文件安装 skills
setlocal
set REPO_URL=https://git.let5see.xyz/let5see/skills.git
set TEMP_DIR=%TEMP%\skills-install-%RANDOM%
set SKILLS_DIR=%USERPROFILE%\.claude\skills
echo ========================================
echo Claude Code Skills 安装程序
echo ========================================
echo.
REM 检查 git 是否安装
echo [1/4] 检查 Git...
git --version >nul 2>&1
if errorlevel 1 (
echo [错误] 未找到 Git请先安装 Git:
echo https://git-scm.com/download/win
echo.
pause
exit /b 1
)
echo Git 已安装
echo.
REM 创建临时目录并克隆仓库
echo [2/4] 下载 skills...
mkdir "%TEMP_DIR%" 2>nul
git clone "%REPO_URL%" "%TEMP_DIR%" --depth 1 -q
if errorlevel 1 (
echo [错误] 下载失败
pause
exit /b 1
)
echo 下载完成
echo.
REM 创建 skills 目录
echo [3/4] 安装 skills...
if not exist "%SKILLS_DIR%" mkdir "%SKILLS_DIR%"
REM 复制所有包含 SKILL.md 的目录
set count=0
for /d %%d in ("%TEMP_DIR%\*") do (
if exist "%%d\SKILL.md" (
echo 安装 %%~nxd
xcopy /E /I /Y "%%d" "%SKILLS_DIR%\%%~nxd\" >nul
set /a count+=1
)
)
echo 安装完成 (!count! 个 skills)
echo.
REM 清理临时文件
echo [4/4] 清理临时文件...
rmdir /S /Q "%TEMP_DIR%"
echo 清理完成
echo.
echo ========================================
echo 安装成功!已安装 !count! 个 skills
echo ========================================
echo.
echo 提示: 重启 Claude Code 以加载新的 skills
echo.
pause

78
install.ps1 Normal file
View File

@@ -0,0 +1,78 @@
# Claude Code Skills 安装脚本 (Windows)
# 用法: irm https://git.let5see.xyz/let5see/skills/raw/main/install.ps1 | iex
$ErrorActionPreference = "Stop"
$RepoUrl = "https://git.let5see.xyz/let5see/skills.git"
$TempDir = Join-Path $env:TEMP "skills-install-$(Get-Random)"
$SkillsDir = Join-Path $env:USERPROFILE ".claude\skills"
Write-Host "🚀 正在安装 Claude Code Skills..." -ForegroundColor Green
Write-Host ""
# 检查 git 是否安装
Write-Host "🔍 检查 Git..." -ForegroundColor Yellow
try {
$null = git --version
Write-Host " ✓ Git 已安装" -ForegroundColor Green
} catch {
Write-Host " ✗ 未找到 Git请先安装 Git: https://git-scm.com/download/win" -ForegroundColor Red
exit 1
}
# 创建临时目录
Write-Host "📦 下载 skills..." -ForegroundColor Yellow
New-Item -ItemType Directory -Path $TempDir -Force | Out-Null
# 克隆仓库
try {
git clone "$RepoUrl" "$TempDir" --depth 1 --quiet
Write-Host " ✓ 下载完成" -ForegroundColor Green
} catch {
Write-Host " ✗ 下载失败: $_" -ForegroundColor Red
exit 1
}
# 确保 skills 目录存在
New-Item -ItemType Directory -Path $SkillsDir -Force | Out-Null
# 复制所有 skills
Write-Host "📋 安装 skills..." -ForegroundColor Yellow
$skillDirs = Get-ChildItem -Path $TempDir -Directory
$installedCount = 0
foreach ($skillDir in $skillDirs) {
$skillName = $skillDir.Name
$skillMd = Join-Path $skillDir.FullName "SKILL.md"
if (Test-Path $skillMd) {
$destPath = Join-Path $SkillsDir $skillName
# 如果已存在,先删除
if (Test-Path $destPath) {
Remove-Item -Recurse -Force $destPath
}
Copy-Item -Recurse -Force $skillDir.FullName $destPath
Write-Host "$skillName" -ForegroundColor Green
$installedCount++
} else {
Write-Host " ⚠ 跳过 $skillName (缺少 SKILL.md)" -ForegroundColor Yellow
}
}
# 清理临时文件
Remove-Item -Recurse -Force $TempDir
Write-Host ""
Write-Host "✅ 安装完成!" -ForegroundColor Green
Write-Host ""
Write-Host "已安装 $installedCount 个 skills:" -ForegroundColor Cyan
Get-ChildItem -Path $SkillsDir -Directory | ForEach-Object {
Write-Host " - $($_.Name)" -ForegroundColor White
}
Write-Host ""
Write-Host "提示: 重启 Claude Code 以加载新的 skills" -ForegroundColor Yellow