tsa-edit-safetylisted
Install: claude install-skill aimasteracc/tree-sitter-analyzer
# tsa-edit-safety — Decide before you edit
> Replaces grep/read/git-diff/blame exploration with 2-3 MCP calls returning
> verdict + exact command to verify. **80% token reduction** vs. manual recon.
## When to use
- Pre-edit gate for any non-trivial change (more than 5 lines or crossing files)
- User asks any of: "is X safe to change", "what depends on Y", "what tests cover Z"
- Right after `git diff` shows pending changes you want to evaluate
**Don't use** when:
- One-line typo fix in a doc / comment
- File you're literally creating from scratch (no callers)
## Procedure
### Step 1 — Single fan-out (parallel)
Call these 3 tools in ONE message:
1. `safe_to_edit` with `file_path: "<the file>"` and `edit_type: "<refactor|rename|delete|bugfix>"`
2. `analyze_change_impact` with `mode: "staged"` (or `"branch"` if pre-stage), scope to the file
3. `check_file_health` with `file_path: "<the file>"`
### Step 2 — Read the verdict cascade
Verdict precedence (worst wins):
- `UNSAFE` (from constraints or impact) → STOP, explain why, do not edit
- `CAUTION` (high impact / dependencies / hot zone) → narrow scope, write tests first
- `REVIEW` (moderate, often "no tests nearby") → write tests before edit
- `SAFE` → proceed; still run the returned `verification_command`
### Step 3 — Always quote the exact `verification_command`
The tools return a `verification_command` and `stop_condition`. Surface them
verbatim to the user before editing. Example:
> verdict: REVIEW
> verification