Skip to content
cccskills
FreePublished on GitHub

test-optimize

优化单元测试、集成测试和端到端测试的类型选择、断言、mock、测试数据与评审质量。用户要求新增、修复、重构或评审测试,处理无意义断言、mock、覆盖率、spec、integration 或 e2e 边界时使用。

The English summary is being prepared. Showing the original description.

JYbill/picgo-plugin-cloudflare-r236 stars(GitHub 36 + cccskills 0)

Run score Not tested

See how to install

Files included (5)

  • SKILL.md2.3 KB
  • references/anti-patterns.md5.1 KB
  • references/assertions-and-comments.md2.2 KB
  • references/mocking.md968 B
  • references/test-types.md1.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

test-optimize

目标

用能提供有效信心的最小测试类型,证明调用方真正依赖的行为。测试代码要聚焦规则、转换、边界和错误,不要验证测试准备代码或语言本身。

执行流程

[收到测试任务]
        |
        v
[定位真实风险与可观察行为]
        |
        | 完成:能说明删除哪条规则会使测试失败
        v
[按真实依赖边界选择测试类型]
        |
        | 完成:测试类型与实际触达边界一致
        v
[按读取规则加载 reference]
        |
        v
[删除或改写无意义测试]
        |
        | 完成:每个断言都会在目标行为回归时失败
        v
[运行最小相关测试、文件级 lint 和类型检查]
        |
        | 完成:所有命令无错误、无警告,且未放宽断言
        v
[报告修改、保护行为与验证结果]

读取规则

完成标准

  • 测试只保留真实行为、边界、错误或对外契约断言。
  • expected 由规则独立定义,不是从 setup 对象原样复制。
  • mock 只隔离与当前风险无关的协作者,不代替正在验证的行为。
  • 单元测试块和断言注释符合项目规范,注释说明目的、总结和期待。
  • 完成最小相关验证;只在影响共享行为时扩大范围。

回复要求

只报告选择的测试类型及原因、删除或改写的无意义逻辑、当前保护的行为,以及实际执行的验证命令和结果。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ddt

Free

检查并纠正 dont-do-that packaging 问题,包括过度封装、过度抽象、薄 helper、薄类型拆分、单次引用 enum / 常量、实例属性绕传参数、React 组件职责放置错误、React 前端 util 组织错误和 Node.js 后台分层职责错误;当用户要求 review 或修改代码结构、内联小函数、合并薄类型、收回单点常量、整理 React hook / TSX / 前端 util 职责、检查 Node.js service / logic / query 分层,或判断代码是否符合项目规范时使用。

The English summary is being prepared. Showing the original description.

JYbill/picgo-plugin-cloudflare-r236Updated Oct 6, 2026

notes

Free

当用户明确要求补注释、调整注释、review 注释质量、沉淀注释规范,或需要判断复杂逻辑、循环块、if 分支、变量组、状态分支、数据转换、SQL 口径、React Hook 副作用、Node.js 后台编排中哪些位置值得注释时,使用这个 skill。目标是让刚接手模块的人也能读懂注释所说明的意图、变量职责和业务边界,不给简单代码逐行配旁白。

The English summary is being prepared. Showing the original description.

JYbill/picgo-plugin-cloudflare-r236Updated Oct 6, 2026

See all skills by JYbill

Report a problem with this skill