Get your repository automated with GitHub Actions + Claude Code in under 5 minutes.
Before you begin, ensure you have:
# macOS
brew install gh
gh auth login
# Linux
sudo apt install gh
gh auth login
# Windows
winget install GitHub.cli
gh auth login
git --version # Should be 2.23 or higher
Copy this blueprint into your project:
# Option A: Add to existing repository
cd your-project
git clone https://github.com/alirezarezvani/claude-code-github-workflow.git .blueprint-temp
cp -r .blueprint-temp/.github/ .
cp -r .blueprint-temp/.claude/ .
cp -r .blueprint-temp/setup/ .
rm -rf .blueprint-temp
# Option B: Start new project with blueprint
git clone https://github.com/alirezarezvani/claude-code-github-workflow.git my-project
cd my-project
Add required secrets to your repository:
# Method 1: Via GitHub CLI (Recommended)
gh secret set ANTHROPIC_API_KEY
# Paste your Anthropic API key when prompted
gh secret set PROJECT_URL
# Paste your project board URL (format: https://github.com/users/USERNAME/projects/NUMBER)
# Method 2: Via GitHub UI
# Go to: Settings → Secrets and variables → Actions → New repository secret
# Add ANTHROPIC_API_KEY and PROJECT_URL
Project URL Format:
https://github.com/users/YOUR_USERNAME/projects/1https://github.com/orgs/YOUR_ORG/projects/1Run the bootstrap workflow to set up labels and validate configuration:
# Run bootstrap workflow
gh workflow run bootstrap.yml
# Check if it succeeded
gh run list --workflow=bootstrap.yml --limit 1
Alternative (GitHub UI):
Actions tabBootstrap RepositoryRun workflow → Run workflowIf you have a Claude Code plan:
# Save your plan to a file
cat > plan.json <<'EOF'
{
"milestone": {
"title": "My First Feature",
"description": "Testing the blueprint automation"
},
"tasks": [
{
"title": "Add welcome message",
"description": "Create a simple welcome message component",
"acceptanceCriteria": [
"Component displays welcome text",
"Component has proper styling",
"Tests pass"
],
"priority": "medium",
"type": "feature",
"platform": "web"
}
]
}
EOF
# Convert plan to issues
gh workflow run claude-plan-to-issues.yml -f plan_json="$(cat plan.json)"
# Check created issues
gh issue list --label claude-code
Create a simple issue to test the automation:
New Issueclaude-code (required)status:ready (required)type:featureplatform:webThe workflow automatically creates a branch:
# Fetch the new branch
git fetch origin
# List branches to find yours
git branch -r | grep "feature/"
# Checkout the branch
git checkout feature/issue-1-add-welcome-message
Create a simple change:
# Create a file
echo "# Welcome to my project!" > WELCOME.md
# Stage changes
git add WELCOME.md
# Option A: Use smart commit command (if Claude Code CLI installed)
# This includes quality checks and secret scanning
/commit-smart
# Option B: Manual commit
git commit -m "feat: add welcome message"
git push origin feature/issue-1-add-welcome-message
# Option A: Use PR command (if Claude Code CLI installed)
/create-pr
# Option B: Via GitHub CLI
gh pr create \
--title "feat: add welcome message" \
--body "Closes #1
## Summary
Added welcome message to the project.
## Type of Change
- [x] Feature
- [ ] Fix
- [ ] Refactor
## Testing
- [x] Manual testing completed
- [x] Changes reviewed
## Platform
- [x] Web
- [ ] Mobile
- [ ] Fullstack" \
--base dev
Your PR triggers automatic workflows:
pr-into-dev.yml)
pr-status-sync.yml)
# Check workflow runs
gh run list --limit 5
# Watch specific run
gh run watch
# Create release PR (dev → main)
gh pr create --base main --head dev --title "Release v1.0.0"
You just experienced a complete automated workflow:
Issue Created → Branch Created → PR Opened → Quality Checks →
Merge to Dev → Status Updated → Release PR → Merge to Main →
Issue Closed → Done! 🎉
All automated with zero manual tracking!
Problem: GitHub CLI not installed
Solution:
# macOS
brew install gh
# Linux
sudo apt install gh
# Windows
winget install GitHub.cli
# Verify
gh --version
Problem: Secret not configured
Solution:
# Set the secret
gh secret set PROJECT_URL
# Enter your project URL: https://github.com/users/USERNAME/projects/1
# Verify it's set
gh secret list | grep PROJECT_URL
Problem: API key not set or invalid
Solution:
# Set or update the API key
gh secret set ANTHROPIC_API_KEY
# Paste your API key when prompted
# Verify
gh secret list | grep ANTHROPIC_API_KEY
Problem: Missing required labels
Solution:
claude-code AND status:readygh issue view 1 --json labelsgh issue edit 1 --add-label "claude-code,status:ready"
Problem: Code doesn’t pass lint/test/typecheck
Solution:
# Run checks locally before pushing
npm run lint
npm run type-check
npm run test
# Fix issues, then push again
Problem: PR body doesn’t reference an issue
Solution:
Closes #1 or Fixes #1 or Resolves #1/create-pr command which auto-linksProblem: Permissions or configuration issue
Solution:
# Check workflow logs
gh run list --workflow=bootstrap.yml --limit 1
gh run view [RUN_ID]
# Common fixes:
# 1. Ensure GITHUB_TOKEN has proper permissions
# 2. Verify PROJECT_URL is correct
# 3. Check you have admin access to repository
/commit-smart, /create-pr, /review-prtype(scope): descriptionYou’ve successfully set up a production-ready GitHub Actions workflow with Claude Code! Your repository now has:
Welcome to world-class automation! 🚀
Questions? Check the Troubleshooting Guide or open an issue.
Ready for more? Read the Complete Setup Guide for advanced features.