Claude-skill-registry-data minion-apply

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/minion-apply" ~/.claude/skills/majiayu000-claude-skill-registry-data-minion-apply && rm -rf "$T"
manifest: data/minion-apply/SKILL.md
source content

Minion Apply

Apply patches generated by minions. Always preview and dry-run before applying.

Workflow

  1. Preview - See what the patch contains
  2. Dry-run - Test without making changes
  3. Apply - Make the changes
  4. Verify - Run tests

Usage

Step 1: List available patches

ls -la sessions/*.patch

Step 2: Preview a patch

cat sessions/20250112-patch.patch

Or for colored diff:

cat sessions/20250112-patch.patch | diff-so-fancy 2>/dev/null || cat sessions/20250112-patch.patch

Step 3: Dry-run (test without applying)

patch -p1 --dry-run < sessions/20250112-patch.patch

If successful, shows what would change. If errors, shows conflicts.

Step 4: Apply the patch

patch -p1 < sessions/20250112-patch.patch

Step 5: Verify changes

# Check git diff
git diff

# Run tests
source .venv/bin/activate && pytest

Apply multiple patches

# Apply all patches in order
for p in sessions/*.patch; do
  echo "Applying $p..."
  patch -p1 < "$p"
done

Handling conflicts

If dry-run shows conflicts:

Hunk #1 FAILED at 42.

Options:

  1. Regenerate patch - Run minion-patch again with more context
  2. Manual edit - Edit the .patch file to fix offsets
  3. Force with fuzz -
    patch -p1 --fuzz=3 < file.patch
    (risky)

Reverting a patch

patch -p1 -R < sessions/20250112-patch.patch

Clean up after applying

# Remove applied patches
rm sessions/*.patch

# Or archive them
mkdir -p sessions/applied
mv sessions/*.patch sessions/applied/

Safety tips

  • Always dry-run first - Catches most issues
  • Review every patch - Minions make mistakes
  • Commit before applying - Easy to revert
  • Run tests after - Verify nothing broke
  • One patch at a time - Easier to debug