Install
openclaw skills install code-workflow4-stage workflow for code changes: research → plan → user review → implement (TDD). Topics — steps (Step 0-3: resume check + research + plan + user review + branch), implement (Step 4: TDD cycle + test level + build verify + commit), pr (capture + PR creation with image/WebP/GIF/video). Applies to issue implementation, tracked task items, new feature additions. TDD default in implement (opt out --no-tdd). github-flow auto-companion for GitHub repos (plan-to-issue / dependencies / pr / merge). Use when: "coding workflow", "research plan implement", "write plan", "plan md", "user review", "code plan", "implementation process", "code changes", "PR with screenshots", "pull request", "capture and PR".
openclaw skills install code-workflowA Research → Plan → User Review → Implement 4-stage procedure for code change tasks.
| Option | Default | Description |
|---|---|---|
output-dir | docs/generated/ | Directory for research/plan files. Set per project (e.g., .ralph/docs/generated/) |
Set via project CLAUDE.md or skill invocation argument:
/code-workflow --output-dir docs/generated/
Trivial tasks such as simple configuration changes or 1~2 line edits may skip this workflow.
| Topic | Description | Guide |
|---|---|---|
| implement | Step 4: TDD cycle, test level selection, build & commit | implement.md |
| pr | Capture + PR creation with visual attachments | pr.md |
| steps | Steps 0-3: resume check, research, plan, user review, branch | steps.md |
code-workflow (steps 0-4)
├─→ steps Step 0: GitHub repo detection → loads github-flow as default companion
├─→ steps Step 0: github-flow/dependencies (blockedBy precondition check on linked issue)
├─→ tdd/cycle (step 4: TDD implementation)
├─→ tdd/run (step 4: test execution after implementation)
├─→ github-flow/plan-to-issue (auto-trigger when task has linked issue number)
├─→ github-flow/dependencies (auto-trigger when plan frontmatter has `chain:`)
├─→ github-flow/pr (optional: create PR with visual attachments)
│ └─→ web-ui-test (capture via Playwright)
└─→ github-flow/merge (after PR ready: gates CI/Review/Test Plan/blockedBy)
git remote get-url origin contains github.com, github-flow becomes the default companion — issue/PR/merge ops route through its topics. Non-GitHub remotes fall back to manual gh/gitblockedBy is queried. OPEN predecessors → switch task or BLOCKED reportgithub-flow/plan-to-issue: converts plans to GitHub issues. Auto-trigger when the task has a linked issue number (e.g., Issue #176). Manual trigger when user explicitly requests issue registrationgithub-flow/dependencies: applies chain: frontmatter as native Issue Dependencies. Auto-trigger when plan has chain: array. Skipped for single-issue plansgithub-flow/pr (optional, opt-in only): creates PRs. Invoke ONLY when the user explicitly requests PR creation (e.g., "create PR", "open PR"). Never auto-trigger from Step 4 completiongithub-flow/merge (after PR ready): pre-merge gates include blockedBy open-predecessors check (see dependencies.md and merge.md step 3.5)tdd is applied by default in step 4. Opt-out with --no-tddresearch-<N>-<slug>.mdSee steps.md.
push and github-flow/pr require explicit user instruction (e.g., "push", "create PR"). PR creation is publish to GitHub and cannot be silently undone; reporting completion does not authorize it (HARD STOP).See implement.md.
--no-captureSee pr.md.
| Task Complexity | Scope |
|---|---|
| trivial (1~2 line edits, config value changes) | Can be skipped — implement directly |
| moderate (3~10 files, logic changes) | Start from step 2 (plan) |
| complex (10+ files, new features, architecture changes) | Perform all steps from step 1 (research) |
Cases where skipping is prohibited even if the line count is small (HARD STOP):
git fetch origin and primary-branch confirmation are required before branch creation.