Write effective tests for code quality and reliability. Use when implementing features, fixing bugs, or improving coverage. Covers unit, integration, and E2E testing.
Give every change a check it can run before calling it done: red-then-green for new logic, a failing-then-passing regression test for bug fixes, or the existing suite for anything else. No change ships without one.
Red-green-observe, not red-green-assume: "confirm it fails" (the Regression workflow item below, and TDD's "watch it fail" step) means actually run the test and read the failure output before touching the fix or the implementation — never reason your way to "this must fail" and skip the run.
Falsifiable done-when: before writing a feature's implementation, state one concrete, checkable condition that defines done — not "should work now," a condition a test or command can confirm or refute.
Evidence over narration: a completion claim is only as good as what it cites — a pasted test-run result, a real exit code, a pushed commit SHA. Describing what the code should now do is not evidence; re-running the check and quoting its output is.
Chrome DevTools (E2E testing):
When writing new logic, default to red-green-refactor:
code-quality.md Two Hats Rule).When TDD is the right default: new business logic, bug fixes (write the regression test first, watch it fail, then fix), and any code with clear input/output contracts.
When it isn't: exploratory spikes, throwaway scripts, UI layout/styling tweaks, and generated boilerplate — write tests after the shape stabilizes instead.
Tests must produce the same result every time — no reliance on wall-clock time, random values, or uncontrolled external state.
Tests must not depend on each other or share mutable state.
Test names describe the behavior under test, not just the function name.
下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer