-
Notifications
You must be signed in to change notification settings - Fork 1
feat(skills): recoup-content-clip-video — clip long-form video into shorts via the OpusClip API #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -48,7 +48,7 @@ | |||||
| # Co-located with the plugin root (NOT under tests/, which is gitignored) so the | ||||||
| # fixtures ship and CI can run them on a fresh checkout. | ||||||
| FIXTURES = PLUGIN / "resolver-eval.jsonl" | ||||||
| SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9-]+)`") | ||||||
| SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9.-]+)`") | ||||||
|
|
||||||
|
|
||||||
| def skill_dirs() -> set[str]: | ||||||
|
|
@@ -82,7 +82,7 @@ def load_fixtures() -> list[dict]: | |||||
| GATEWAY_KEY = os.environ.get("AI_GATEWAY_API_KEY") or os.environ.get("VERCEL_AI_GATEWAY_API_KEY") | ||||||
| MIN_PASS = float(os.environ.get("RECOUP_RESOLVER_EVAL_MIN_PASS", "1.0")) | ||||||
| FRONTMATTER_KEY = re.compile(r"^([A-Za-z][\w-]*):\s?(.*)$") | ||||||
| SKILL_TOKEN_PLAIN = re.compile(r"recoup-[a-z0-9-]+") | ||||||
| SKILL_TOKEN_PLAIN = re.compile(r"recoup-[a-z0-9.-]+") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The broadened character class Prompt for AI agents
Suggested change
|
||||||
|
|
||||||
|
|
||||||
| def _gateway_ssl_context() -> ssl.SSLContext: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: recoup-content-clip-video | ||
| description: 'Clip long-form video (podcast, interview, livestream, live set, music video) into ready-to-post short clips using the OpusClip API. Use for "clip this video", "turn this podcast/stream into shorts", "make clips from this YouTube video", or "cut this into TikToks/Reels/Shorts". Input is an existing long video URL; output is a set of generated clips. To generate new video from scratch, use recoup-content-make-video; to find the single best moment in a song, use recoup-song-find-hook.' | ||
| --- | ||
|
|
||
| # Recoup Content — Clip Video | ||
|
|
||
| Turn one long-form video into a set of short, social-ready clips via the | ||
| [OpusClip API](https://help.opus.pro/api-reference/quickstart). | ||
|
|
||
| ## Setup | ||
|
|
||
| - Auth: `Authorization: Bearer $OPUS_PRO_API_KEY` (never hardcode the key; get | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: For multi-org users, the GET Prompt for AI agents |
||
| one at https://clip.opus.pro/dashboard). | ||
| - Base URL: `https://api.opus.pro/api` | ||
|
|
||
| ## Flow | ||
|
|
||
| 1. **Submit** the long-form video: `POST /clip-projects` with `{ "videoUrl": "<source url>" }`. | ||
| The response includes a project `id`. | ||
| 2. **Wait** for clipping to finish — configure a webhook via `conclusionActions` | ||
| (type `WEBHOOK`) when possible; otherwise poll step 3 until clips appear. | ||
| 3. **Fetch clips**: `GET /exportable-clips?q=findByProjectId&projectId=<id>`. | ||
| 4. **Deliver** the clip URLs to the user with each clip's title/duration. | ||
|
|
||
| ## Docs | ||
|
|
||
| - Quickstart: https://help.opus.pro/api-reference/quickstart | ||
| - Full endpoint index (LLM-readable): https://help.opus.pro/llms.txt | ||
| - Every doc page has a `.md` version — append `.md` to the URL and fetch it | ||
| before using any endpoint not covered here (curation preferences, brand | ||
| templates, social posting, collections, transcripts). | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Keep dot support, but stop matching sentence punctuation.
recoup-[a-z0-9.-]+will also absorb a trailing.in model replies, so a correct answer likerecoup-internal-video-grok-1.5-imagine-facetime.falls through tonone. Make the pattern version-aware instead of letting.match anywhere.♻️ Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents