AgentSkillsCN

update-skills

更新技能

SKILL.md
--- frontmatter
name: update-skills
description: Update Skills
allowed-tools: Bash, Read

Update Skills

This skill updates Claude Code skills from multiple sources:

  • Symlinked skills - Git repositories in ~/open-source/
  • Custom skills - The Claude-Config repository

Skill Sources

SourceLocationMethod
Dimillian/Skills~/open-source/SkillsSymlink (macOS only)
vercel-labs/agent-skills~/open-source/agent-skillsSymlink
delorenj/skills~/open-source/delorenj-skillsSymlink
Claude-Config~/Claude-ConfigCopy via setup script

Workflow

  1. Detect platform (macOS, Linux, WSL, Windows)
  2. Pull latest changes from symlinked repositories
  3. Report what was updated

Execution

1. Detect Platform

bash
case "$(uname -s)" in
    Darwin) echo "Platform: macOS" ;;
    Linux)
        if grep -qi microsoft /proc/version 2>/dev/null; then
            echo "Platform: WSL"
        else
            echo "Platform: Linux"
        fi
        ;;
    MINGW*|MSYS*|CYGWIN*) echo "Platform: Windows" ;;
    *) echo "Platform: unknown" ;;
esac

2. Update Cross-Platform Skills (All Platforms)

bash
cd ~/open-source/agent-skills && git fetch && git log HEAD..origin/main --oneline && git pull origin main
bash
cd ~/open-source/delorenj-skills && git fetch && git log HEAD..origin/main --oneline && git pull origin main

3. Update macOS-Only Skills (macOS Only)

Only run on macOS:

bash
cd ~/open-source/Skills && git fetch && git log HEAD..origin/main --oneline && git pull origin main

4. Check Claude-Config for Updates

bash
cd ~/Claude-Config && git fetch && git log HEAD..origin/main --oneline

If there are updates, inform the user to run:

  • macOS/Linux/WSL: cd ~/Claude-Config && git pull && ./setup.sh
  • Windows: cd $env:USERPROFILE\Claude-Config; git pull; .\setup.ps1

Report whether new commits were fetched or if already up to date for each repository.