thrunt-reapply-patcheslisted
Install: claude install-skill 3dcom2711/thrunt-god
<purpose>
After a THRUNT update wipes and reinstalls files, this command merges user's previously saved local modifications back into the new version. Uses intelligent comparison to handle cases where the upstream file also changed.
</purpose>
<process>
## Step 1: Detect backed-up patches
Check for local patches directory:
```bash
# Global install — detect runtime config directory
if [ -d "$HOME/.config/opencode/thrunt-local-patches" ]; then
PATCHES_DIR="$HOME/.config/opencode/thrunt-local-patches"
elif [ -d "$HOME/.opencode/thrunt-local-patches" ]; then
PATCHES_DIR="$HOME/.opencode/thrunt-local-patches"
elif [ -d "$HOME/.gemini/thrunt-local-patches" ]; then
PATCHES_DIR="$HOME/.gemini/thrunt-local-patches"
else
PATCHES_DIR=".github/thrunt-local-patches"
fi
# Local install fallback — check all runtime directories
if [ ! -d "$PATCHES_DIR" ]; then
for dir in .config/opencode .opencode .gemini .claude; do
if [ -d "./$dir/thrunt-local-patches" ]; then
PATCHES_DIR="./$dir/thrunt-local-patches"
break
fi
done
fi
```
Read `backup-meta.json` from the patches directory.
**If no patches found:**
```
No local patches found. Nothing to reapply.
Local patches are automatically saved when you run /thrunt-update
after modifying any THRUNT workflow, command, or agent files.
```
Exit.
## Step 2: Show patch summary
```
## Local Patches to Reapply
**Backed up from:** v{from_version}
**Current version:** {read VERSION file}
**Files modified:** {count}
| #