Communitygithub.com

Conz-Wilts/ai-editor

使用Higgsfield生成新镜头并添加到时间线。每次生成前报价,经用户确认后提交、等待、下载到项目generated/文件夹,并将结果添加到时间线的Generated轨道。支持视频中某个片段的动作迁移、文字转B-roll、图片动效、文字转静态卡片。

ai-editor 是什么?

Conz-Wilts/ai-editor 是一个针对AI原生视频编辑工具(如Claude Code、Cursor、Codex)的技能,旨在通过Higgsfield AI引擎在用户的时间线上直接生成新镜头。它支持四种生成类型:动作迁移(将用户视频中的动作迁移到角色或风格化形象上)、文字转B-roll(文字生成视频)、图片动效(静态图片生成视频)以及文字转静态卡片(文字生成图像)。该技能的核心工作流程包括:分析用户意图并确定生成类型和位置;自动编写提示词;调用模型进行成本估算;在询问用户并获得明确价格确认和素材上传许可后才提交生成请求;在后台等待生成完成后自动下载结果并添加到时间线的Generated轨道。它严格遵守资金预算控制(每月预算上限通过profile.json中的gen_budget_usd设置)和用户素材隐私保护(上传前必须获得用户同意)。该技能仅在用户明确要求用Higgsfield生成AI镜头、B-roll、动作迁移或风格化重制时使用,不适用于动画图表、动态图形、真实截图或剪辑操作。

兼容平台✓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 个选项,推荐选项置顶)。仅当 Agent 没有该工具时,以文本形式用编号提问。

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 <estimate 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 <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 <timeline seconds>
    
    它会将视频片段裁剪(静音,H.264)到 generated/inputs/,在不上传任何内容的情况下对请求进行报价,并打印出估算 ID、usd、credits、over_budget 以及 ASK: 行。
  4. 询问用户。 一个提问框:将 ASK: 行作为问题(价格、模型以及将要上传的内容),选项为“是的,生成它(推荐)” / “修改提示词” / “否”。如果超出预算:告知用户并停止。
  5. 提交。 仅在用户同意后才执行:python3 "$G" submit edits/<name> --confirm <estimate id>。它会上传输入内容,根据输入重新报价,提交并打印作业 ID。
  6. 等待。 在后台等待(生成需要几分钟):python3 "$G" wait edits/<name> <job>。它使用退避策略轮询,将结果下载到 edits/<name>/generated/,探测结果并将其添加到时间线的 Generated 轨道上 --at 指定的位置,作为 Claude 的变更(通过 project.py apply;如果没有项目文档,它会写入 generated/<job>.ops.json 并打印出来)。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.

相关技能