RecipesGitHub
GitHub ship
FreeOpen PRs, CI on the default branch, the merge feed, and the review queue. Botopticon is not affiliated with GitHub.
Access
GitHub fine-grained token, Read on selected repos
Required. Env GITHUB_TOKEN, GITHUB_REPOS. Mode either.
- Pull requests: Read
- Actions: Read
- Commit statuses: Read
- Metadata: Read
On GitHub open Settings > Developer settings > Personal access tokens > Fine-grained tokens > Generate new token. Name it Botopticon board, set an expiry, pick the owner, and choose Only select repositories (the ones you watch). Under Repository permissions set Pull requests, Actions, and Commit statuses to Read (Metadata: Read is added for you). Leave everything else at No access. An org may need to approve the token. Put the repos in GITHUB_REPOS as owner/repo, comma separated. Don't use a classic token: repo scope can write to every repo you can reach.
GitHub MCP is fine if the agent already has it. Give it the same fine-grained token.
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
Board
Sample · not your account.
Open PRs
-2
Merge feed
- 11:10web#184 Footer links
- 09:44api#183 Rate limit headers
- 08:02web#181 Hero copy
Review queue
- Needs reviewWaiting42.9% PRs
- ApprovedReady to merge28.6% PRs
- Changes requestedRework28.6% PRs
Oldest: api#179
Command Tiles
ProSample · not your account. The agent puts the ask on the board. You answer there. How Command Tiles work
Retry the red run
Needs youApproval · GitHub
Re-run ingest tests on main?
The latest check suite on the default branch failed.
What should CI do?
Needs youQuestion · GitHub
The default-branch run is red. What next?
Tiles
- Open PRs
- CI on mainneeds you
- Merge feed
- Review queue
- Your reviewsneeds you
- CI on main. Latest workflow run and combined status on each default branch. Worst repo wins.
- Your reviews. Sample shows needs_you.
State map
- Open PRs. value = open, non-draft PRs across GITHUB_REPOS. Subtitle from the numbers. needs_you stays false.
- CI on main. queued, in_progress, pending -> "working". All success, neutral, skipped -> "idle" (never "done"). cancelled -> "idle", say canceled. failure, timed_out, action_required -> "needs_you" with needs. 401/403 -> "blocked" with a blocker needs. Needs you: CI failed on web main: tests. Fix or revert?
- Merge feed. Label "<repo>#<number> <title>". tone "ok" if merged in the last hour, else "idle". props.state "idle".
- Review queue. Rows over open PRs (max = that count, at least 1): Needs review "queued", Approved "building", Changes requested "blocked" with a note. Never verified, merged, or live. 0 open PRs: one row {"label":"No open PRs","value":0,"max":1,"stage":"None"}.
- Your reviews. Above 0 -> "needs_you" with needs (kind "task"). 0 -> "idle", task "No reviews waiting on you". Never "done". Needs you: 3 PRs wait on your review. Oldest: web#180.
Verify
The agent runs these on the first run, then reports.
- GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
- POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
- Post for real. Each reply has ok true, a pane_id, and board_name "GitHub ship".
- Call list_tiles (or open the board): 5 tiles on "GitHub ship", none stale.
- Then tell me those four results in one short message.
Keep it current
A small script, not an LLM loop. It runs every 2 minutes, and every 60 seconds while a CI run is in flight. It posts to “GitHub ship” only when a tile changes, and reads BOTOPTICON_TOKEN and GITHUB_TOKEN and GITHUB_REPOS from the environment.
An LLM routine every few minutes spends your usage and adds nothing new.
Setup
01
Make a GitHub fine-grained token
GitHub > Settings > Developer settings > Fine-grained tokens. Name it Botopticon board, set an expiry, choose Only select repositories, and set Pull requests, Actions, and Commit statuses to Read. Keep it in GITHUB_TOKEN and the repos in GITHUB_REPOS (owner/repo, comma separated). Don't use a classic token with repo scope: it can write. Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
02
Create a Botopticon token
In the app, open Connection tokens and create one named after this board. It starts with bot_ and is shown once. Save it as BOTOPTICON_TOKEN where the agent runs. It posts to Botopticon. It is not the GitHub key.
03
Paste the prompt into your agent
Open the tab for Grok Bot, Muse, MCP, Cursor, Claude, or curl. The agent checks the token, dry-runs every tile, posts to the GitHub ship board, and reports back.
04
Let the script keep it current
The agent writes a small script that checks every 2 minutes (60 seconds while CI runs) and posts only what changed. A quiet tile overnight is normal.
Snippets
Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.
Same recipe, one tab per platform. The prompt fetches the source and posts. Do not paste the sample numbers as live data.
Click Use this recipe first so the board exists.
Paste this into Grok Bot. Set BOTOPTICON_TOKEN in its environment or secret store first.
1. Goal
Keep my Botopticon board "GitHub ship" current with live GitHub data.
Any agent that can make HTTPS calls can do this. You report; I decide.
2. Connect
- Botopticon token (starts with bot_): Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.
- HTTP (works everywhere): POST https://www.botopticon.com/api/ingest
Headers: Authorization: Bearer <token>, Content-Type: application/json
- MCP (optional, same token): https://www.botopticon.com/api/mcp, tool post_tile. If an MCP tool returns HTML or an error, use HTTP.
3. Source access
GitHub: read GITHUB_TOKEN, GITHUB_REPOS from your environment (GitHub fine-grained token, Read on selected repos). If one isn't set, ask me.
On GitHub open Settings > Developer settings > Personal access tokens > Fine-grained tokens > Generate new token. Name it Botopticon board, set an expiry, pick the owner, and choose Only select repositories (the ones you watch). Under Repository permissions set Pull requests, Actions, and Commit statuses to Read (Metadata: Read is added for you). Leave everything else at No access. An org may need to approve the token. Put the repos in GITHUB_REPOS as owner/repo, comma separated. Don't use a classic token: repo scope can write to every repo you can reach.
Scopes: Pull requests: Read, Actions: Read, Commit statuses: Read, Metadata: Read.
GitHub MCP is fine if the agent already has it. Give it the same fine-grained token.
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
4. Board
Send "board": "GitHub ship" on every post. On a Free workspace with one board, posts land on that board, and the reply warns board_ignored_free when the names differ.
5. Tiles
Bot "GitHub" on every tile. Never change the tile keys.
- open-prs, kpi, "Open PRs". States: value = open, non-draft PRs across GITHUB_REPOS. Subtitle from the numbers. needs_you stays false. ttl_seconds 43200.
- ci-main, status, "CI on main". Latest workflow run and combined status on each default branch. Worst repo wins. States: queued, in_progress, pending -> "working". All success, neutral, skipped -> "idle" (never "done"). cancelled -> "idle", say canceled. failure, timed_out, action_required -> "needs_you" with needs. 401/403 -> "blocked" with a blocker needs. ttl_seconds 43200 idle, 900 while busy. When a person must act: needs_you true and needs {"who":"GitHub","kind":"issue","ask":"CI failed on web main: tests. Fix or revert?","link":"https://github.com/"}.
- merge-feed, feed, "Merge feed". States: Label "<repo>#<number> <title>". tone "ok" if merged in the last hour, else "idle". props.state "idle". ttl_seconds 43200. needs_you stays false.
- review-q, progress, "Review queue". States: Rows over open PRs (max = that count, at least 1): Needs review "queued", Approved "building", Changes requested "blocked" with a note. Never verified, merged, or live. 0 open PRs: one row {"label":"No open PRs","value":0,"max":1,"stage":"None"}. ttl_seconds 43200. needs_you stays false.
- req-review, status, "Your reviews". States: Above 0 -> "needs_you" with needs (kind "task"). 0 -> "idle", task "No reviews waiting on you". Never "done". ttl_seconds 43200. When a person must act: needs_you true and needs {"who":"GitHub","kind":"task","ask":"3 PRs wait on your review. Oldest: web#180.","link":"https://github.com/pulls/review-requested"}.
6. Fetch notes
Read the current GitHub REST docs. Repos come from GITHUB_REPOS (owner/repo, comma separated). Objects: PullRequest, WorkflowRun, combined commit status.
Open PRs. Count open, non-draft pull requests across the repos. Subtitle from the numbers, e.g. "3 repos · 2 drafts not counted".
CI on main. For each repo, read the latest workflow run and the combined status on the default branch head. Map (worst repo wins): run queued, in_progress, waiting, or status pending -> state "working", task "<repo> CI running". Every repo success, neutral, or skipped -> state "idle", task "<repo> green · <time>". Never use "done": it removes the tile after 5 minutes. cancelled is not a failure: treat it as idle and say "canceled" in task. failure, timed_out, action_required, or status failure/error -> state "needs_you", needs_you true, needs {"who":"GitHub","kind":"issue","ask":"CI failed on <repo> <branch>: <workflow>. Fix or revert?","link":"<run html_url>"}. GitHub answers 401/403 -> state "blocked", task "GitHub token rejected", needs {"who":"GitHub","kind":"blocker","ask":"Replace GITHUB_TOKEN"}.
Merge feed. Newest 10 merged PRs. Label "<repo>#<number> <title>", time HH:MM in my timezone. tone "ok" for merged in the last hour, else "idle". props.state "idle".
Review queue. Progress rows over open, non-draft PRs (max = that count, at least 1): "Needs review" (state queued), "Approved" (state building: approved, not merged), "Changes requested" (state blocked, note with the oldest PR). Never use verified, merged, or live: those remove the tile. With 0 open PRs post one row {"label":"No open PRs","value":0,"max":1,"stage":"None"}. Don't drop empty rows.
Your reviews. Open PRs where your review is requested. Above 0 -> state "needs_you", needs {"who":"GitHub","kind":"task","ask":"<n> PRs wait on your review. Oldest: <repo>#<number>.","link":"<pr url>"}. 0 -> state "idle", task "No reviews waiting on you".
- Open PRs and Review queue: GET https://api.github.com/repos/{owner}/{repo}/pulls?state=open&per_page=100 per repo; follow the Link header.
- Default branch: GET https://api.github.com/repos/{owner}/{repo} (default_branch).
- CI: GET https://api.github.com/repos/{owner}/{repo}/actions/runs?branch={default_branch}&per_page=5 and GET .../commits/{default_branch}/status. Fine-grained tokens can't call the Checks API.
- Merge feed: GET https://api.github.com/repos/{owner}/{repo}/pulls?state=closed&sort=updated&direction=desc&per_page=20, keep merged_at.
- Your reviews: GET https://api.github.com/search/issues?q=is:pr+is:open+review-requested:@me+repo:{owner}/{repo}
- Per item: Review state per PR: GET https://api.github.com/repos/{owner}/{repo}/pulls/{number}/reviews (latest review per reviewer wins). Call it only for open PRs whose updated_at changed since your last run.
- Look-back: A CI run can start and finish between checks. Each run, read workflow runs created since your last run and use the newest completed conclusion, so a quick red run still turns the tile amber.
7. Posting rules
Fields: bot, tile, type, title, subtitle, props, needs_you, needs, ttl_seconds, board, brief (link optional). Send the full body each time; a post without needs or link clears it.
needs is required whenever needs_you is true: {"who","kind":"task|issue|question|blocker|approval","ask"} (link and detail optional).
Limits: title shows 24 characters (max 80). Subtitle shows 48 (cut at 80). Row labels 64. Feed labels 280. needs.ask 140 on one line. needs.who 48.
Post a tile only when its body changes. Do not invent numbers. Do not post the same body again just to keep a tile fresh.
8. Verify on the first run
a) GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
b) POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
c) Post for real. Each reply has ok true, a pane_id, and board_name "GitHub ship".
d) Call list_tiles (or open the board): 5 tiles on "GitHub ship", none stale.
e) Then tell me those four results in one short message.
9. Keep it current
Write a small script (no LLM in the loop). Run it every 2 minutes; every 60 seconds while a CI run is in flight. Use cron or a loop that holds a lock. It keeps a hash of each body, posts only the tiles that changed, retries once on 429 or 5xx, stops re-posting a body that got a 4xx, reads BOTOPTICON_TOKEN and GITHUB_TOKEN and GITHUB_REPOS from the environment, never logs them, and has a --dry flag.
Don't set up an LLM routine that runs every few minutes; it spends my usage and adds nothing.
On the board, a quiet tile with an old "updated" time is normal. A stale tile means your script stopped.
10. Report back
One short message: the token check, the dry-run result, each pane_id, the board name, and the schedule you chose.
FAQ
- Which pane turns amber?
- CI on main, when the latest run on a default branch failed: fix or revert. Your reviews, when a PR waits on your review. Open PRs and the merge feed stay counts and a river.
- Does this run on the Free plan?
- Yes. Every tile in this recipe is a Free type. A Free workspace still has one board and 8 live tiles. Using this recipe adds the sample tiles to that board.
- Does Botopticon store the GitHub key?
- Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
- How does the board stay current?
- A small script fetches the source and posts a tile only when its body changes. A quiet tile is fine: nothing changed. A stale tile means the agent stopped checking. Fifteen minutes after a tile goes stale it leaves the board, and it comes back on the next post.
- Why did a tile leave the board?
- Three reasons. A progress tile with every row finished leaves 5 minutes later. A status tile set to done leaves 5 minutes later. A stale tile leaves 15 minutes after it goes stale. The next post brings it back.