Skip to main content
Auto installer cài cái gì?Cài tự động module Asset Index — watcher chạy nền + DB SQLite + lệnh Search/Status. Đây là phần cốt lõi để mọi skills truy vấn asset bằng ngôn ngữ tự nhiên.Chưa bao gồm: Node.js cho render Remotion, AusyncLab cho voice TTS. Nếu muốn full pipeline → đọc Cài đặt đầy đủ.
Installer tự kiểm tra Python 3.10+ và ffmpeg/ffprobe. Nếu thiếu sẽ in link cách cài (brew install ffmpeg / winget install Gyan.FFmpeg) và dừng. API keys (OpenAI + Gemini) sẽ được prompt trong quá trình cài — trình duyệt tự mở trang tạo key.

Bước 1 — Tải repo về máy

Cần Git cài sẵn (git --version). Nếu chưa có:
  • macOS: xcode-select --install (Apple cài kèm Git CLI).
  • Windows: winget install Git.Git.
  • Linux: sudo apt install git / sudo dnf install git.
Clone về home directory (hoặc nơi bạn muốn):
cd ~
git clone https://github.com/bachdyon/video-automator-skills
cd video-automator-skills
Lợi thế: dễ git pull lấy update sau này. Xem Cập nhật & Gỡ cài đặt.
  1. Mở https://github.com/bachdyon/video-automator-skills.
  2. Click nút Code (xanh) → Download ZIP.
  3. Giải nén:
    • macOS: double-click file .zip trong Finder.
    • Windows: chuột phải → Extract All….
  4. Đổi tên folder thành video-automator-skills (bỏ hậu tố -main nếu có).
Cách này không có .git/ → không git pull được. Mỗi lần update phải tải ZIP mới và copy đè. Khuyến nghị dùng cách 1.

Bước 2 — Mở folder & cài skill bên thứ ba

Repo có sẵn AGENTS.md ở root + 13 project skills trong skills/<name>/SKILL.md. Codex, Cursor, Claude Code đều tự pickup khi mở folder. Bạn chỉ cần thêm 1 skill bên thứ ba $remotion-best-practices (cài bằng scripts/ensure-remotion-skill.sh) để render Remotion.
  1. Mở folder qua File → Open Folder…, hoặc CLI từ trong repo:
    cursor .
    
  2. Cursor tự nhận AGENTS.md làm workspace rule. Verify ở Settings → Rules → mục Project rules phải hiện AGENTS.md.
  3. 13 project skills nằm trong skills/<name>/SKILL.md được tham chiếu qua $skill-name từ AGENTS.md — Cursor sẽ tự load đúng SKILL.md khi task trùng.
  4. Cài skill bên thứ ba $remotion-best-practices bằng terminal tích hợp (mở bằng phím tắt mở terminal trong Cursor):
    bash scripts/ensure-remotion-skill.sh --install
    
  1. Cài Codex CLI nếu chưa có:
    npm i -g @openai/codex
    
  2. cd vào folder repo và mở session:
    cd ~/video-automator-skills
    codex
    
    Codex tự đọc AGENTS.md ở root → pickup pipeline rule + danh sách 13 project skills ($asset-semantic-extractor, $video-creative-planner, …).
  3. Cài skill bên thứ ba $remotion-best-practices:
    bash scripts/ensure-remotion-skill.sh --install
    
    Script wrap npx skills add remotion-dev/skills --yes, ghi skills-lock.json và tạo symlink .claude/skills/remotion-best-practices (cho Claude Code dùng chung).
  1. Cài Claude Code nếu chưa có:
    npm i -g @anthropic-ai/claude-code
    
  2. cd vào folder repo và mở session:
    cd ~/video-automator-skills
    claude
    
    Claude tự discover .claude/skills/*/SKILL.md (đã symlink sang skills/.agents/skills/remotion-best-practices).
  3. Trong session gõ /skills để verify danh sách. Phải thấy đủ 13 skill, kể cả remotion-best-practices.
  4. Nếu thiếu remotion-best-practices (chưa cài hoặc symlink bị xoá), chạy:
    bash scripts/ensure-remotion-skill.sh --install
    
    Script tự tái tạo symlink .claude/skills/remotion-best-practices.

Bước 3 — Chạy installer

  1. Mở Finder, vào thư mục video-automator-skills vừa clone/giải nén.
  2. Vào folder setup/, double-click Install.command.
  3. Khi terminal hiện, làm theo prompt:
    • Trình duyệt tự mở 2 trang tạo key — copy về và dán vào terminal.
    • Installer tự tạo .venv, cài deps, đăng ký watcher chạy nền (launchd).
  4. Xong. Watcher chạy nền và tự bật lại sau khi reboot.
Lần đầu chạy Install.command, macOS có thể chặn vì script chưa được sign. Nếu vậy: chuột phải → Open → Open.
  1. Mở File Explorer, vào thư mục video-automator-skills vừa clone/giải nén → folder setup\.
  2. Double-click Install.bat.
  3. Khi PowerShell/cmd hiện, làm theo prompt:
    • Trình duyệt tự mở 2 trang tạo key — copy về và dán vào terminal.
    • Installer tự tạo .venv, cài deps, đăng ký watcher chạy nền (Task Scheduler).
  4. Xong. Watcher chạy nền và tự bật lại sau khi đăng nhập lại.
Nếu đường dẫn repo > 260 ký tự, bật Long Paths trong Group Policy: Computer Configuration → Filesystem → Enable Win32 long paths.
Auto installer chỉ hỗ trợ macOS/Windows. Linux dùng Cài đặt đầy đủ.

Bước 4 — Sau khi cài

1

Thả file vào raw_assets/

Drop ảnh/video/audio vào một trong 3 folder:
  • raw_assets/images/
  • raw_assets/videos/
  • raw_assets/audio/
Watcher debounce 1.5s rồi tự gọi Gemini analyzer + OpenAI embedding, lưu vào .asset_index/index.db.
2

Tìm asset

macOS: double-click setup/Search.command Windows: double-click setup/Search.batGõ truy vấn tiếng Việt (ví dụ phong cảnh núi, người đang nói, nhạc buồn). Top 5 kết quả khớp ngữ nghĩa nhất sẽ hiện.
3

Kiểm tra trạng thái watcher

macOS: setup/Status.command Windows: setup/Status.batOutput gồm pid, processed_count, last_error. Nếu pid rỗng → watcher chưa chạy, xem Khắc phục sự cố.
4

Verify

Drop 1 file ảnh test vào raw_assets/images/, đợi ~5 giây, chạy Search với từ khoá khớp nội dung ảnh. Phải trả về ≥ 1 kết quả. Nếu không → xem Khắc phục sự cố.

Bước tiếp theo

Cài đầy đủ cho full pipeline

Thêm Node.js cho Remotion render và AusyncLab cho voice TTS.

Khám phá skills

Mỗi skill đóng gói 1 bước pipeline.

Cấu trúc dự án

Hiểu các thư mục skills/, jobs/, tools/, raw_assets/.

Nâng cao: Asset Index

CLI dev, idempotency, cross-platform notes.