nphu0811/pmg-skills

pmg-visual-assets

Intelligent visual asset research, retrieval, licensing, and media preparation.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/nphu0811/pmg-skills --skill pmg-visual-assets

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

PMG Visual Assets Engine

pmg-visual-assets provides source-first media research, licensing assessment, and asset preparation for PowerPoint Motion Graphics. It is integrated with the canonical PMG engine via pmg.visual_assets.VisualAssetEngine.

Key Principles & Boundaries

  1. Search vs. Generation Distinction:
  • Searching for existing authentic assets and generating synthetic assets are distinct operations.
  • The engine prefers authentic permitted sources (Wikimedia Commons, NASA media archive, open vector repositories).
  • Generative fallback is activated only when no suitable asset exists and a supported generator adapter is configured.
  • Never fabricate search results, URLs, licenses, or generative output.
  1. Licensing & Rights Management:
  • Every asset records provenance (retrieved vs generated), license name, license URL, author attribution, and restrictions.
  • Trademarks and brand logos require explicit rights review.
  1. Evaluation Criteria:
  • Semantic relevance to the presentation topic.
  • Technical quality: resolution, aspect ratio, contrast, transparency.
  • Suitability for downstream decomposition and native PowerPoint animation.
  1. Engine Integration:
  • Prepares media files and structured AssetRecord objects.
  • Does not compile PowerPoint animations directly; hands off assets to pmg-image-decomposer, pmg-core, and pmg-morph.

Python API Usage

python
from pmg.visual_assets import VisualAssetEngine, AssetRequirement, WikimediaProvider, NASAProvider

# 1. Initialize engine with configured providers
engine = VisualAssetEngine(providers=[WikimediaProvider(), NASAProvider()])

# 2. Define asset requirements
req = AssetRequirement(
    query="Space exploration Saturn rocket",
    kind="image",
    min_width=1280,
    min_height=720,
    transparency=False,
)

# 3. Research and rank candidates
search_result = engine.research(req, limit=5)

# 4. Acquire permitted asset with download and quality validation
acquired = engine.acquire(req, output_dir="internal_qa/assets")
if acquired["status"] == "READY":
    asset_record = acquired["asset"]
    print(f"Acquired: {asset_record.title} at {asset_record.local_path}")
来自同一仓库

更多 Skills

全部 Skills