بنقرة واحدة
diag
Disciplined bug-diagnosis loop. Reproduce → minimise → hypothesise → instrument → fix → regression-test.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Disciplined bug-diagnosis loop. Reproduce → minimise → hypothesise → instrument → fix → regression-test.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Core working-language policy for this harness. Think in English, deliver in Chinese.
Recipe for filling state/reference/ENV.md when the project is an Android app. Use when the project has a build.gradle / settings.gradle and targets Android. Covers emulator boot, gradle test/connectedAndroidTest, adb logcat capture.
Recipe for filling state/reference/ENV.md when the project is a backend service (API, worker, daemon). Use when the project ships a server but no UI; covers compose-based DB/cache, pytest/jest test runners, and container log capture. Adjust language ecosystem (Python/Node/Go/etc.) accordingly.
Recipe for filling state/reference/ENV.md when the project is a web app (frontend or full-stack). Use when the project serves HTTP, has a dev server, or runs in a browser. Adjust package manager (pnpm/npm/yarn/bun) and test runner to match the project.
Pre-implementation alignment grill. Forces the agent to ask sharp questions before writing code on a non-trivial change.
Zoom out before zooming in. Read the surrounding system before changing an unfamiliar piece of code.
| name | diag |
| description | Disciplined bug-diagnosis loop. Reproduce → minimise → hypothesise → instrument → fix → regression-test. |
借鉴 mattpocock/skills 的 /diagnose. 当 verify 红了、有人报 bug、或者你"看起来好了但不放心"时用。
反模式:直接看代码"猜"原因然后改三个地方一起跑。不许。
pnpm test src/auth/redirect.test.ts、curl -X POST …、UI 步骤序列。state/evidence/<task-id>/repro.md。H1: redirect 没 origin-check,外部 host 直接通过 → 应该 401 / 改写
H2: searchParams 在 SSR 拿到的是 undefined → fallback 错误
H3: middleware 顺序问题,redirect 在 auth 之前
按"如果错了,最先要修的"排序,不是按"我觉得最像的"。
state/reference/ENV.md → Capture logs 的方法抓证据。state/evidence/<task-id>/:日志、截图、trace、curl 输出。每次 diag 结束,JOURNAL.md 追加:
**Did (diag):**
- Repro: `<cmd>`
- Min set: <最小集合>
- Hypotheses: H1✓ H2✗ H3✗ (证据见 state/evidence/<task-id>/)
- Fix: <one-line>
- Regression: <test path>