Agent SkillsJuliusBrussee/caveman › safe-refactor

safe-refactor

GitHub

指导在重构代码时保持行为一致,通过建立验证边界确保提取、合并或清理操作的安全性,要求中间状态可构建测试,变更前后行为匹配。

skills/safe-refactor/SKILL.md JuliusBrussee/caveman

Trigger Scenarios

需要重构代码结构 进行代码提取或合并 移动代码所有权归属 代码清理与整理

Install

npx skills add JuliusBrussee/caveman --skill safe-refactor -g -y
More Options

Use without installing

npx skills use JuliusBrussee/caveman@safe-refactor

指定 Agent (Claude Code)

npx skills add JuliusBrussee/caveman --skill safe-refactor -a claude-code -g -y

安装 repo 全部 skill

npx skills add JuliusBrussee/caveman --all -g -y

预览 repo 内 skill

npx skills add JuliusBrussee/caveman --list

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

Same Skill Collection

plugins/caveman/skills/caveman-compress/SKILL.md
plugins/caveman/skills/caveman-stats/SKILL.md
plugins/caveman/skills/caveman/SKILL.md
skills/caveman-commit/SKILL.md
skills/caveman-compress/SKILL.md
skills/caveman-discover/SKILL.md
skills/caveman-evidence-review/SKILL.md
skills/caveman-explore/SKILL.md
skills/caveman-help/SKILL.md
skills/caveman-learn/SKILL.md
skills/caveman-manage/SKILL.md
skills/caveman-optimize/SKILL.md
skills/caveman-review/SKILL.md
skills/caveman-setup/SKILL.md
skills/caveman-stats/SKILL.md
skills/caveman/SKILL.md
skills/investigate-first/SKILL.md
skills/lean-build/SKILL.md
skills/migration/SKILL.md
skills/surgical-patch/SKILL.md
skills/verify-and-stop/SKILL.md
plugins/caveman/skills/cavecrew/SKILL.md
skills/cavecrew/SKILL.md

Metadata

Files
0
Version
12aa8cc
Hash
cd52867a
Indexed
2026-08-16 08:55

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 22:34
浙ICP备14020137号-1 $mapa de visitantes$