Why: repair_placeholders ran inside a command substitution, so a failing sed left an emptied file behind and the script still exited 0 reporting success. - write via tmp file and abort on sed or mv failure - re-check the target before moving staging into place - stage in a dot-prefixed mktemp dir so a killed run leaves no fake skill - source apm claims in deployment-modes.md; tag untyped code blocks Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi