git-github-actions-claude/SKILL.md
Create GitHub Actions workflows that run Claude Code skills or prompts on a schedule or trigger. Use this skill when the user wants to automate a Claude Code task in CI, migrate a scheduled Claude task to GitHub Actions, or create a new workflow that uses claude-code-action.
npx skillsauth add paulund/skills github-actions-claudeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build GitHub Actions workflows that run Claude Code skills or prompts automatically.
Claude Code scheduled tasks vs GitHub Actions
anthropics/claude-code-action@v1 inside a workflowLocal skills are available automatically
.claude/skills/ is picked up by Claude Code when it runs in the checked-out repogh CLI authentication
GITHUB_TOKEN is automatically injected into every GitHub Actions environmentgh CLI picks it up natively — never pass it explicitly as GH_TOKEN unless you need elevated permissions beyond the default tokenUse claude_code_oauth_token (existing Claude subscription) instead of anthropic_api_key:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
The CLAUDE_CODE_OAUTH_TOKEN secret must be added to the GitHub repo settings. The token value comes from the user's local Claude Code config.
name: My Claude Task
on:
schedule:
- cron: '0 14 * * 5' # Friday 2pm GMT
workflow_dispatch:
jobs:
run-claude:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Claude
uses: anthropics/claude-code-action@v1
with:
prompt: "Your prompt or skill invocation here"
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Use this pattern when Claude should write files and you want the workflow to manage git and the PR:
name: My Claude Task
on:
schedule:
- cron: '0 14 * * 5'
workflow_dispatch:
jobs:
run-claude:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create branch
id: create-branch
run: |
BRANCH="task/$(date +%Y-%m-%d)"
git checkout -b "$BRANCH"
git push -u origin "$BRANCH"
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
- name: Run Claude
uses: anthropics/claude-code-action@v1
with:
prompt: "Your prompt here. Write files only — do not create a git branch or open a PR, the workflow will handle that."
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
- name: Create pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ steps.create-branch.outputs.branch }}
run: |
git add <path-to-files>
git diff --cached --quiet && echo "No changes generated." && exit 0
git commit -m "feat: describe what was generated"
git push
gh pr create \
--title "PR title: $(date +%Y-%m-%d)" \
--body "Auto-generated. Review before merging." \
--base main \
--head "$BRANCH" \
--reviewer $REVIEWER_NAME
Why this split? The workflow owns the branch and PR lifecycle. The prompt tells Claude to write files only. This gives reliable reviewer assignment and clean commit messages without depending on Claude to run git commands correctly.
Only add marketplace plugins when the prompt or skill references an external plugin:
- name: Run Claude
uses: anthropics/claude-code-action@v1
with:
plugin_marketplaces: 'https://github.com/paulund/ai.git'
plugins: 'plugin@marketplace'
prompt: "..."
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
For multiple marketplaces or plugins, use YAML block style:
plugin_marketplaces: |
https://github.com/paulund/ai.git
https://github.com/anthropics/claude-code.git
plugins: |
writing@paulund-ai
code-review@claude-code-plugins
Always add workflow_dispatch: alongside schedule: so the workflow can be triggered manually for testing.
plugin_marketplaces and plugins only if neededworkflow_dispatch--reviewer $REVIEWER_NAME$ to gh pr createCLAUDE_CODE_OAUTH_TOKEN must exist in the repo's GitHub secretsdevelopment
Use when the user wants to run the project's lint + types + build sequence as a gate before pushing, opening a PR, or merging. Invoked by chained dev skills between phases. Trigger phrases - "/quality-gate", "run the quality gate", "check it builds".
tools
Use when the user wants to verify a PR's feature works at runtime by booting the dev server, exercising the affected UI via Chrome DevTools MCP, and posting a screenshot summary back to the PR. Idempotent — skips if `verified` or `verify-failed` is already on the PR. Trigger phrases - "/pr-verify", "verify this PR", "runtime check the pr".
testing
Use when the user wants a security-focused review pass on a PR with findings actioned as commits on the same branch. Trigger phrases - "/pr-security-review", "security review and fix".
testing
Use when the user wants to open a pull request for an already-pushed branch that implements a specific issue. Idempotent — returns the existing PR if one is already open for the branch. Trigger phrases - "/pr-open", "open the pr", "create pr for this branch".