Token导航 LogoToken导航TokenDH.com
待分类敏感数据github未标认证来源可访问许可证需确认审计通过

multimedia-backend-integrator多媒体后端集成商

Agent Skill

multimedia-backend-integrator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

512

周安装

22

GitHub Stars

968

下载量

180
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:multimedia-backend-integrator(多媒体后端集成商)
来源仓库:https://github.com/massgen/massgen
仓库路径:skills/multimedia-backend-integrator
安装命令:
npx skills add https://github.com/massgen/massgen --skill multimedia-backend-integrator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/massgen/massgen --skill multimedia-backend-integrator

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 使用时需注意 API 调用频率限制和数据隐私边界。

SKILL.md

Multimedia Backend Integrator

Reference guide for adding new media generation backends to MassGen's unified generate_media tool.

Architecture Overview

_base.py          -- Registration: API keys, default models, priority lists
_selector.py      -- Auto-selection logic: picks best backend by key + priority
_image.py         -- Image backends: OpenAI, Google (Gemini/Imagen), Grok, OpenRouter
_video.py         -- Video backends: Grok, Google Veo, OpenAI Sora
_audio.py         -- Audio backends: ElevenLabs, OpenAI TTS
generate_media.py -- Entry point: routing, validation, batch mode, image-to-image

Complete Checklist: Adding a New Backend

1. Registration (_base.py)

  • Add to BACKEND_API_KEYS: map backend name to env var(s)
  • Add to DEFAULT_MODELS: map backend name to {MediaType: model_name} for each supported type
  • Add to BACKEND_PRIORITY: insert at correct position per media type

2. Implementation (_image.py / _video.py / _audio.py)

  • Add import for SDK at module top
  • Implement _generate_{media}_{backend}(config) -> GenerationResult
  • Check API key first, return error result if missing
  • Create SDK client with API key
  • Map config.* fields to SDK parameters
  • Handle continuation (if applicable) — see Continuation Store Patterns
  • Write output bytes to config.output_path
  • Return GenerationResult with metadata
  • Wrap in try/except, log errors

3. Dispatcher Update

  • Add elif backend == "new_backend": in the media type's generate_{media}() function

4. Image-to-Image Support (generate_media.py)

  • Add backend name to the selected_backend not in (...) check in _generate_single_with_input_images
  • Add fallback: elif has_api_key("new_backend"): in the auto-selection chain
  • Update error message to mention new backend + env var

5. Documentation

  • TOOL.md: Add env var to frontmatter, backend to tables, keywords
  • generate_media.py docstring: Update backend_type list and Supported Backends

6. Tests

  • Backend registration tests (API keys, default models, priority order)
  • Auto-selection tests (with only this backend's key, with multiple keys)
  • SDK call verification (correct params passed through)
  • Output file written correctly
  • Continuation flow (if applicable)
  • Error handling (missing key, API errors)
  • Parameter mapping (aspect_ratio, size, duration)
  • Update existing tests that assert priority list length/contents

Continuation Store Patterns

Each backend that supports iterative editing needs a continuation mechanism:

BackendStore TypeKey FormatWhat's StoredHow Continuation Works
OpenAIStateless (server-side)response.idNothing locallyPass previous_response_id to next call
Gemini_GeminiChatStore (in-memory)gemini_chat_{uuid12}(client, chat) tuplesReuse chat object for send_message(); client kept alive to prevent HTTP connection GC
Grok_GrokImageStore (in-memory)grok_img_{uuid12}Base64 stringsPass stored base64 as image_url data URI

Store Pattern Template

class _NewBackendStore:
    def __init__(self, max_items: int = 50):
        self._store: OrderedDict[str, Any] = OrderedDict()
        self._max = max_items

    def save(self, data: Any) -> str:
        store_id = f"prefix_{uuid.uuid4().hex[:12]}"
        if len(self._store) >= self._max:
            self._store.popitem(last=False)  # LRU eviction
        self._store[store_id] = data
        return store_id

    def get(self, store_id: str) -> Any | None:
        return self._store.get(store_id)

_store = _NewBackendStore()

Common Pitfalls

  1. Missing from priority list — Backend works when explicitly specified but never auto-selected
  2. Sync vs async — Some SDKs are sync-only; wrap in asyncio.to_thread() if needed
  3. Ephemeral URLs — Some APIs return temporary URLs; always prefer base64 or download immediately
  4. Falsy durationduration or default treats 0 as falsy; use if duration is not None
  5. Existing test breakage — Adding to priority list changes auto-selection; update existing tests that clear env vars
  6. Image-to-image gating — The _generate_single_with_input_images function has a backend allowlist

Reference Files

FilePurpose
massgen/tool/_multimodal_tools/generation/_base.pyAPI keys, default models, priorities
massgen/tool/_multimodal_tools/generation/_selector.pyBackend auto-selection logic
massgen/tool/_multimodal_tools/generation/_image.pyImage generation backends
massgen/tool/_multimodal_tools/generation/_video.pyVideo generation backends
massgen/tool/_multimodal_tools/generation/_audio.pyAudio generation backends
massgen/tool/_multimodal_tools/generation/generate_media.pyEntry point and routing
massgen/tool/_multimodal_tools/TOOL.mdUser-facing documentation
massgen/tests/test_grok_multimedia_generation.pyReference: Grok backend tests
massgen/tests/test_grok_multimedia_backend_selection.pyReference: Grok selection tests
massgen/tests/test_multimodal_image_backend_selection.pyReference: image selection tests

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.68%
按下载量换算66

Claude

29.39%
按下载量换算53

Cursor

19.36%
按下载量换算35

Gemini CLI

10.12%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills