Add start-hackbot skill - #6392
Open
sylvestre wants to merge 2 commits into
Open
Conversation
A Claude Code skill documenting how to start the hackbot services locally: the API (hackbot-api), the web UI (hackbot-ui), and the pulse listener, plus a quick stub-backed UI demo and a recipe for validating alembic migrations against a throwaway Postgres.
There was a problem hiding this comment.
Pull request overview
Adds a Claude Code skill document for running Hackbot locally (hackbot-api, hackbot-ui, and the pulse listener), including a “quick local UI demo” and an Alembic migration validation recipe.
Changes:
- Introduces
.claude/skills/start-hackbot/SKILL.mdwith local run instructions for hackbot-api, hackbot-ui, and hackbot-pulse-listener. - Documents a stub-backed UI demo flow and related environment variables.
- Adds a step-by-step method to validate Alembic migrations against a throwaway local Postgres using offline SQL.
Comments suppressed due to low confidence (3)
.claude/skills/start-hackbot/SKILL.md:37
- The described stub API supports an
authorfilter and uses/runs/{id}in the path, but hackbot-api’s list-runs endpoint only supportsagent/statuspluslimit/offset, and the run identifier is consistently calledrun_id. Keeping these aligned will prevent confusion when swapping between the stub and real API.
1. **Stub API** — a small stdlib HTTP server that serves `GET /agents`, `GET /runs`
(honoring `agent`/`status`/`author`/`limit`/`offset`), and `GET /runs/{id}` with seeded
fake runs. It lives at `services/hackbot-ui/dev/stub_api.py`; run it on :8080:
.claude/skills/start-hackbot/SKILL.md:68
- This section gives concrete instructions for implementing an authentication bypass in committed code paths. Even with the warning, documenting a bypass pattern here increases the risk it gets cargo-culted or accidentally shipped. Since hackbot-ui has no built-in bypass, it’s safer to document only the supported approach (configure a local Google OAuth client).
**Skipping Google OAuth locally.** The codebase has no auth bypass. If you don't want to
configure an OAuth client for a throwaway demo, add a temporary, env-gated bypass yourself
(and never commit it): short-circuit `middleware.ts` and `getAuthedEmail()` in `lib/session.ts`
when a `DEV_AUTH_EMAIL` env var is set, and fall back to `NEXT_PUBLIC_DEV_AUTH_EMAIL` for the
client identity in `components/RecentRuns.tsx`. Because they key off env vars that are unset in
production, they stay inert there — but keep them out of committed branches.
.claude/skills/start-hackbot/SKILL.md:70
- Using
pkill -fis overly broad and can terminate unrelated processes (including other Next.js dev servers). It’s safer to instruct stopping via Ctrl+C in the terminals running the stub/UI.
Stop: `pkill -f stub_api.py; pkill -f "next dev"`.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Pick the path that matches the request: | ||
|
|
||
| - **"Try the UI / see the dashboard" without GCP creds** → [Quick local UI demo](#quick-local-ui-demo). Fastest; no Cloud SQL / GCP / Google OAuth needed. |
Comment on lines
+35
to
+41
| 1. **Stub API** — a small stdlib HTTP server that serves `GET /agents`, `GET /runs` | ||
| (honoring `agent`/`status`/`author`/`limit`/`offset`), and `GET /runs/{id}` with seeded | ||
| fake runs. It lives at `services/hackbot-ui/dev/stub_api.py`; run it on :8080: | ||
|
|
||
| ```bash | ||
| python3 services/hackbot-ui/dev/stub_api.py # listens on 127.0.0.1:8080 | ||
| ``` |
Comment on lines
+60
to
+62
| Open http://localhost:3000 and sign in with a `@mozilla.com` Google account. The stub then | ||
| backs every run the UI reads (filtering, "My runs" vs "All runs", the author column, etc.). | ||
|
|
- Drop the auth-bypass recipe: point at registering a throwaway OAuth client
instead, so nothing here nudges anyone toward shipping a bypass.
- Stop claiming the quick demo needs no Google OAuth; it does.
- Describe the demo in terms of what the stub actually serves (read-only GETs),
and note HACKBOT_DEV_USER plus what to do if the stub isn't in the checkout.
- Replace the broad pkill with Ctrl+C, and use {run_id} for the path param.
- Run prettier over the file.
suhaibmujahid
approved these changes
Jul 27, 2026
|
|
||
| The UI talks only to the API (server-side, via `X-API-Key`); the API owns the DB, GCS, and Cloud Run Jobs. | ||
|
|
||
| Pick the path that matches the request: |
Member
There was a problem hiding this comment.
If we have it as a Docker Compose for this, all we need it to fill a .env.example file with real values? That would simplify the instructions. I fill file it as a followup.
|
|
||
| 1. **Stub API** — a small stdlib HTTP server that serves `GET /agents`, `GET /runs` | ||
| (honoring `agent`/`status`/`author`/`limit`/`offset`), and `GET /runs/{run_id}` with seeded | ||
| fake runs. It lives at `services/hackbot-ui/dev/stub_api.py`; run it on :8080: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Claude Code skill documenting how to start the hackbot services locally: the API (hackbot-api), the web UI (hackbot-ui), and the pulse listener, plus a quick stub-backed UI demo and a recipe for validating alembic migrations against a throwaway Postgres.