feat: support Claude Code plugin and gh skill install (#2) #324
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| validate-spec: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Checkout agentskills repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: agentskills/agentskills | |
| path: agentskills | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| cache: "pip" | |
| cache-dependency-path: "agentskills/skills-ref/pyproject.toml" | |
| - name: Install skills-ref | |
| run: | | |
| cd agentskills/skills-ref | |
| pip install -e . | |
| - name: Validate all skills | |
| run: | | |
| echo "π Validating all skills..." | |
| find skills -name "SKILL.md" | while read -r skill_file; do | |
| skill_dir=$(dirname "$skill_file") | |
| skill_name=$(basename "$skill_dir") | |
| echo "" | |
| echo "Validating $skill_name..." | |
| if skills-ref validate "$skill_dir"; then | |
| echo "β $skill_name is valid" | |
| else | |
| echo "β $skill_name validation failed" | |
| exit 1 | |
| fi | |
| done | |
| echo "" | |
| echo "β All skills validated successfully" | |
| validate-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Ensure gh skill is available | |
| run: | | |
| if ! gh skill --help >/dev/null 2>&1; then | |
| echo "Installing latest gh CLI..." | |
| sudo mkdir -p -m 755 /etc/apt/keyrings | |
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq gh | |
| fi | |
| gh --version | head -1 | |
| - name: Validate with gh skill | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh skill publish --dry-run | |
| install-local: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install all skills (local) | |
| working-directory: ${{ runner.temp }} | |
| run: | | |
| npx skills add "$GITHUB_WORKSPACE" --yes | |
| echo "β Successfully installed all skills from local repository" | |
| - name: Verify all skill files | |
| working-directory: ${{ runner.temp }} | |
| run: | | |
| echo "π Checking installed skill files..." | |
| SKILLS_DIR=".agents/skills" | |
| if [ ! -d "$SKILLS_DIR" ]; then | |
| echo "β Skills directory not found: $SKILLS_DIR" | |
| exit 1 | |
| fi | |
| echo "β Skills directory exists: $SKILLS_DIR" | |
| SKILL_COUNT=0 | |
| for skill_dir in "$SKILLS_DIR"/*; do | |
| if [ -d "$skill_dir" ]; then | |
| skill_name=$(basename "$skill_dir") | |
| echo "" | |
| echo "π¦ Checking skill: $skill_name" | |
| if [ -f "$skill_dir/SKILL.md" ]; then | |
| echo " β Found SKILL.md" | |
| SKILL_COUNT=$((SKILL_COUNT + 1)) | |
| else | |
| echo " β SKILL.md not found in $skill_dir" | |
| exit 1 | |
| fi | |
| fi | |
| done | |
| echo "" | |
| echo "β Successfully verified $SKILL_COUNT skills" | |
| if [ $SKILL_COUNT -eq 0 ]; then | |
| echo "β No skills were installed" | |
| exit 1 | |
| fi | |
| install-remote: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Install all skills from Skills.sh | |
| run: | | |
| npx skills add daleseo/korean-skills --yes | |
| echo "β Successfully installed all skills from GitHub" | |
| - name: Verify all skill files | |
| run: | | |
| echo "π Checking installed skill files..." | |
| SKILLS_DIR=".agents/skills" | |
| if [ ! -d "$SKILLS_DIR" ]; then | |
| echo "β Skills directory not found: $SKILLS_DIR" | |
| exit 1 | |
| fi | |
| echo "β Skills directory exists: $SKILLS_DIR" | |
| SKILL_COUNT=0 | |
| for skill_dir in "$SKILLS_DIR"/*; do | |
| if [ -d "$skill_dir" ]; then | |
| skill_name=$(basename "$skill_dir") | |
| echo "" | |
| echo "π¦ Checking skill: $skill_name" | |
| if [ -f "$skill_dir/SKILL.md" ]; then | |
| echo " β Found SKILL.md" | |
| SKILL_COUNT=$((SKILL_COUNT + 1)) | |
| else | |
| echo " β SKILL.md not found in $skill_dir" | |
| exit 1 | |
| fi | |
| fi | |
| done | |
| echo "" | |
| echo "β Successfully verified $SKILL_COUNT skills" | |
| if [ $SKILL_COUNT -eq 0 ]; then | |
| echo "β No skills were installed" | |
| exit 1 | |
| fi |