基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/genfeedai/skills --skill media-forge命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Detect Genfeed connectivity and expose the gf CLI for content-loop state, tokens, manifests, stage transitions, and feedback.
Create paid ad copy for Meta, Google, LinkedIn, TikTok, and X using direct-response frameworks, platform limits, variants, and test plans. Triggers on ad headlines, ad creative, paid social ads, Google ads, and ad variants.
Analyze paid media performance, diagnose issues, and provide optimization recommendations across all major ad platforms. Triggers on "analyze ad performance", "ad metrics", "why is my ROAS low", "ad optimization", "campaign performance", "creative fatigue", "ad budget allocation".
| name | media-forge |
| description | Generate image, video, and audio artifacts through Replicate or fal.ai and emit downloaded MediaArtifact JSON. |
| license | MIT |
| metadata | {"author":"genfeedai","version":"1.0.0"} |
You turn a prompt into a file. Image, video, or audio — through Replicate or fal.ai, the two aggregators that front nearly every open and commercial generative model. You are the media half of produce in trend -> remix -> produce -> post -> analytic.
Pure worker: no state, no SDK, no persisted secret. You read one token from the environment, submit a job, wait for it, download the outputs, and print MediaArtifact JSON. The orchestrator resolves the token (gf token replicate|fal), runs you, and attaches your artifacts to a ContentItem through the seam.
bun run scripts/forge.ts \
--provider replicate|fal \
--modality image|video|audio \
--model <model-id> \
--prompt "..." \
[--input '{"aspect_ratio":"16:9","num_outputs":2}'] \
[--out .genfeed/artifacts]
Requires Bun 1.1+. Zero dependencies — only Node built-ins and global fetch.
--input is merged over {prompt} and passed verbatim as the model's input object, so any model-specific parameter is reachable without code changes.
REPLICATE_API_TOKEN.POST /v1/predictions endpoint, which accepts owner/name, owner/name:version, or a bare version id as --model.Prefer: wait for synchronous completion, then polls urls.get for anything still running.bun run scripts/forge.ts --provider replicate --modality image \
--model black-forest-labs/flux-1.1-pro --prompt "a t-rex on a skateboard, cinematic"
FAL_KEY.POST https://queue.fal.run/<model>, polls the returned status_url until COMPLETED, then fetches response_url.bun run scripts/forge.ts --provider fal --modality video \
--model fal-ai/ltx-video --prompt "neon city flyover at night"
Both providers cap waiting at ~10 minutes (240 polls × 2.5s), enough for slow video jobs.
Outputs are downloaded into --out (default .genfeed/artifacts), one file per result, named art_<uuid>.<ext> (extension inferred from the URL, else png/mp4/mp3 by modality). stdout is:
{
"count": 1,
"artifacts": [
{
"id": "art_2f1c...",
"modality": "image",
"provider": "replicate",
"model": "black-forest-labs/flux-1.1-pro",
"prompt": "a t-rex on a skateboard, cinematic",
"path": ".genfeed/artifacts/art_2f1c....png",
"meta": { "sourceUrl": "https://...", "index": 0, "createdAt": "..." }
}
]
}
Each artifact matches the MediaArtifact shape in genfeed-connector/lib/schema.ts, so the orchestrator can push it straight onto ContentItem.artifacts[].
Output URLs are extracted by walking the provider's response JSON and collecting every http(s) URL, so it works across model output shapes (string, array, {images:[{url}]}, {video:{url}}, {audio:{url}}, …) without per-model branching.
# orchestrator resolves a scoped token through the seam, never seeing the raw vault credential
export REPLICATE_API_TOKEN="$(bun run ../genfeed-connector/gf.ts token replicate)"
# forge a hero image for an item, capture artifacts
ART=$(bun run scripts/forge.ts --provider replicate --modality image \
--model black-forest-labs/flux-1.1-pro --prompt "$THESIS")
# orchestrator merges $ART.artifacts into the ContentItem and advances the stage
REPLICATE_API_TOKEN, FAL_KEY) are read from the environment, used in memory, and never written to any file. Resolve them through the connector so the long-lived credential stays in the env or the genfeed vault.--out; nothing else touches the filesystem.