feat: add agent-integrator skill with full bs-agent SDK documentation #1
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: Validate & Sync Skills and Plugins | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "skills/**" | |
| - "manifest.json" | |
| - ".claude-plugin/**" | |
| - ".cursor-plugin/**" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "skills/**" | |
| - "manifest.json" | |
| - ".claude-plugin/**" | |
| - ".cursor-plugin/**" | |
| concurrency: | |
| group: skills-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-slim | |
| if: github.event.pull_request.draft != true && github.actor != 'dependabot[bot]' | |
| outputs: | |
| skills: ${{ steps.changed-skills.outputs.skills }} | |
| skills_to_validate: ${{ steps.changed-skills.outputs.skills_to_validate }} | |
| plugins_changed: ${{ steps.changed-plugins.outputs.changed }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed skills | |
| id: changed-skills | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| BASE=${{ github.event.pull_request.base.sha }} | |
| HEAD=${{ github.event.pull_request.head.sha }} | |
| else | |
| BASE=${{ github.event.before }} | |
| HEAD=${{ github.event.after }} | |
| # Handle initial commit or force push (BASE doesn't exist) | |
| if [ "$BASE" = "0000000000000000000000000000000000000000" ] || ! git cat-file -e "$BASE" 2>/dev/null; then | |
| SKILLS=$(ls -d skills/*/ 2>/dev/null | xargs -n1 basename | jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "skills=$SKILLS" >> $GITHUB_OUTPUT | |
| echo "skills_to_validate=$SKILLS" >> $GITHUB_OUTPUT | |
| echo "Initial/force push - all skills: $SKILLS" | |
| exit 0 | |
| fi | |
| fi | |
| CHANGED_FILES=$(git diff --name-only $BASE $HEAD) | |
| # All changed skills (for packaging) | |
| SKILLS=$(echo "$CHANGED_FILES" | \ | |
| grep '^skills/' | \ | |
| sed 's|skills/\([^/]*\)/.*|\1|' | \ | |
| sort -u | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| # Skills with SKILL.md changes (for validation) | |
| SKILLS_TO_VALIDATE=$(echo "$CHANGED_FILES" | \ | |
| grep '^skills/.*SKILL\.md$' | \ | |
| sed 's|skills/\([^/]*\)/.*|\1|' | \ | |
| sort -u | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "skills=$SKILLS" >> $GITHUB_OUTPUT | |
| echo "skills_to_validate=$SKILLS_TO_VALIDATE" >> $GITHUB_OUTPUT | |
| echo "Changed skills: $SKILLS" | |
| echo "Skills to validate: $SKILLS_TO_VALIDATE" | |
| - name: Check for plugin changes | |
| id: changed-plugins | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| BASE=${{ github.event.pull_request.base.sha }} | |
| HEAD=${{ github.event.pull_request.head.sha }} | |
| else | |
| BASE=${{ github.event.before }} | |
| HEAD=${{ github.event.after }} | |
| if [ "$BASE" = "0000000000000000000000000000000000000000" ] || ! git cat-file -e "$BASE" 2>/dev/null; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| fi | |
| CHANGED=$(git diff --name-only $BASE $HEAD | grep -E '^(manifest\.json|\.claude-plugin/|\.cursor-plugin/)' | wc -l) | |
| if [ "$CHANGED" -gt 0 ]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| validate-skills: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.skills_to_validate != '[]' | |
| runs-on: ubuntu-slim | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| skill: ${{ fromJson(needs.detect-changes.outputs.skills_to_validate) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Check skill exists | |
| id: check | |
| run: | | |
| if [ -d "skills/${{ matrix.skill }}" ]; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "Skill '${{ matrix.skill }}' was deleted, skipping validation" | |
| fi | |
| - name: Validate ${{ matrix.skill }} | |
| if: steps.check.outputs.exists == 'true' | |
| uses: Flash-Brew-Digital/validate-skill@v1 | |
| with: | |
| path: skills/${{ matrix.skill }} | |
| validate-plugins: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.plugins_changed == 'true' | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Validate plugins | |
| run: | | |
| npx ajv-cli validate -s .claude-plugin/plugin.schema.json -d .claude-plugin/plugin.json | |
| npx ajv-cli validate -s .cursor-plugin/plugin.schema.json -d .cursor-plugin/plugin.json | |
| sync: | |
| needs: [validate-skills, validate-plugins] | |
| if: always() && !failure() && !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| persist-credentials: true | |
| - name: Sync skills | |
| run: node scripts/sync-skills.js | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: "chore: sync skills documentation [skip ci]" | |
| commit_user_name: "Agent Skills Bot" | |
| commit_user_email: "agent-skills-bot@users.noreply.github.com" | |
| file_pattern: "manifest.json skills/index.json README.md .claude-plugin/plugin.json .claude-plugin/marketplace.json .cursor-plugin/plugin.json" |