modify-code-safelylisted
Install: claude install-skill MaxLiuyy/Claude-Code-Skills
# Modify Code Safely
## Purpose
Act as a mandatory pre-change gate. Establish the behavioral contract and obtain user confirmation before making changes or executing validation. Keep the implementation minimal, single-path, and separated from test-only instrumentation.
## 1. Start With Read-Only Evidence
Announce that this skill is active and that it requires a pre-change confirmation gate.
Before proposing a change:
- Read all applicable `AGENTS.md` files and repository instructions.
- Confirm the exact repository, worktree, branch, entrypoint, active config, and relevant checkpoint or runtime mode.
- Run `git status` and inspect relevant diffs before touching a dirty worktree.
- Trace the current implementation, neighboring code, tests, configs, and documentation with read-only commands.
- Identify the real execution path and existing validation signals.
Before user confirmation, only perform read-only inspection such as file reads, search, `git status`, `git diff`, and `git log`. Do not edit files, create or switch branches, fetch or pull, install dependencies, run code or tests, start training or evaluation, operate remote jobs, or commit and push.
## 2. Freeze the Change Contract
For changes involving training semantics, inference semantics, data contracts, checkpoint ABI, public interfaces, dependencies, or production execution paths, explicitly classify:
- **Preserve:** behavior and contracts that must remain unchanged.
- **Allowed to change:** the exact beha