Lobstermax

OpenClaw

Examples

Three worked prompts that consistently produce good results in OpenClaw.

Example 1 — Fix a bug (minimal diff)

Paste this, then add your logs and file paths.
Goal:
- Fix a bug with a minimal diff.

Context:
- Repo: <path>
- Symptom: <what happens>
- Expected: <what should happen>
- Repro command(s):
  - <command>
- Error/log snippet:
  - <paste>

Constraints:
- Windows PowerShell
- Prefer surgical edits (no refactors unless required)
- Don’t change behavior outside the bug

Deliverable:
- Root cause (2–4 bullets)
- Patch (file + exact before/after)
- Verify (exact commands)

Example 2 — Publish a static site (docs/)

Useful for GitHub Pages repos.
Goal:
- Publish a static site via GitHub Pages.

Context:
- Repo uses:
  - web/ (source)
  - docs/ (published)
- Domain: <domain>

Constraints:
- Provide exact DNS records (A + CNAME) and what to delete if conflicting.
- Ensure docs/CNAME exists and matches the domain.
- Add a publish script to copy web/* → docs/*.

Deliverable:
- GitHub Pages settings (branch/folder)
- GoDaddy DNS records to add/remove
- Commands to build/publish

Example 3 — Add an API endpoint (tests included)

For backend changes that must be verifiable.
Goal:
- Add a new API endpoint.

Context:
- Current API: <routes>
- New endpoint:
  - Method/path: <GET /x>
  - Request: <shape>
  - Response: <shape>

Constraints:
- Backwards compatible
- Input validation
- Add tests

Deliverable:
- Code changes (diff)
- Tests added/updated
- Exact commands to run tests locally