Skip to content

MinLeeV5/devkeel / .harness/skills/systematic-debugging

systematic-debugging

Verified

系统化诊断和修复 Bug、测试或构建失败、异常行为、集成故障与性能回归。先建立可判定的反馈信号、追踪根因并逐一验证可证伪假设;仅在现有错误、测试、日志、diff、debugger 或 profiler 无法区分假设,且临时写入已获授权时使用定向 HTTP 插桩。

FileKindSize
SKILL.mdskill md4.0 KB
agents/openai.yamlconfig236 B
assets/Hdbg.javaother3.6 KB
assets/hdbg-node.cjsscript1.2 KB
assets/hdbg-web.jsscript1.3 KB
references/diagnosis.mdmarkdown3.7 KB
references/instrumentation.mdmarkdown2.6 KB
references/java8-http.mdmarkdown1.3 KB
references/javascript-http.mdmarkdown2.3 KB
scripts/bootstrap.jsscript1.1 KB
scripts/cleanup.jsscript12.0 KB
scripts/debug-server.jsscript10.9 KB

references/javascript-http.md

View on GitHub
# JavaScript 与 Electron HTTP emitter

仅在插桩升级门禁通过且目标运行时属于 Browser、Node.js 或 Electron 时读取。

## 选择模板

| 运行时 | 模板 | 默认通道 |
|---|---|---|
| Browser | `assets/hdbg-web.js` | `fetch` |
| Node.js | `assets/hdbg-node.cjs` | `http.request` |
| Electron main | `assets/hdbg-node.cjs` | `http.request` |
| Electron renderer | `assets/hdbg-web.js` | `fetch` |
| Electron preload | `assets/hdbg-web.js` | `fetch` |

TypeScript 不使用单独 emitter:先按实际运行时选择上表模板。Browser、renderer 与 preload
探针可调用 `(globalThis as any).__hdbg(event, data)`,或增加一个随 session 清理的最薄全局类型
声明;Node.js 与 Electron main 按项目现有 ESM/CJS 规则导入 `hdbg-node.cjs`,必要时增加临时
`.d.ts` 或 typed wrapper。适配层只解决编译期类型和模块互操作,不复制 HTTP 发送逻辑。

复制模板到目标项目的临时 helper,替换 `__HDBG_ENDPOINT__`、`__HDBG_SESSION__` 和
`__HDBG_RUNTIME__`,并把 helper 路径登记到 session manifest。业务代码只保留单行调用:

```js
/*HDBG:7kx2*/ __hdbg("save:before", { id, state });
```

先发送 `smoke` 事件并在 collector 中确认 runtime/session,再添加其他探针。helper 返回的请求可以
被测试等待,但业务路径不得 `await` 它。

## Electron

main 直接使用 Node 模板;renderer 与 preload 优先使用 Web 模板直连 collector。不要因为临时
调试关闭 `webSecurity`、sandbox、context isolation 或放宽生产 CSP。

只有 direct HTTP 已被 CSP、sandbox、mixed-content 或应用网络策略实证阻止时,才使用窄转发:

```text
renderer/preload --IPC(debug-event)--> main --HTTP--> collector
```

IPC payload 只允许 session、event 和有界 data;main 校验来源与 session 后调用 Node helper。
不要把 `ipcRenderer` 或任意 HTTP 能力整体暴露给页面。collector 协议和查询方式保持不变。

## 低扰动要求

- endpoint 必须可覆盖;容器或远程目标不能假设 `127.0.0.1` 指向宿主 collector;
- 序列化、CSP、连接和超时错误必须在 helper 内收敛,不能改变业务异常路径;
- 不发送大对象、循环对象、凭证或完整请求体;
- 探针影响竞态复现率时立即撤销,并改用更靠近边界的少量事件。
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall