From github-action
This skill should be used when the user asks to "set up the github action", "configure async claude", "enable @claude on issues", "set up claude code action", "github action integration", "autonomous claude on github", or wants Claude to work on issues and PRs autonomously via GitHub Actions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/github-action:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Set up the Claude Code GitHub Action so that `@claude` mentions on issues and PRs trigger autonomous Claude sessions. Claude reads the issue, implements changes on a branch, creates a PR, and responds to PR reviews — all without human intervention.
Set up the Claude Code GitHub Action so that @claude mentions on issues and PRs trigger autonomous Claude sessions. Claude reads the issue, implements changes on a branch, creates a PR, and responds to PR reviews — all without human intervention.
Before starting, verify:
git remote -v to confirm a GitHub remote exists..github/workflows/claude-issue.yml already exists. If it does, ask the user whether to overwrite or skip.The user must run a built-in Claude Code command to authenticate. Tell them:
Run
/install-github-appin your Claude Code CLI. Here's what to expect:
- Install the GitHub App — a browser window will open to install the Claude GitHub App on your repo. Follow the prompts.
- Select workflows — it will ask which workflows to install. Select any option (it doesn't matter which — we'll replace them with our own). You must select at least one to proceed.
- Authentication — choose "Use my Claude subscription" (unless you have a specific API key you'd rather use).
- Browser tab — it will open a browser tab to create a PR with template workflow files. Just close that tab — we'll generate our own opinionated workflows instead.
Let me know when you're done!
Wait for user confirmation before proceeding.
Scan the repo root for ecosystem indicators to determine the right dependency caching step:
| Indicator | Ecosystem |
|---|---|
uv.lock or pyproject.toml (no other lockfile) | Python + uv |
requirements.txt (no uv.lock) | Python + pip |
Cargo.toml | Rust |
package.json + package-lock.json | Node.js + npm |
package.json + bun.lock or bun.lockb | Node.js + bun |
Read the matching snippet from references/cache-steps.md. If no match or multiple ecosystems, leave the # CACHE_STEP comment as-is and tell the user to add caching later.
Create the destination directories (.github/workflows, .github/scripts, .github/prompts) then copy asset files directly using cp. For the two workflow files, after copying, replace the # CACHE_STEP and # INSTALL_STEP comments with the detected snippets from the reference file. The other three files are copied as-is.
| Asset | Destination |
|---|---|
assets/claude-issue.yml | .github/workflows/claude-issue.yml |
assets/claude-pr.yml | .github/workflows/claude-pr.yml |
assets/update-comment.sh | .github/scripts/update-comment.sh |
assets/issue-prompt.md | .github/prompts/issue.md |
assets/pr-review-prompt.md | .github/prompts/pr-review.md |
The GitHub Action supports installing plugins from marketplaces. Detect the user's installed plugins and offer to include them in CI.
Read .claude/settings.json and .claude/settings.local.json looking for:
enabledPlugins — all enabled plugins (from any marketplace)pluginMarketplaces — all registered marketplacesShow the user which plugins and marketplaces were detected. Use AskUserQuestion to confirm which plugins to include in CI.
If the user selects no plugins, skip the rest of this step.
Replace the # PLUGINS comment in both workflow files with plugin_marketplaces and plugins inputs. Only include marketplaces that have at least one selected plugin. Marketplace references in settings may be shorthand (e.g. Crazytieguy/alignment-hive) — convert to full git URLs for the action. Example:
plugin_marketplaces: |
https://github.com/owner/repo.git
plugins: |
some-plugin@some-marketplace
For plugins that need secrets (e.g. remote-kernels needs RUNPOD_API_KEY), replace the # PLUGIN_ENV comment in both workflow files with the required env var lines:
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
For unknown plugins, ask the user if any environment variables are needed.
Then offer to set each secret via gh secret set, piping the value from the local environment (.env, .env.local, or shell). If that's not possible, explain how to set it manually in the repo's Settings → Secrets.
If no plugins need secrets, remove the # PLUGIN_ENV comment line from both workflow files.
Read .claude/settings.json and .claude/settings.local.json. Claude in the GitHub Action uses these for bash permissions. Check if permissions are properly configured:
Note the result for the summary — do not message the user yet.
List all files created and summarize:
.github/workflows/claude-issue.yml — triggers on @claude in issues.github/workflows/claude-pr.yml — triggers on PR reviews and @claude in PR comments.github/scripts/update-comment.sh — tracking comment wrapper with mid-session feedback.github/prompts/issue.md — issue prompt template.github/prompts/pr-review.md — PR review prompt templateIf plugins were configured (from Step 3), list which plugins will be available in CI. Note which secrets were set and remind about any that still need to be added manually.
If permissions are unconfigured (from Step 4), include a warning:
Claude in the GitHub Action uses your project's
.claude/settings.jsonfor bash permissions. Without proper permissions, Claude won't be able to run build/test commands autonomously.
Recommend installing the autopilot plugin (autopilot@alignment-hive) if not already installed — it includes a permissions setup flow.
Tell the user the following:
Next steps:
/install-github-app created a branch like add-claude-github-actions-*. Delete it from the GitHub UI or ignore it..github/prompts/issue.md and .github/prompts/pr-review.md control how Claude behaves autonomously. They're short and readable.main as defense in depth (Claude pushes to claude/issue-N branches, not main). Offer to help configure this — recommended rules: require pull request before merging (with at least 1 review), restrict direct pushes, restrict deletions, and block force pushes.@claude with a simple task.Using the integration:
@claude in an issue or PR comment to trigger a session. On Claude-authored PRs, submitting a review triggers it automatically.references/design-decisions.md — Explains why specific patterns were chosen (agent mode, wrapper script, permission model, etc.). Consult when the user asks "why" questions.references/cache-steps.md — YAML snippets for dependency caching per ecosystem.npx claudepluginhub crazytieguy/alignment-hive --plugin github-actionSets up GitHub Actions workflows with Claude Code for automated PR reviews, @claude mention responses, and issue triage, including templates, secrets, and permissions.
Configures .claude/settings.json permissions and GitHub Actions workflows (claude.yml, claude-code-review.yml) for laurigates/claude-plugins marketplace. Use when onboarding projects to Claude Code plugins.
Provides YAML templates and patterns for GitHub Actions workflows integrating Claude Code for PR reviews, issue triage, CI failure fixes, and automation triggers. Use when creating or modifying Claude-integrated workflows.