Created
December 19, 2025 17:53
-
-
Save mrdon/303b706690d28237a941657651157efd to your computer and use it in GitHub Desktop.
Update Claude Skills via Github Actions
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: Claude Skills Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - '.github/workflows/**' | |
| jobs: | |
| review: | |
| runs-on: ubuntu-latest | |
| if: github.actor != 'github-actions[bot]' && github.event.pull_request.user.login != 'claude[bot]' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Discover installed Claude skills | |
| id: discover-skills | |
| run: | | |
| if [ -d ".claude/skills" ]; then | |
| SKILLS=$(find .claude/skills -name "SKILL.md" -type f | \ | |
| sed 's|.claude/skills/||' | \ | |
| sed 's|/SKILL.md||' | \ | |
| tr '\n' ',' | \ | |
| sed 's/,$//') | |
| if [ -z "$SKILLS" ]; then | |
| echo "skills=none" >> $GITHUB_OUTPUT | |
| echo "No Claude skills found" | |
| else | |
| echo "skills=$SKILLS" >> $GITHUB_OUTPUT | |
| echo "Found skills: $SKILLS" | |
| fi | |
| else | |
| echo "skills=none" >> $GITHUB_OUTPUT | |
| echo ".claude/skills directory not found" | |
| fi | |
| - name: Claude Code Review | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| claude_args: | | |
| --max-turns 50 | |
| --allowedTools "Read,Write,Edit,Bash(git:*)" | |
| track_progress: true | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR NUMBER: ${{ github.event.pull_request.number }} | |
| BASE BRANCH: ${{ github.event.pull_request.base.ref }} | |
| Analyze the commits in this PR to determine if installed skills need updates based on: | |
| 1. New code patterns not documented in relevant skills | |
| 2. Changes to existing patterns that skills document (imports, utilities, workflows) | |
| Only recommend updates for substantial new patterns, not trivial changes. | |
| **Installed Skills**: ${{ steps.discover-skills.outputs.skills }} | |
| **Output Format**: | |
| If nothing needs to be done, print ONLY: ✅ "No skills need to be updated". And **nothing** else, | |
| no summary, no analysis, no steps of what you've done, nothing!! | |
| Otherwise output collapsible sections (one per skill) and nothing else: | |
| <details> | |
| <summary>[PRIORITY] Skill name - brief summary</summary> | |
| **What needs updating**: Detailed explanation | |
| **Rationale**: Why this update is needed (e.g., "New async pattern used in 3 files") | |
| </details> | |
| Use priorities: [CRITICAL] (breaking change to documented pattern), [HIGH] (significant new pattern), [LOW] (minor enhancement) | |
| Commit any skills updates to this PR branch. | |
| timeout-minutes: 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment