Skip to content

Commit 4fb6835

Browse files
authored
Merge pull request #63 from udecode/add-claude-github-actions-1769772577974
2 parents 20857aa + d85ae7d commit 4fb6835

10 files changed

Lines changed: 569 additions & 0 deletions

File tree

.claude/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
## GitHub
1515

1616
- Your primary method for interacting with GitHub should be the GitHub CLI.
17+
- Unless in GitHub issues, before DONE, use AskUserQuestion: "Ready to commit?" → if yes, git add/commit/push/PR. Never run those otherwise.
1718

1819
## Plans
1920

.claude/commands/brainstorm.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
description: Explore requirements through Q&A before planning
3+
---
4+
5+
/workflows:brainstorm $ARGUMENTS

.claude/commands/lfg.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: lfg
3+
description: Full autonomous engineering workflow
4+
argument-hint: "[feature description]"
5+
---
6+
7+
Run these slash commands in order. Do not do anything else.
8+
9+
1. `/ralph-wiggum:ralph-loop "finish all slash commands" --completion-promise "DONE"`
10+
2. `/workflows:plan $ARGUMENTS`
11+
3. `/compound-engineering:deepen-plan`
12+
4. `/workflows:work`
13+
5. `/changeset`
14+
6. `/workflows:review`
15+
7. `/compound-engineering:resolve_todo_parallel`
16+
8. `/compound-engineering:test-browser`
17+
9. Output `<promise>DONE</promise>` when video is in PR
18+
19+
## Overrides (apply to ALL commands above)
20+
21+
**plan:**
22+
23+
- Final checklist/acceptance criteria: include test-browser if any browser-based features
24+
25+
**deepen-plan:**
26+
27+
- Context7: only query when not covered by skills
28+
29+
**work:**
30+
31+
- Task loop: For UI tasks, run test-browser BEFORE marking complete (don't guess - verify visually)
32+
- Never mark UI task complete without browser verification
33+
34+
**review:**
35+
36+
- performance-oracle: don't over-engineer, ship fast, keep simple
37+
38+
**feature-video:**
39+
40+
- Prefer PR comment over description update if PR already open
41+
42+
Start with step 1 now.

.claude/commands/plan.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
description: Create implementation plan from requirements
3+
---
4+
5+
Run these commands in order:
6+
7+
1. `/workflows:plan $ARGUMENTS`
8+
2. `/compound-engineering:deepen-plan`: Context7: only query when not covered by skills

.claude/commands/review.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Review code and update PR with feedback
3+
---
4+
5+
Run these commands in order:
6+
7+
1. `/workflows:review $ARGUMENTS`
8+
2. `/compound-engineering:resolve_todo_parallel`
9+
3. `/compound-engineering:test-browser`
10+
11+
- performance-oracle: don't over-engineer, ship fast, keep simple

.claude/commands/work.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Implement changes based on plan or requirements
3+
---
4+
5+
Run these commands in order:
6+
7+
1. `/workflows:work $ARGUMENTS`
8+
2. `/changeset`
9+
10+
- Task loop: For UI tasks, run test-browser BEFORE marking complete (don't guess - verify visually)
11+
- Never mark UI task complete without browser verification
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
7+
jobs:
8+
claude-review:
9+
if: github.event.pull_request.user.login == 'zbeyens'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
issues: write
15+
id-token: write
16+
actions: read
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 1
23+
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: latest
28+
29+
- name: Cache bun
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.bun/install/cache
33+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-bun-
36+
37+
- name: Install dependencies
38+
run: bun install
39+
40+
- name: Run Claude Code Review
41+
uses: anthropics/claude-code-action@v1
42+
with:
43+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
44+
45+
prompt: /review
46+
track_progress: true
47+
48+
plugin_marketplaces: |
49+
https://github.com/EveryInc/compound-engineering-plugin.git
50+
https://github.com/udecode/dotai.git
51+
plugins: |
52+
compound-engineering@every-marketplace
53+
dig@dotai
54+
debug@dotai
55+
test@dotai
56+
57+
settings: |
58+
{
59+
"env": {
60+
"BASH_DEFAULT_TIMEOUT_MS": "1800000"
61+
},
62+
"permissions": {
63+
"allow": ["Bash", "Edit", "Glob", "Grep", "Read", "Task", "Write", "WebFetch", "WebSearch"]
64+
}
65+
}
66+
claude_args: |
67+
--max-turns 1000
68+
69+
additional_permissions: |
70+
actions: read
71+

.github/workflows/claude.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
# Interactive mode - responds to @claude mentions with tracking comments
15+
claude:
16+
if: |
17+
github.actor == 'zbeyens' && (
18+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
19+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
20+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
21+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
22+
)
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
issues: write
28+
id-token: write
29+
actions: read
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 1
35+
36+
- name: Setup Bun
37+
uses: oven-sh/setup-bun@v2
38+
with:
39+
bun-version: latest
40+
41+
- name: Cache bun
42+
uses: actions/cache@v4
43+
with:
44+
path: ~/.bun/install/cache
45+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
46+
restore-keys: |
47+
${{ runner.os }}-bun-
48+
49+
- name: Install dependencies
50+
run: bun install
51+
52+
- name: Run Claude Code
53+
uses: anthropics/claude-code-action@v1
54+
with:
55+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
56+
57+
# No prompt = interactive mode with tracking comments
58+
59+
plugin_marketplaces: |
60+
https://github.com/EveryInc/compound-engineering-plugin.git
61+
https://github.com/udecode/dotai.git
62+
plugins: |
63+
compound-engineering@every-marketplace
64+
dig@dotai
65+
debug@dotai
66+
test@dotai
67+
68+
settings: |
69+
{
70+
"env": {
71+
"BASH_DEFAULT_TIMEOUT_MS": "1800000"
72+
},
73+
"permissions": {
74+
"allow": ["Bash", "Edit", "Glob", "Grep", "Read", "Task", "Write", "WebFetch", "WebSearch"]
75+
}
76+
}
77+
claude_args: |
78+
--max-turns 1000
79+
80+
additional_permissions: |
81+
actions: read
82+
83+
# Automation mode - responds to /commands
84+
slash-commands:
85+
if: |
86+
github.actor == 'zbeyens' && (
87+
(github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/')) ||
88+
(github.event_name == 'pull_request_review_comment' && startsWith(github.event.comment.body, '/'))
89+
)
90+
runs-on: ubuntu-latest
91+
permissions:
92+
contents: write
93+
pull-requests: write
94+
issues: write
95+
id-token: write
96+
actions: read
97+
steps:
98+
- name: Checkout repository
99+
uses: actions/checkout@v4
100+
with:
101+
fetch-depth: 1
102+
103+
- name: Setup Bun
104+
uses: oven-sh/setup-bun@v2
105+
with:
106+
bun-version: latest
107+
108+
- name: Cache bun
109+
uses: actions/cache@v4
110+
with:
111+
path: ~/.bun/install/cache
112+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
113+
restore-keys: |
114+
${{ runner.os }}-bun-
115+
116+
- name: Install dependencies
117+
run: bun install
118+
119+
- name: Run Claude Code
120+
uses: anthropics/claude-code-action@v1
121+
with:
122+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
123+
124+
# Pass comment body for slash commands
125+
prompt: ${{ github.event.comment.body }}
126+
track_progress: true
127+
128+
plugin_marketplaces: |
129+
https://github.com/EveryInc/compound-engineering-plugin.git
130+
https://github.com/udecode/dotai.git
131+
plugins: |
132+
compound-engineering@every-marketplace
133+
dig@dotai
134+
debug@dotai
135+
test@dotai
136+
137+
settings: |
138+
{
139+
"env": {
140+
"BASH_DEFAULT_TIMEOUT_MS": "1800000"
141+
},
142+
"permissions": {
143+
"allow": ["Bash", "Edit", "Glob", "Grep", "Read", "Task", "Write", "WebFetch", "WebSearch"]
144+
}
145+
}
146+
claude_args: |
147+
--max-turns 1000
148+
149+
additional_permissions: |
150+
actions: read
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
date: 2026-01-30
3+
topic: github-slash-commands
4+
---
5+
6+
# GitHub Slash Commands for Claude Code Action
7+
8+
## What We're Building
9+
10+
GitHub Actions-based slash commands that allow commenting `/lfg`, `/brainstorm`, `/plan`, `/work`, `/review` on PRs/issues to trigger Claude workflows.
11+
12+
**Commands:**
13+
14+
| Command | Purpose | Auto-commit? | Output |
15+
|---------|---------|--------------|--------|
16+
| `/lfg` | Full autonomous workflow | Yes | Branch + PR link |
17+
| `/brainstorm` | Explore requirements | No | Questions/answers in comments |
18+
| `/plan` | Create implementation plan | No | Plan in comment |
19+
| `/work` | Implement changes | Yes | Branch + PR link |
20+
| `/review` | Review code, update PR | Yes | Review comments, PR updates |
21+
22+
## Why This Approach
23+
24+
**Considered:**
25+
- A: Separate commands (5 files) - **chosen**
26+
- B: Single command with args - less discoverable
27+
- C: Workflow + helpers - unclear separation
28+
29+
**Chose A because:**
30+
- Each command has distinct purpose/permissions
31+
- Easy to iterate on individually
32+
- Matches mental model of stepwise workflow
33+
34+
## Key Decisions
35+
36+
1. **Flexible ordering**: Any command works anytime. Auto-detects context from previous comments
37+
2. **Auto-commit for code-producing commands**: `/lfg`, `/work`, `/review` auto-commit. `/brainstorm`, `/plan` don't
38+
3. **PR creation**: Default Claude behavior - pushes branch, provides pre-filled PR link. User clicks to create
39+
4. **Context detection**: Claude reads previous comments in thread to understand state
40+
41+
## Implementation Details
42+
43+
### Files to Create
44+
45+
```
46+
.claude/commands/
47+
├── brainstorm.md # /brainstorm - explore requirements
48+
├── plan.md # /plan - create implementation plan
49+
├── work.md # /work - implement changes
50+
└── review.md # /review - code review + PR update
51+
```
52+
53+
Note: `/lfg` already exists in `.claude/commands/lfg.md`
54+
55+
### Workflow File Updates
56+
57+
Existing `.github/workflows/claude.yml` handles `@claude` mentions.
58+
Slash commands are detected automatically from `.claude/commands/` directory.
59+
60+
### Command Template Structure
61+
62+
```markdown
63+
---
64+
description: Brief description
65+
allowed-tools: Bash(gh:*),Bash(bun:*),Edit,Read,Write
66+
---
67+
68+
[Instructions for Claude]
69+
```
70+
71+
## Open Questions
72+
73+
- None remaining - ready for planning
74+
75+
## Next Steps
76+
77+
`/workflows:plan` for implementation details

0 commit comments

Comments
 (0)