- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| examples | ||
| gate | ||
| action.yml | ||
| fetch-images.sh | ||
| prompt.md | ||
| README.md | ||
| review.md | ||
bot
A personal development bot for my repositories. Label an issue ready and it picks it up. If it needs answers, it asks in the issue and waits. Reply, and it carries on. When it's done it opens a pull request, and it responds to review comments on that pull request. It never merges.
It runs in each project's GitHub Actions as my own GitHub App, using claude-code-action in prompt mode with a Claude subscription token.
How a thread moves
| Label | Meaning | Set by |
|---|---|---|
ready |
Handed to the bot. Adding it starts a run. | me |
bot:working |
A run is on it. | bot |
bot:waiting |
The bot asked something. My next comment resumes it. | bot |
bot:pr |
The bot opened a pull request. Further work happens there. | bot |
bot:blocked |
The bot can't do it here (secrets, a browser, too big) and said why and what would unblock it. A reply resumes it. | bot |
bot:failed |
A run crashed, timed out, or ended without a word. Commenting retries it. | bot |
Every run ends with something in the thread. If Claude doesn't post, the action does.
The bot acknowledges within seconds: the gate reacts 👀 to my comment (or to the issue or pull request, for a label or a review). When the run ends, that becomes 👍 if it reported or 😕 if it failed. The result itself is a new comment, so it still notifies.
What starts a run (everything else is ignored by gate):
- I add
readyto an issue. - I comment on an issue labelled
bot:waiting,bot:blockedorbot:working. - I comment on, or review, a pull request labelled
bot:pr. - I comment
/reviewon a pull request labelledbot:pr. That run reviews the pull request against the project's own checklist (review-prompt, for example its review prompt file) and posts numbered findings. It changes nothing: my reply saying which findings to fix is an ordinary comment, and the next run does the fixing. Reviews only run when I ask, so a pull request that's still in progress doesn't use up a review.
Runs are one at a time per issue or pull request. The thread is the bot's only memory: each run rereads it. How the bot behaves is in prompt.md. Each project's own CLAUDE.md decides how it builds, tests and writes pull requests.
Files
gate/action.yml: decides from the event whether to run, and on which branch. Runs before any project setup, so ignored comments cost seconds.action.yml: mints the app token, sets labels, checks out the branch, and runs Claude with the prompt.fetch-images.sh: downloads the thread's screenshots before Claude starts, since a private repo's attachments need auth. Up to 20 images, 10 MB each.prompt.md: the bot's instructions.review.md: the instructions for a/reviewrun, placed before the project's checklist.examples/bot.yml: the workflow a project copies.
Setup (once)
- Create the GitHub App (Settings → Developer settings → GitHub Apps → New). Give it a name and avatar. Turn the webhook off. Set repository permissions: Contents, Issues and Pull requests read & write; Metadata read. Leave Workflows off, so it can't edit
.github/workflows. "Only on this account." - Generate a private key, and note the app's client ID.
- Install the app on each project repository (not this one).
- Let other repositories use this one's actions: Settings → Actions → General → Access → "Accessible from repositories owned by the user".
- Run
claude setup-tokenlocally for the subscription token.
Adding a project
- Repo secrets:
BOT_CLIENT_ID,BOT_PRIVATE_KEY,CLAUDE_CODE_OAUTH_TOKEN. - Copy
examples/bot.ymlto.github/workflows/bot.yml. Add the project's setup steps (the same ones as CI), and allow its check commands inallowed-tools. To enable/review, setreview-promptto the project's review checklist. - Labels are created on the first run.
Limits
- It can't push to forks, and it has no production secrets.
- Runs use Actions minutes and the subscription's usage. The job's
timeout-minutesis the cap.