Install
npx skillscat add oneboxcream/claude-code-setup/verification-loop Install via the SkillsCat registry.
SKILL.md
Verification Loop
完成代码变更后,执行以下验证流程:
验证阶段
1. 语法检查
python -m py_compile <changed_files>确认所有修改的 Python 文件语法正确。
2. Import 检查
检查新增的 import 是否存在、是否有循环依赖。
3. 类型兼容性
- 确认没有使用 Python 3.9+ 语法(
X | Y,match/case,type别名) - 检查
from __future__ import annotations使用情况 - 确认
dict[str, int]改为Dict[str, int](typing 模块)
4. 关键逻辑审查
- Tensor shape 一致性(输入输出维度是否匹配)
- 设备一致性(CPU/GPU tensor 混用)
- 数据泄漏检查(训练数据是否泄漏到验证/测试集)
5. Diff 审查
检查变更是否引入了:
- 未使用的 import
- 调试代码(print, pdb, breakpoint)
- 硬编码路径或密钥
- 意外删除的代码
输出格式
╔══════════════════════════════╗
║ Verification Report ║
╠══════════════════════════════╣
║ Syntax Check : ✅ PASS ║
║ Import Check : ✅ PASS ║
║ Type Compat : ⚠️ 1 warn ║
║ Logic Review : ✅ PASS ║
║ Diff Review : ✅ PASS ║
╠══════════════════════════════╣
║ Overall: READY ║
╚══════════════════════════════╝