Agent Skillsopensquilla/opensquilla › title-card-image

title-card-image

GitHub

使用 Pillow 渲染包含标题和副标题的静态 PNG 封面或结尾卡片。支持 CJK 字体回退与字形验证,避免乱码,适用于短视频元数据生成。

src/opensquilla/skills/bundled/title-card-image/SKILL.md opensquilla/opensquilla

Trigger Scenarios

需要生成视频封面图 需要生成视频结尾卡 将文本渲染为静态图片

Install

npx skills add opensquilla/opensquilla --skill title-card-image -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/title-card-image -g -y

Use without installing

npx skills use opensquilla/opensquilla@title-card-image

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill title-card-image -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

SKILL.md

Frontmatter
{
    "name": "title-card-image",
    "metadata": {
        "opensquilla": {
            "risk": "low",
            "requires": {
                "anyBins": [
                    "python",
                    "python3"
                ]
            },
            "capabilities": [
                "filesystem-write"
            ]
        }
    },
    "entrypoint": {
        "args": [
            "--text",
            "{{ with.text }}",
            "--output",
            "{{ with.output }}",
            "--subtitle",
            "{{ with.subtitle | default('') }}",
            "--background",
            "{{ with.background | default('#101018') }}",
            "--text-color",
            "{{ with.text_color | default('#ffffff') }}",
            "--font-size",
            "{{ with.font_size | default(96) }}",
            "--subtitle-size",
            "{{ with.subtitle_size | default(36) }}",
            "--width",
            "{{ with.width | default(720) }}",
            "--height",
            "{{ with.height | default(1280) }}",
            "--font",
            "{{ with.font | default('') }}"
        ],
        "parse": "text",
        "command": "python {baseDir}\/scripts\/render.py",
        "timeout": 30
    },
    "provenance": {
        "origin": "opensquilla-original",
        "license": "Apache-2.0"
    },
    "description": "Render a static title \/ ending card PNG with Pillow. Centered headline + optional subtitle on a solid-colour background. Uses managed or platform CJK fonts with glyph verification and fails actionably instead of rendering tofu. Pure deterministic, no LLM, no network. Used by meta-short-drama for opening and closing cards.",
    "description_zh": "使用 Pillow 渲染静态片头\/片尾 PNG,在纯色背景上居中显示标题和可选副标题。使用托管或平台 CJK 字体并验证字形;无法正确渲染时给出可操作错误,而不是输出方框字。过程完全确定,不使用 LLM 或网络。由 meta-short-drama 生成片头片尾卡。"
}

title-card-image

Renders a centered-text PNG suitable for a cover / ending card before animating into a clip with video-still-animator.

Inputs (with:)

key required default notes
text yes Headline text. Auto-wraps at ~10 chars per line for CJK.
output yes Output .png path.
subtitle no "" Smaller line beneath the headline.
background no #101018 Hex color #RRGGBB.
text_color no #ffffff Headline color.
font_size no 96 Headline font size in pixels.
subtitle_size no 36 Subtitle font size in pixels.
width no 720 Output width in pixels. Match the merge pipeline.
height no 1280 Output height. 720x1280 = 9:16.
font no "" Optional .ttf, .otf, or .ttc path. Must contain the requested CJK glyphs.

Output

Prints the absolute path of the written PNG on stdout. The PNG is RGB (no alpha), JPEG-quality-equivalent file ~30-80 KB depending on text length.

Font fallback

Resolution order is --font, the managed media directory from OPENSQUILLA_MEDIA_FONTS_DIR, user font directories, then platform defaults: Microsoft YaHei / SimHei / DengXian on Windows; PingFang / Hiragino Sans GB / STHeiti / Songti on macOS; Noto CJK / Source Han / WenQuanYi on Linux. Font collection files (.ttc/.otc) are supported. Before drawing, the renderer compares requested non-ASCII glyphs with the font's missing-glyph signature. A font that would produce tofu is skipped. If no compatible scalable font exists, the step fails with an actionable --font / OPENSQUILLA_MEDIA_FONTS_DIR message for CJK or other non-ASCII text; it never silently emits tiny bitmap squares. Pure ASCII cards remain available on minimal systems through Pillow's built-in font when no scalable font is installed.

Limits

  • No alpha / transparency.
  • No rich text styling (italic / drop-shadow / gradient). For richer cards, generate a real image via nano-banana-pro instead.
  • Headline wrap is character-count-based for CJK and whitespace-based for ASCII; mixed strings break at the CJK character count.

Version History

  • 95673be Current 2026-08-07 01:00

    增强字体回退机制,增加字形验证以防止渲染豆腐块;新增 font_size、subtitle_size、width、height 配置项;优化 ASCII 纯文本在最小系统下的兼容性。

  • f662be3 2026-07-31 11:50
  • 7f72a32 2026-07-05 18:40

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/audio-cog/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/git-diff/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-artifact-runtime/SKILL.md
src/opensquilla/skills/bundled/paper-citation-integrity-gate/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-delivery-summary/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-latex-sanitizer/SKILL.md
src/opensquilla/skills/bundled/paper-length-gate/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-quality-gate/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/paper-source-readiness-gate/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/short-drama-delivery-audit/SKILL.md
src/opensquilla/skills/bundled/short-drama-review-normalizer/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md

Metadata

Files
0
Version
95673be
Hash
38488949
Indexed
2026-07-05 18:40

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 22:59
浙ICP备14020137号-1 $bản đồ khách truy cập$