Agent Skills
› JuliusBrussee/caveman
› safe-refactor
safe-refactor
GitHub指导在重构代码时保持行为不变,通过明确验证边界和逐步调整所有权来安全地执行提取、合并或清理操作。
Trigger Scenarios
需要重构代码结构
移动代码所有权边界
清理代码并保证功能一致
Install
npx skills add JuliusBrussee/caveman --skill safe-refactor -g -y
SKILL.md
Frontmatter
{
"name": "safe-refactor",
"description": "Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits."
}
Safe refactor
Define behavior-preservation boundary and establish verification before structural edits.
- Keep feature changes outside refactor.
- Move one ownership boundary at a time.
- Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped.
- Keep intermediate states buildable and testable.
- Avoid dependency or configuration growth without correctness need.
Run same proof after change. Stop when behavior matches and requested structure is achieved.
Version History
- 12aa8cc Current 2026-08-16 08:55


