跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
其他技能

paw-cra-multi-platform-export

Convert master assets into platform-variant exports with safe-zone enforcement. Use when the user requests to 'export for all platforms', 'resize assets for platforms', or 'multi-platform export'.

pawbytes · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add pawbytes/skill-suites --skill paw-cra-multi-platform-export

技能说明


name: paw-cra-multi-platform-export description: Convert master assets into platform-variant exports with safe-zone enforcement. Use when the user requests to 'export for all platforms', 'resize assets for platforms', or 'multi-platform export'.

Multi-Platform Export

Overview

This workflow converts approved master visual and video assets into all target platform variants — resized, re-encoded, and organized into a delivery-ready folder structure with a machine-readable manifest. It handles both images and videos in a single unified pipeline, enforcing safe zones so critical content (text, logos, faces) is never cropped or obscured by platform UI.

Args: Accepts --headless / -H for non-interactive execution. In headless mode, requires master asset path(s) and target platform list as arguments or reads them from the active campaign brief.

Output: Platform-variant files organized by platform in folders, plus export-manifest.json describing every variant with its specs.

Act as a technical export specialist who understands platform constraints, codec requirements, and safe-zone geometry. Prioritize visual integrity — a variant that preserves the master's intent at slightly lower resolution is always better than one that crops critical content to hit exact pixel dimensions.

On Activation

Load available config from {project-root}/.pawbytes/config/config.yaml and {project-root}/.pawbytes/config/config.user.yaml (root level and cra section). If config is missing, let the user know paw-cra-setup can configure the module at any time. Resolve and apply throughout the session (defaults in parens):

  • {output_directory} (.pawbytes/creative-suites) — base output path
  • {default_brand} (null) — active brand for naming convention

Load shared agency memory from {project-root}/.pawbytes/creative-suites/index.md if available. If an active campaign exists, read the campaign brief for brand name and campaign name (used in file naming).

Tool Verification: Check for ffmpeg availability — it is required for both image and video processing. If missing, abort with install instructions (winget install ffmpeg / brew install ffmpeg). ImageMagick is optional and enhances image-specific operations.

If --headless, proceed directly with provided inputs. Otherwise, greet the user and ask for master asset(s) and target platforms.


Pipeline

Step 1 — Source Intake

Collect inputs:

  • Master asset(s): One or more file paths (images or videos). Detect media type from extension and ffprobe metadata.
  • Target platforms: Which platforms to export for. If not specified, default to all supported platforms.
  • Brand and campaign name: For the naming convention. Infer from active campaign context or ask.

Supported platforms: Instagram, TikTok, YouTube, Facebook, LinkedIn, Twitter/X, Pinterest, Google Business.

Classify each source file:

  • Image: .png, .jpg, .jpeg, .webp, .tiff, .bmp, .svg
  • Video: .mp4, .mov, .avi, .mkv, .webm

Step 2 — Platform Spec Lookup

Load ./references/platform-export-specs.md for complete platform specifications including dimensions, aspect ratios, safe zones, file size limits, codec requirements, and duration limits.

For each source asset + target platform combination, determine:

  • Target dimensions and aspect ratio
  • Safe-zone insets (pixels from each edge where platform UI overlays content)
  • File size ceiling
  • For video: codec, bitrate, max duration, subtitle handling

Step 3 — Image Export

For each image + platform pair:

  1. Analyze source — get dimensions, aspect ratio, identify focal content region using ffprobe or ImageMagick identify
  2. Resize strategy — choose the approach that best preserves the master's intent:
    • Same aspect ratio: Scale proportionally
    • Minor crop needed: Crop centered on focal point, verify critical content stays inside safe zone
    • Major aspect change: Prefer letterboxing/pillarboxing with brand-colored bars over aggressive cropping. If user prefers cropping, confirm focal point first.
  3. Safe-zone enforcement — after resize/crop, verify no critical content (text overlays, logos, key subjects) falls outside the safe zone. Critical content must have at least the platform's safe-zone inset from every edge.
  4. Re-encode — JPEG (quality 90) for photographs, PNG for graphics with transparency. Keep under the platform's file size limit. If over limit, reduce JPEG quality progressively (85 → 80 → 75) until compliant.
  5. Verify — confirm final dimensions match spec, file size is under limit.

ffmpeg examples for image resize:

# Scale to fit within dimensions, maintaining aspect ratio
ffmpeg -i master.png -vf "scale=1080:1350:force_original_aspect_ratio=decrease,pad=1080:1350:(ow-iw)/2:(oh-ih)/2:color=#000000" output.jpg

# Crop to exact dimensions centered on focal point
ffmpeg -i master.png -vf "scale=1080:-1,crop=1080:1080" output.jpg

Step 4 — Video Export

For each video + platform pair:

  1. Probe source — get resolution, duration, codec, bitrate, subtitle tracks using ffprobe
  2. Duration check — if source exceeds platform max duration, warn the user (do not auto-trim in headless mode — flag it in the manifest as duration_exceeded)
  3. Aspect ratio adjustment:
    • Horizontal to vertical (e.g., 16:9 to 9:16): Smart crop centered on the action area. Prefer cropping over letterboxing for vertical video platforms (TikTok, Reels).
    • Vertical to horizontal: Pillarbox with blurred background or brand-colored bars.
    • Same ratio, different resolution: Scale directly.
  4. Re-encode — H.264 (libx264), AAC audio, platform-appropriate bitrate. Target CRF 18-23 depending on platform ceiling.
  5. Subtitle repositioning — if source has subtitle tracks and aspect ratio changed, re-position to stay within the new safe zone. For burned-in subtitles, re-render at adjuste
阅读完整来源 ↗