Experimental sandbox for combining Claude Code with GitHub Actions. Claude fetches data, updates websites, creates PRs, reviews code, and attempts to fix its own failures.
This repo explores autonomous AI infrastructure across five categories:
- Data Fetchers & Scrapers - Claude fetches external data and updates the website
- Autonomous Development - Claude modifies the codebase, triages issues, and implements tasks
- Self-Improvement & Meta - Claude improves its own setup and fixes its own failures
- Webhooks & External Triggers - External services can trigger Claude workflows
- Build & Deploy - Website generation and deployment automation
Additionally, Claude Code's built-in features are installed via /install-github-app:
- @claude mentions in issues - Comment
@claudeto get implementation PRs - Code Review - Claude reviews all PRs automatically
12 of 17 documented workflows use Claude Code for decision-making and implementation.
Claude fetches external data and updates data used to generate the website.
| Workflow | Prompt for Claude | Triggers | Uses Claude | Commits | Opens Issues | Opens PRs |
|---|---|---|---|---|---|---|
| nytimes-headlines.yml | Parse NYT RSS feed → data/nytimes.json |
Daily (9am UTC) | ✅ | ✅ | ❌ | ❌ |
| glif-top-content.yml | Fetch Glif featured content → data/glif.json |
Daily (10am UTC) | ✅ | ✅ | ❌ | ❌ |
| weather-data.yml | Fetch NYC weather → data/weather.json |
Daily (8am UTC) | ✅ | ✅ | ❌ | ❌ |
| crypto-prices.yml | Fetch BTC/ETH/SOL/HNT prices via CoinGecko MCP server → data/crypto-prices.json |
Daily (11am UTC) | ✅ | ✅ | ❌ | ❌ |
| rhizome-community.yml | Scrape Rhizome.org community → data/rhizome.json |
Every 6h | ✅ | ✅ | ❌ | ❌ |
Claude modifies its own codebase and implements tasks.
| Workflow | Prompt for Claude | Triggers | Uses Claude | Commits | Opens Issues | Opens PRs |
|---|---|---|---|---|---|---|
| claude.yml | Respond to @claude mentions in issues/PRs → implement requests | @claude mention | ✅ | ✅ | ❌ | ✅ |
| todo-worker.yml | Read TODO.md → pick task → implement via PR | Every 8h | ✅ | ❌ | ❌ | ✅ |
| issue-triage.yml | Analyze issue → apply labels → ask clarifying questions | On issue open | ✅ | ❌ | ❌ | ❌ |
| claude-code-review.yml | Review PRs and provide feedback | On PR open/update | ✅ | ❌ | ❌ | ❌ |
| cross-repo-notify.yml | Detect workflow changes → create issue in external repo | Every 8h | ❌ | ❌ | ✅ (external) | ❌ |
| auto-merge.yml | Auto-merge approved Claude PRs | On PR review/checks | ❌ | ❌ | ❌ | ❌ |
Claude improves its own setup and fixes its own failures.
| Workflow | Prompt for Claude | Triggers | Uses Claude | Commits | Opens Issues | Opens PRs |
|---|---|---|---|---|---|---|
| self-repair.yml | Read failure logs → diagnose → fix (commit or PR) | Every 6h + on failures | ✅ | ✅ | ✅ | ✅ |
| self-improver.yml | Analyze changes → improve CLAUDE.md & Claude Code setup via PR | On PR merge/issue activity | ✅ | ❌ | ❌ | ✅ |
| update-docs.yml | Generate workflow docs → create docs/*.md & data/docs.json | Weekly (Sunday) | ✅ | ✅ | ❌ | ❌ |
External services can trigger workflows via GitHub's repository_dispatch API.
| Workflow | Prompt for Claude | Triggers | Uses Claude | Commits | Opens Issues | Opens PRs |
|---|---|---|---|---|---|---|
| webhook-demo.yml | Echo webhook payload for testing | webhook (repository_dispatch) |
❌ | ❌ | ❌ | ❌ |
Website generation and deployment automation.
| Workflow | Prompt for Claude | Triggers | Uses Claude | Commits | Opens Issues | Opens PRs |
|---|---|---|---|---|---|---|
| adaptive-theme.yml | Generate CSS based on time/season/weather from data/weather.json → theme-nyc.css |
Daily (noon UTC) | ✅ | ✅ | ❌ | ❌ |
| update-website.yml | Build website from data files → deploy to Pages | Daily (1pm UTC) + on data changes | ❌ | ❌ | ❌ | ❌ |
The system operates through several categories of workflows that work together:
nytimes-headlines.yml,weather-data.yml,crypto-prices.yml, etc. fetch external data- All commit directly to main → trigger website rebuild
adaptive-theme.ymlgenerates CSS based on time/season/weather fromdata/weather.jsonupdate-website.ymlbuilds and deploys the static site to GitHub Pages- Runs after data updates to keep site current
claude.ymlresponds to @claude mentions in issues/PRs to implement user requeststodo-worker.ymlimplements tasks from TODO.md via PRsissue-triage.ymlanalyzes and labels new issuesauto-merge.ymlmerges approved Claude PRs automatically
These workflows improve the system itself:
self-repair.yml - Autonomous error recovery:
- Detects workflow failures
- Analyzes logs and identifies root cause
- Implements fix (commit or PR based on complexity)
- Re-runs the failed workflow
- Runs every 6 hours to catch stragglers
self-improver.yml - Claude Code setup optimization:
- Analyzes merged PRs and issue discussions
- Improves CLAUDE.md, slash commands, subagent docs
- Acts when users say "update Claude rules", "DRY this up", etc.
- Creates PRs with setup improvements
update-docs.yml - Documentation generation:
- Creates
docs/*.mdfor each workflow - Generates
data/docs.jsonmetadata - Runs weekly, commits directly to main
- Website includes these docs automatically
Trigger self-repair manually:
gh workflow run self-repair.yml
# Or debug directly
./scripts/debug-workflows.shSuccess rate: Variable. Claude can fix simple issues (missing files, permission errors, API changes) but struggles with complex logic bugs.
Manage workflows with gh:
# List all workflows
gh workflow list
# Run a workflow
gh workflow run nytimes-headlines.yml
gh workflow run todo-worker.yml -f mode=plan
# Watch runs in real-time
gh run watch
# List recent runs
gh run list --limit 20
# View specific run
gh run view <run-id>
gh run view <run-id> --log
gh run view <run-id> --log-failed
# Re-run failed workflow
gh run rerun <run-id>Example: Manually trigger NY Times headlines:
gh workflow run nytimes-headlines.yml && gh run watchThe webhook-demo.yml workflow can be triggered via external webhooks using GitHub's repository_dispatch API.
You need a GitHub Personal Access Token to trigger workflows via webhook.
Option 1: Fine-Grained Token (Recommended)
- Go to https://github.com/settings/tokens?type=beta
- Click "Generate new token"
- Configure the token:
- Token name:
webhook-trigger(or whatever you prefer) - Expiration: Choose duration (90 days, 1 year, custom, or no expiration)
- Repository access: Select "Only select repositories" → Choose your repo
- Permissions → Repository permissions:
- Administration: Read and write ✅
- Token name:
- Click "Generate token"
- Copy the token immediately (you won't see it again!)
Option 2: Classic Token
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Configure the token:
- Note:
webhook-trigger - Expiration: Choose duration
- Scopes: Check
repo(Full control of private repositories) ✅
- Note:
- Click "Generate token"
- Copy the token immediately
Security Notes:
- Store the token securely (password manager, environment variable)
- Never commit it to git
- Treat it like a password
- Use fine-grained tokens for better security (limited scope)
- Set expiration dates and rotate tokens regularly
Endpoint:
POST https://api.github.com/repos/jamiew/claude-gha-demo/dispatches
Headers:
Accept: application/vnd.github+json
Authorization: Bearer YOUR_GITHUB_TOKEN
Payload:
{
"event_type": "custom-webhook-event",
"client_payload": {
"message": "Your custom message",
"action": "deploy",
"data": {
"key": "value"
}
}
}Trigger with curl:
# Replace ghp_xxxxxxxxxxxx with your actual token
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ghp_xxxxxxxxxxxx" \
https://api.github.com/repos/jamiew/claude-gha-demo/dispatches \
-d '{"event_type":"custom-webhook-event","client_payload":{"message":"Hello from webhook!"}}'Trigger with gh CLI (easiest):
# gh CLI uses your authenticated session automatically
gh api repos/jamiew/claude-gha-demo/dispatches \
-f event_type=custom-webhook-event \
-f client_payload[message]="Hello from webhook" \
-f client_payload[action]="deploy"Using environment variable:
# Set token once
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
# Then use it
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/jamiew/claude-gha-demo/dispatches \
-d '{"event_type":"custom-webhook-event","client_payload":{"message":"Hello!"}}'Supported event types:
custom-webhook-event- General webhook demotest-webhook- Test webhook trigger
Payload fields (all optional):
message- Custom message to echoaction- Action type (e.g., "deploy", "notify")data- Any JSON object with additional data
The workflow will echo all payload data and can be extended to perform actions based on the payload content.
View the workflow run:
gh run list --workflow=webhook-demo.yml --limit 5
gh run watchPublic webhook endpoints:
To make a publicly accessible webhook (no GitHub token required for callers), use a serverless function to proxy the request:
- Val Town - Simple hosted functions
- Cloudflare Workers - Free edge functions
- Other options: Vercel Functions, AWS Lambda, etc.
Store your GITHUB_TOKEN as an environment variable in the function, then proxy requests to GitHub's API.
Diagnose workflow failures:
./scripts/debug-workflows.shSettings → Actions → General → Allow all actions
Settings → Secrets and variables → Actions → New repository secret
Required:
CLAUDE_CODE_OAUTH_TOKEN- From Claude Code GitHub App install
Optional:
GLIF_API_TOKEN- From https://glif.app (for Glif featured content integration)CROSS_REPO_PAT- Personal Access Token for cross-repo notifications (only needed if using cross-repo-notify workflows)
Only needed if you want to use the cross-repo-notify.yml workflow to send notifications to another repo.
- Go to https://github.com/settings/tokens?type=beta
- Click "Generate new token"
- Configure:
- Token name:
cross-repo-pat - Expiration: 1 year (or your preference)
- Repository access: Public Repositories (read-only) (or select specific repos)
- Permissions → Repository permissions:
- Issues: Read and write ✅
- Token name:
- Click "Generate token" and copy it
- Add to this repo: Settings → Secrets → Actions → New secret
- Name:
CROSS_REPO_PAT - Value: paste the token
- Name:
Settings → Actions → General → Workflow permissions:
- ✅ Read and write permissions
- ✅ Allow GitHub Actions to create and approve pull requests
This must be done manually via web interface:
- Go to Settings → Pages
- Under "Build and deployment":
- Source: Select GitHub Actions (NOT "Deploy from a branch")
- Click Save
Your site will be at: https://[username].github.io/[repo-name]
Why GitHub Actions source?
- Multiple workflows can deploy (on push, on schedule, on demand)
- No extra
gh-pagesbranch to manage - Workflows control when/how to build and deploy
- Better for dynamic content that updates frequently
- Modern best practice (same as Vercel, Netlify)
Note: Deploy workflows will fail until Pages is enabled. Once enabled, they'll work automatically.
Verify Pages is enabled:
# Check if Pages is enabled
gh api repos/jamiew/claude-gha-demo/pages
# Should return Pages config, not 404Install built-in features using Claude Code CLI:
/install-github-appThis enables:
- @claude mentions in issues - Create an issue and mention
@claudeto get an implementation PR - Automated Code Review - Claude reviews all PRs automatically
For maximum autonomy, enable auto-merge:
Settings → General:
- ✅ Allow auto-merge (lets Claude merge its own PRs)
- ✅ Automatically delete head branches (cleanup after merge)
This lets the system truly run itself. Claude creates PRs → reviews them → auto-merges → deletes branches. Full autonomy.
External data → Claude fetches → Updates data/ → Deploys site
↓
Claude improves code → Creates PR
↓
Claude reviews PR → Auto-merge
↓
[Updated site]
In parallel:
self-improver.ymlimproves Claude Code setup based on learningsupdate-docs.ymlgenerates workflow documentationself-repair.ymlattempts to fix failurestodo-worker.ymlimplements tasks from TODO.mdissue-triage.ymlorganizes and labels incoming issues
The goal is autonomous infrastructure that iterates on itself. Success varies.
data/- Data directory (nytimes.json, glif.json, weather.json, crypto-prices.json, rhizome.json, docs.json)data.json- Legacy data store (still supported for backward compatibility)docs/- Auto-generated workflow documentation (created byupdate-docs.yml)TODO.md- Ideas and tasks for Claude to implement.github/workflows/- All workflow definitionsscripts/- Debug and repair utilitiesscripts/build-website.js- Builds static website from data filesscripts/debug-workflows.sh- Diagnose workflow failures
.claude/commands/- Custom slash commands (Markdown).claude/subagents/- Subagent documentationtheme-nyc.css- Adaptive CSS theme generated based on time/weather
Fetches top workflows/agents via API and displays them on the site.
Pages not enabled: Settings → Pages → Source: GitHub Actions
Missing secrets: Settings → Secrets → CLAUDE_CODE_OAUTH_TOKEN
Permission denied: Settings → Actions → Workflow permissions → Read/write
data.json missing: Create it: {"message": "Initial data"}
Let self-repair.yml fix most issues automatically.
Add ideas to TODO.md. The todo-worker.yml workflow reads it regularly, picks feasible tasks, and implements them via PRs.
Trigger manually:
# Let Claude pick best item
gh workflow run todo-worker.yml
# Work on specific item
gh workflow run todo-worker.yml -f force_item="Add Reddit scraper"
# Just plan, don't implement
gh workflow run todo-worker.yml -f mode=planModes:
- implement (default) - Actually builds the feature
- plan - Creates implementation plan without coding
- survey - Organizes and prioritizes all TODOs
Experimental playground for autonomous AI infrastructure. What happens when Claude can:
- Read external data sources
- Modify its own codebase
- Review and merge its own changes
- Attempt to fix its own failures
- Respond to developer requests
Add ideas to TODO.md and Claude will attempt to build them. This is a sandbox for exploring the possibilities and limitations of AI-driven development workflows.
Website: https://jamiew.github.io/claude-gha-demo
The dashboard updates automatically as workflows run and fetch new data.