Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

install-skill stages in a fresh folder beside the destination

Bowen Xued282995b0e5c
diff --git a/freevideo_engine/agent/skill_install.py b/freevideo_engine/agent/skill_install.py
index d36d784..3688522 100644
--- a/freevideo_engine/agent/skill_install.py
+++ b/freevideo_engine/agent/skill_install.py
@@ -1,6 +1,7 @@
"""Copy the bundled FreeVideo skill folder where Agents that support SKILL.md look for it."""
from pathlib import Path
import shutil
+import tempfile
SOURCE = Path(__file__).resolve().parent / 'skill' / 'freevideo'
# Codex, Gemini CLI and Cursor read ~/.agents/skills; Claude Code reads ~/.claude/skills.
@@ -17,15 +18,20 @@ def install(targets=('agents', 'claude'), home=None):
for target in targets:
destination = target_dir(target, home)
destination.parent.mkdir(parents=True, exist_ok=True)
- staging = destination.with_name('.freevideo-installing')
- shutil.rmtree(staging, ignore_errors=True)
- for source in SOURCE.rglob('*.txt'):
- # Stored as .txt so the update payload only carries file types every launcher accepts; agents read .md.
- copy = staging / source.relative_to(SOURCE).with_suffix('.md')
- copy.parent.mkdir(parents=True, exist_ok=True)
- shutil.copyfile(source, copy)
- if destination.exists():
- shutil.rmtree(destination)
- staging.rename(destination)
+ # A fresh folder made exclusively beside the destination: a leftover or a link with a fixed name is never written through.
+ staging = Path(tempfile.mkdtemp(prefix='.freevideo-installing-', dir=destination.parent))
+ try:
+ for source in SOURCE.rglob('*.txt'):
+ # Stored as .txt so the update payload only carries file types every launcher accepts; agents read .md.
+ copy = staging / source.relative_to(SOURCE).with_suffix('.md')
+ copy.parent.mkdir(parents=True, exist_ok=True)
+ shutil.copyfile(source, copy)
+ if destination.is_symlink():
+ destination.unlink()
+ elif destination.exists():
+ shutil.rmtree(destination)
+ staging.rename(destination)
+ finally:
+ shutil.rmtree(staging, ignore_errors=True)
written.append(str(destination))
return written