Three worked prompts that consistently produce good results in OpenClaw.
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)
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
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