Communitygithub.com

Conz-Wilts/ai-editor

使用 Higgsfield 生成最新素材,並將其放入編輯的時間軸上。每次生成前先報價,經使用者同意價格(若使用自有素材,也詢問是否允許上傳至 Higgsfield),然後提交、等待、下載至編輯的 generated/ 資料夾,並將結果新增至時間軸的 Generated 軌道。

ai-editor 是什麼?

這個 AI 編輯器技能專門用來在影片編輯專案中生成新的素材。它整合了 Higgsfield 的 AI 生成能力,支援四種主要功能:動作轉移(將使用者影片中的動作套用到角色或風格化外觀上)、文字轉影片(從句子生成 B-roll)、圖片轉影片(讓靜態圖片動起來)以及文字轉圖片(為卡片生成靜止圖像)。技能運作流程為:先估算成本並詢問使用者(同時告知哪些素材會上傳),獲得確認後才提交生成任務,接著在背景等待結果,最後自動下載並將素材加到時間軸的 Generated 軌道。此技能專為像是「生成 B-roll」、「製作一個鏡頭」、「AI B-roll」、「生成片段」、「使用 Higgsfield」、「動作轉移」等自然語言指令而設計,但不會處理動畫圖表、螢幕截圖、標誌或剪接操作。支援的 AI 平台包括 Claude Code 和其他具備技能檔案機制的 AI 代理。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Conz-Wilts/ai-editor/tree/HEAD/.claude/skills/generate

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

生成

路徑:${CLAUDE_SKILL_DIR} 指的是包含此 SKILL.md 的資料夾,${CLAUDE_SKILL_DIR}/../.. 則是指編輯器資料夾(此儲存庫兩層上層的 .claude/)。

每個向使用者提出的問題都應放在問題框中:呼叫 AskUserQuestion 工具(提供 2-4 個選項,建議選項排第一)。只有在沒有該工具的代理中,才以文字方式提出編號問題。

G="${CLAUDE_SKILL_DIR}/../../lib/ai_editor/gen/gen.py"。使用 python3(Windows 上使用 py)執行。每個模型、其輸入及限制都在 gen.py models 中(來自 lib/ai_editor/gen/models.json);切勿猜測模型 ID 或參數。API 事實及未經驗證的內容:references/higgsfield-api.md。

規則

  • 只有在使用者同意該價格後,才會實際花費金錢。 務必先執行 estimate,以它列印出的美元金額(其 ASK: 行)提問,且僅在使用者選擇「是」之後,才執行 submit --confirm <估算 ID>。如果價格已變更(估算超過 30 分鐘,或 submit 顯示價格已變更),則需重新提問。
  • 使用者的素材只有在獲得同意後才能離開其電腦。 使用者的影片片段或影格會在 submit 時上傳至 Higgsfield。請在與價格相同的問題中一併告知此事。
  • 切勿在聊天中要求金鑰。 沒有金鑰:請告知使用者在他們自己的終端機中執行 python3 "$G" setkey(此指令會要求輸入來自 console.higgsfield.ai 的金鑰 ID 與密碼,並以 id:secret 格式串接,且會隱藏輸入內容)。
  • profile.json 中的 gen_budget_usd 會限制每月花費上限;submit 會拒絕超出預算的請求。請告知剩餘額度並停止。
  • 失敗及判定為 nsfw 的結果不會被計費。若發生此情況,請告知使用者,並提議修改提示詞。

步驟

  1. 確認內容與位置。 根據使用者的話語及編輯專案(edits/<name>/):類型(動作轉移、文字生成 B-roll、靜態圖片動起來、為卡片生成靜態圖像)、它涵蓋的時間點(時間軸上的秒數,從 words.json 中的逐字稿得知),以及動作轉移所需的使用者影片片段(4 秒或更長;模型最多保留 30 秒)。使用 python3 "$G" models --kind <類型> 選擇模型。
  2. 撰寫提示詞。 根據正在說出的台詞自行撰寫:主體、場景、攝影機、光線,字數限制在 40 字以內。B-roll 應符合影片的格式(直式編輯獲得直式感覺的鏡頭)。動作轉移需要 1-8 張參考圖片(--image,檔案或 URL):這些是動作要套用到的外觀。
  3. 估算價格。
    python3 "$G" estimate edits/<name> --model <id> --prompt "<prompt>" [--video raw.mp4 --from 12.0 --to 18.0] \
      [--image ref.png] [--param duration=5] --at <時間軸秒數>
    
    它會將片段(無聲、H.264)裁剪到 generated/inputs/ 中,在不上傳任何內容的情況下估算價格,並列印出估算 ID、usd、credits、over_budget 以及一個 ASK: 行。
  4. 提問。 一個問題框:將 ASK: 行作為問題(價格、模型以及會上傳的內容),選項為「是的,生成它(建議)」/「修改提示詞」/「不要」。如果超出預算:請改為告知此事並停止。
  5. 僅在同意後才提交:python3 "$G" submit edits/<name> --confirm <估算 ID>。它會上傳輸入檔案,依據上傳內容重新估算價格,提交任務並列印出任務 ID。
  6. 在背景等待(生成需要數分鐘):python3 "$G" wait edits/<name> <任務>。它會使用退避機制輪詢,將結果下載到 edits/<name>/generated/ 中,對其進行探測,並將其作為 Claude 的變更(透過 project.py apply 執行;若尚無專案文件,則寫入 generated/<job>.ops.json 並列印出來)新增至時間軸的 Generated 軌道 --at 位置。status / list 顯示進度;cancel 僅在任務仍在佇列中時有效。
  7. 交接。 告知使用者新增了什麼、在哪裡以及花費了多少成本。使用者可以像對待任何片段一樣在時間軸上移動、修剪或刪除它。對於生成結果外觀的修正,請參考 taste。

如果指令停止

訊息處理方式
No Higgsfield key要求使用者在自己的終端機執行 python3 "$G" setkey,然後繼續
needs at least 4 s擴大 --from/--to 範圍,或選擇文字或圖片模型
over this month's generation budget告知剩餘額度;使用者可以提高 gen_budget_usd
the price is $X, not $Y以新價格再次提問,然後使用新列印的 ID 執行 submit --confirm
Maximum number of concurrent requests客戶端已重試;等待正在執行的任務結束,然後再提交
ended failed / ended nsfw不會被計費;提供修改後的提示詞(需要新的估算和提問)

檔案

  • lib/ai_editor/gen/gen.py:上述指令,demo 自我檢查(模擬的 Higgsfield,無網路連線)。
  • lib/ai_editor/gen/higgsfield.py:API 客戶端。base.py:提供者介面與目錄。
  • lib/ai_editor/gen/jobs.py:edits/<name>/generated/jobs.json 以及每月花費。
  • references/higgsfield-api.md:依文件記錄的 API(附有來源)。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Conz-Wilts/ai-editor

Turns one long video or podcast (a local file or a YouTube link) into the best 3-5 short vertical clips, each cut and styled in the user's profile style. Transcribes once, splits the talk into candidate clips at sentence boundaries inside the chosen length, scores every candidate in code (speech rate, loudness, laughter, numbers and names said), shows the shortlist on one page with a preview of each, then trims, cuts and style-edits each pick as its own edit. Use when the user says "clip this video", "make shorts from my podcast", "find the best clips", "cut this into TikToks", "turn this YouTube video into reels", "repurpose this long video", or drops a long video (over about 3 minutes) or a YouTube link and wants short clips. Not for editing one short take (that is start or cut), and not for measuring someone else's style (that is creator-teardown).

Conz-Wilts/ai-editor

Reverse-engineers a short-form creator's video format from their real numbers. Pulls a TikTok or YouTube Shorts profile (or pasted links, Instagram reels too) with view, like and save counts, transcribes the top videos word for word, measures pace, pauses and fillers, maps each video into timed beats, and writes a teardown.md someone can film from, a teardown.html page of their graphics, motion and sound, and the style.json the style-edit skill edits from (on its own it can write an edit plan as a table and .srt). Use when the user wants to analyse, break down or study a creator ("analyse @handle", "tear down @handle", "teardown of @handle", "break down this creator", "what makes this creator's videos work"), pastes TikTok, YouTube or Instagram links and asks what the pattern is, or asks to set up creator-teardown. Not for editing the user's own video like a creator (that is start), not for researching a topic, and not for cutting raw footage.

Conz-Wilts/ai-editor

Cuts raw talking-head footage into a clean jump cut. Takes one take or several joined (mp4 or mov, any aspect, 4K phone footage is fine), transcribes it word by word, removes retakes, false starts, fillers and dead pauses, and renders cut.mp4 at the source resolution plus words.json timed to the cut. The user approves the cut on a page with the whole transcript and every removed word struck through. Use when the user says "cut my video", "just cut it", "remove my mistakes", "cut out the retakes", "remove the pauses", "clean up this take", "jump cut this", "tighten this clip", or asks only for the cut of a raw take; start calls it for a full edit. Runs before style-edit. Not for a general request to edit a video or to make it look like a creator (that is start), not for adding captions, zooms or cards (style-edit), and not for analysing someone else's videos (creator-teardown).

Conz-Wilts/ai-editor

For the editor's maintainers. Turns what users corrected into lasting fixes in this repo, for every user, enforced by code and tests rather than notes. Reads the suggestions users marked "would help everyone" (~/.ai-video-editor/suggestions.jsonl), taste rules said twice (taste.py report), preview corrections (edits/*/corrections.jsonl), review-page notes (*/review.json) and open GitHub issues labelled feedback; groups repeats; for each item the maintainer accepts, writes the general rule into PRINCIPLES.md and the skill that owns it, adds or tightens the check that enforces it, adds a test that fails before and passes after, and runs the full test set. Use when the maintainer says "improve the editor", "turn feedback into fixes", "process suggestions", "what are users complaining about", "go through the feedback issues". Not for one user's own preferences (that is taste), and not for editing a video.

相關技能