From 04bf0a797c873906c963eac2e637c5696e88e5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=BF=9C=E5=BE=81?= Date: Fri, 8 May 2026 14:07:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B7=A5=E7=A8=8B=E3=80=91=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20skill=20=E4=B8=93=E5=B1=9E=E7=9A=84=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectNLD/.ai/sync-skills.ps1 | 76 -------------------------------- ProjectNLD/.ai/sync-skills.sh | 80 ---------------------------------- 2 files changed, 156 deletions(-) delete mode 100644 ProjectNLD/.ai/sync-skills.ps1 delete mode 100644 ProjectNLD/.ai/sync-skills.sh diff --git a/ProjectNLD/.ai/sync-skills.ps1 b/ProjectNLD/.ai/sync-skills.ps1 deleted file mode 100644 index 85b94231bf1..00000000000 --- a/ProjectNLD/.ai/sync-skills.ps1 +++ /dev/null @@ -1,76 +0,0 @@ -# sync-all.ps1 — 将 .ai/ 下的 skills、protocols、agents 同步到各平台目录 -# 新增或更新后运行此脚本即可同步到全部平台 -# 用法: cd ProjectNLD && powershell -ExecutionPolicy Bypass -File .ai/sync-all.ps1 - -$ErrorActionPreference = "Stop" - -$PLATFORMS = @(".cursor", ".claude", ".github", ".kiro") - -# ── 1. Sync skills ────────────────────────────────────────────── -$SKILLS_SRC = ".ai/skills" -Write-Host "=== Syncing skills from $SKILLS_SRC ===" -$skillCount = 0 - -Get-ChildItem "$SKILLS_SRC" -Directory | ForEach-Object { - $skill = $_.Name - $skillMd = Join-Path $_.FullName "SKILL.md" - if (-not (Test-Path $skillMd)) { return } - - foreach ($platform in $PLATFORMS) { - $targetDir = Join-Path $platform "skills/$skill" - New-Item -ItemType Directory -Force -Path $targetDir | Out-Null - Copy-Item $skillMd (Join-Path $targetDir "SKILL.md") -Force - } - - Write-Host " ✓ skill: $skill" - $skillCount++ -} - -# ── 2. Sync protocols ────────────────────────────────────────── -$PROTOCOLS_SRC = ".ai/protocols" -Write-Host "" -Write-Host "=== Syncing protocols from $PROTOCOLS_SRC ===" -$protoCount = 0 - -if (Test-Path $PROTOCOLS_SRC) { - Get-ChildItem "$PROTOCOLS_SRC" -Filter "*.md" | ForEach-Object { - $filename = $_.Name - - foreach ($platform in $PLATFORMS) { - $targetDir = Join-Path $platform "protocols" - New-Item -ItemType Directory -Force -Path $targetDir | Out-Null - Copy-Item $_.FullName (Join-Path $targetDir $filename) -Force - } - - Write-Host " ✓ protocol: $filename" - $protoCount++ - } -} - -# ── 3. Sync agents ───────────────────────────────────────────── -$AGENTS_SRC = ".ai/agents" -Write-Host "" -Write-Host "=== Syncing agents from $AGENTS_SRC ===" -$agentCount = 0 - -if (Test-Path $AGENTS_SRC) { - Get-ChildItem "$AGENTS_SRC" -Filter "*.md" | ForEach-Object { - $filename = $_.Name - - foreach ($platform in $PLATFORMS) { - $targetDir = Join-Path $platform "agents" - New-Item -ItemType Directory -Force -Path $targetDir | Out-Null - Copy-Item $_.FullName (Join-Path $targetDir $filename) -Force - } - - Write-Host " ✓ agent: $filename" - $agentCount++ - } -} - -# ── Summary ───────────────────────────────────────────────────── -Write-Host "" -Write-Host "Done. Synced to $($PLATFORMS.Count) platforms:" -Write-Host " Skills: $skillCount" -Write-Host " Protocols: $protoCount" -Write-Host " Agents: $agentCount" diff --git a/ProjectNLD/.ai/sync-skills.sh b/ProjectNLD/.ai/sync-skills.sh deleted file mode 100644 index cae71d85f32..00000000000 --- a/ProjectNLD/.ai/sync-skills.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# sync-all.sh — 将 .ai/ 下的 skills、protocols、agents 同步到各平台目录 -# 新增或更新后运行此脚本即可同步到全部平台 -# 用法: cd ProjectNLD && bash .ai/sync-all.sh - -set -e - -PLATFORMS=(".cursor" ".claude" ".github" ".kiro") - -# ── 1. Sync skills ────────────────────────────────────────────── -SKILLS_SRC=".ai/skills" -echo "=== Syncing skills from $SKILLS_SRC ===" -skill_count=0 - -for skill_dir in "$SKILLS_SRC"/*/; do - [ -d "$skill_dir" ] || continue - skill=$(basename "$skill_dir") - skill_md="$skill_dir/SKILL.md" - [ -f "$skill_md" ] || continue - - for platform in "${PLATFORMS[@]}"; do - target_dir="$platform/skills/$skill" - mkdir -p "$target_dir" - cp "$skill_md" "$target_dir/SKILL.md" - done - - echo " ✓ skill: $skill" - ((skill_count++)) -done - -# ── 2. Sync protocols ────────────────────────────────────────── -PROTOCOLS_SRC=".ai/protocols" -echo "" -echo "=== Syncing protocols from $PROTOCOLS_SRC ===" -proto_count=0 - -if [ -d "$PROTOCOLS_SRC" ]; then - for proto_file in "$PROTOCOLS_SRC"/*.md; do - [ -f "$proto_file" ] || continue - filename=$(basename "$proto_file") - - for platform in "${PLATFORMS[@]}"; do - target_dir="$platform/protocols" - mkdir -p "$target_dir" - cp "$proto_file" "$target_dir/$filename" - done - - echo " ✓ protocol: $filename" - ((proto_count++)) - done -fi - -# ── 3. Sync agents ───────────────────────────────────────────── -AGENTS_SRC=".ai/agents" -echo "" -echo "=== Syncing agents from $AGENTS_SRC ===" -agent_count=0 - -if [ -d "$AGENTS_SRC" ]; then - for agent_file in "$AGENTS_SRC"/*.md; do - [ -f "$agent_file" ] || continue - filename=$(basename "$agent_file") - - for platform in "${PLATFORMS[@]}"; do - target_dir="$platform/agents" - mkdir -p "$target_dir" - cp "$agent_file" "$target_dir/$filename" - done - - echo " ✓ agent: $filename" - ((agent_count++)) - done -fi - -# ── Summary ───────────────────────────────────────────────────── -echo "" -echo "Done. Synced to ${#PLATFORMS[@]} platforms:" -echo " Skills: $skill_count" -echo " Protocols: $proto_count" -echo " Agents: $agent_count"