Claude-skill-registry lambda-workflow
One lifecycle for Lambda repos: choose a bd task, start work, land the PR, and watch GitHub via Dumbwaiter MCP until it merges.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/lambda-workflow" ~/.claude/skills/majiayu000-claude-skill-registry-lambda-workflow && rm -rf "$T"
skills/data/lambda-workflow/SKILL.mdLambda Workflow
Use this skill whenever you touch delivery end-to-end—from grabbing a bd issue through merge/closure. Each phase builds on the last; do not skip ahead unless a human explicitly says so.
Lifecycle Map
- Select & Claim Work – pick an unblocked bd issue, understand scope, and claim it
- Kick Off & Draft – baseline tests, branch, and open a draft PR immediately so CI starts.
- Build & Validate – implement with tests-first habits, keeping trackers and notes fresh.
- Land the Plane – ready-for-review PR with full test/QA + repo hygiene.
- Monitor & Respond – use the Dumbwaiter MCP to wait on GitHub signals (checks, reviews, comments, merge) and react.
- Close the Loop – sync bd/dcos, close the issue, and record proof the change stuck.
1. Select & Claim the bd Task
- If
is missing (fresh clone, new worktree, etc.), run.beads/beads.db
from the repo root so the local database hydrates frombd init --json
before listing work..beads/issues.jsonl - You may be handed a task: if so, choose that one. Otherwise, run
before asking for work; respect blockers/dependencies, pick the first ready task and claim it.bd ready --json -n 0
.bd update <id> --status in_progress --notes "Starting work on ${task description}" - Commit the issues.jsonl changes immediately on main and push. This avoids multiple agents pulling the same task. If you get a conflict, revert the issues.jsonl changes, pull with rebase, and try again.
- Read the issue (and linked docs) end-to-end. Confirm acceptance criteria, implicit contracts, and dependent tasks. It is possible it is in a partially complete state: if so, pick up where it was left off.
- Clarify gaps before coding. Update the bd ticket with questions or new discoveries so history lives in
. Again, push these changes (and only these changes) directly to main..beads/issues.jsonl
2. Kick Off & Draft the PR
- Baseline the repo
- Sync with
andgit fetch --all
.git pull --rebase origin main - Run the project’s test suite. If it fails on
, stop and escalate instead of piling on.main
- Sync with
- Branch + tooling
- Create a fresh branch (
). Never work directly ongit checkout -b <short-task-name>
.main - Verify
(or equivalent) so PR automation works later.gh auth status
- Create a fresh branch (
- Immediate draft PR
- Push the branch and open a draft PR sourced from the bd summary/acceptance criteria, including any questions or underspecified areas.
- Preferred helper:
. Be wary of quoting issues, it's easy to end up with "\n" characters in the PR.gh pr create --draft --title "..." --body-file body.md - Capture acceptance criteria + planned tests in the PR body so reviewers know how you’ll prove success.
- Plan validation
- Decide which automated + manual tests will prove the work. Note the plan in bd or the PR so it is reviewable before implementation.
3. Build & Validate Continuously
- Keep
clean; commit coherent checkpoints and push often so the draft PR reflects reality. Pull and rebase over origin/main before pushing each time.git status -sb - Treat failing feedback as a test design task:
- Write or extend a failing test that reproduces the bug/regression (default to
or integration coverage when stateful sh loops).proptest! - Run the suite, commit/push the red test alone.
- Fix the bug in a follow-up commit, push, and reply to the review thread with the fixing hash/summary.
- Write or extend a failing test that reproduces the bug/regression (default to
- Strip debug aids (
,dbg!
, temporary flags) before moving to landing.println! - For transactional upgrade/apply loops, add coverage that proves: atomic rollback on failure, lockfile sync after success, cross-device safety (rename EXDEV), and symlink preservation.
- You will commonly discover unexpected tasks while building; if they are directly necessary for the success of this task, add a bd subtask blocking this task and work on it first, on the same PR. If they are not, add them as discovered-from tasks in bd and continue, they can be done in the next round.
4. Land the Plane (Ready for Review)
-
Quality gates
- Run the full suite (tests, linters, formatters) on the feature branch to a green state after your last rebase.
- Add or expand tests until every change path is covered.
-
Repo hygiene
- Remove throwaway files, logs, and manual scripts. Ensure
keeps artifacts out..gitignore - Rebase on the latest
, squash/reorder into meaningful commits, and confirm no stray stashes remain (main
). Make sure you only squash/reorder your commits! Commits must all be rebased on top of origin/main.git stash list
- Remove throwaway files, logs, and manual scripts. Ensure
-
PR
- Flip the draft PR to Ready using
once all our tests pass, and we think the acceptance criteria are met. Close the bd task now, update bd notes with the PR URL, testing evidence, and any deviations from the original plan, and push.gh pr ready - Update the PR body with: summary, testing notes, linked bd issue, and known follow-ups.
- Trigger automated review with a comment containing exactly
; reply inline to every Codex comment with the commit hash that fixes it.@codex review
- Flip the draft PR to Ready using
-
Tracking
5. Monitor & Respond with Dumbwaiter MCP
Once the PR is Ready, hand monitoring to the Dumbwaiter MCP so you don’t poll GitHub manually.
-
Start a wait (via MCP tools or
):mcp__dumbwaiter__wait.start{ "provider": "github", "selector": { "owner": "ORG", "repo": "REPO", "pr": 123 }, "condition": "checks_succeeded" }Capture the returned
.wait_id -
Await completion
- Call
with thatwait.await
to stream progress notifications (check statuses, workflow runs, etc.).wait_id - Use other conditions as needed:
,pr_merged
,checks_failed
(plus filters),comment_received
, orchanges_requested
.workflow_completed - If you only need polling, call
on an interval; cancel viawait.status
if superseded.wait.cancel
- Call
-
React to outcomes
- On green checks → post the success +
back to bd/PR notes.wait_id - On failures or change requests → surface the failing context and return to step 3.
- For comment streams, enable
withcondition: "comment_received"
so every new review/comment notifies you in real time.filters.since - On merge, we're done, report success to user.
- On approval: if we got approval and we are in ready-for-review and all the checks are passing and we are rebased on top of origin/main, we are also done, but in this case we should report back to the user that the PR can now be merged, along with the URL of the PR for easy access. If everything but the rebasing is done, we can rebase and try again, again commenting "@codex review" after the commit lands and the tests pass in CI.
- On green checks → post the success +
-
Background durability
- Set
andDUMBWAITER_DB
if you need waits to survive process restarts. Always log theDUMBWAITER_WATCHER=1
in bd so another agent can resume withwait_id
.wait.status
- Set
6. Close the Loop
- After Dumbwaiter reports
, archive local branches/stashes so the next effort starts clean.pr_merged
Following this workflow keeps the entire Lambda lifecycle observable: bd reflects intent, GitHub shows work-in-progress via draft PRs, Ready PRs meet the landing checklist, and Dumbwaiter MCP watches the PR until it merges.