NocodeMrLi/mini-program-engineering-skill-suite / skills/mini-program-debugging-skill
mini-program-debugging-skill
VerifiedDiagnose and fix mini-program failures through reproducible, evidence-driven root-cause analysis across source, state, asynchronous timing, caches, mock data, build versions, platform behavior, devices, cloud calls, and external services. Use when users report white screens, crashes, stale or jumping values, missing data, intermittent behavior, permission failures, performance stalls, device-only defects, API or cloud-function errors, source-versus-build mismatches, or regressions whose cause is not yet established. Freezes the observation environment, ranks competing hypotheses, runs discriminating checks, creates a failing regression test before repair, covers analogous states, and never hides a known failure with longer waits, swallowed errors, forced success, or cosmetic patches.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.3 KB |
| agents/openai.yaml | config | 292 B |
| assets/debugging-report.md | markdown | 1.2 KB |
| references/debugging-workflow.md | markdown | 4.9 KB |
| references/interruption-recovery-protocol.md | markdown | 3.4 KB |
references/interruption-recovery-protocol.md
View on GitHub# 中断恢复协议与触发场景
当工具异常、命令超时、用户中止、会话断开或外部响应不明确时,不能把“没有看到完成结果”解释为失败,也不能解释为成功。在途动作立即标记为 `unknown`,先冻结盲目重放,再刷新事实。
## 中断记录
为每个在途动作记录:
- 动作标识、目标对象、目标版本、开始时间和最后一次确认时间。
- 动作类型:只读、本地写入、可逆外部写入或不可逆/高影响外部写入。
- 使用的命令、工具与版本;可用时记录请求标识、幂等键、回执或日志位置。
- 中断原因、最后一个已确认步骤、可能已经发生的副作用和当前结论 `unknown`。
- 原授权覆盖的具体动作,以及是否存在重复执行、覆盖、扣费、重复上传或重复发布风险。
## 事实刷新顺序
1. 停止同一动作的自动重试、循环重放和后续依赖动作。
2. 刷新本地事实:工作区差异、运行进程、锁文件、临时文件、构建产物、日志、退出状态和当前版本指纹。
3. 刷新外部状态:平台当前版本、操作记录、回执、请求标识、远端对象和可查询的幂等结果;没有权限时明确记录不可查。
4. 将刷新后的证据绑定到同一目标、版本、环境和时间窗,排除旧记录或相邻任务。
5. 按下表决定是否继续,不用“应该没成功”或“再试一次看看”替代证据。
只读刷新不等于启动被中断的业务或构建进程。用户禁止“启动进程”时,仍应读取已有日志和产物、检查工作区与可查询元数据;除非用户明确禁止一切工具读取。
## 恢复决策
| 刷新结论 | 必须动作 | 是否可重放 |
| --- | --- | --- |
| 已确认生效 | 保存成功证据,跳过重复动作,转入后续验证 | 不得重放 |
| 已确认未生效且无副作用 | 记录失败证据,重新核对前置条件与授权 | 仅在幂等或风险可接受且授权仍适用时 |
| 部分生效 | 先界定已发生副作用和回滚/补偿路径 | 不得直接重放整个动作 |
| 仍不确定 | 保持 `unknown`,报告缺失证据与最小查询/授权 | 不得重放 |
原授权只覆盖当时点名的动作,不自动成为中断后的重放授权。若重复执行可能改变外部状态、产生费用、覆盖内容、重复上传或推进审核/发布,必须说明刷新结果、重复风险和回滚条件,并重新取得明确的重放授权。
## 代表场景
平台上传命令超时且没有返回回执。先将上传状态记为 `unknown`,查询平台版本列表和上传记录;若目标版本已经存在,保存证据并停止,不再次上传。版本存在只证明记录存在;核内容/包完整且与目标匹配才确认完整生效,已上传截断或混合内容按部分生效界定补偿,内容不可查则保留未知。
## 边界场景
本地构建被用户中止,但可能留下部分产物。先检查进程、目标目录、产物时间和指纹;部分文件存在不等于构建成功,也不能在未清理影响和确认命令幂等性前直接重跑。
## 最低输出
- 中断动作、目标、版本、授权边界和最后确认点。
- 本地与外部事实刷新结果,以及哪些仍不可查。
- 当前结论:已确认生效、已确认未生效、部分生效或仍不确定。
- 是否允许重放、依据、重复风险、所需授权和下一项高信息量检查。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |