AgentSkillsCN

auto-blog-cover

自动完成博客文章封面的制作与设置流程。程序会读取 Markdown 文件,根据标题与副标题生成封面图像,随后上传至云端并更新文件的 frontmatter(例如 banner_img)。

SKILL.md
--- frontmatter
name: auto-blog-cover
description: Automates the process of creating and setting blog post covers. Reads a markdown file, generates a cover image based on title/subtitle, uploads it, and updates the file's frontmatter (e.g., banner_img).

Auto Blog Cover Skill

An end-to-end workflow automation for blog writers. It connects parsing, generation, uploading, and editing into a single command.

Prerequisites

  1. Dependencies:
    bash
    pip install -r skills/auto-blog-cover/requirements.txt
    
  2. Related Skills: Requires cover-generator and image-uploader to be present and configured.

Usage

bash
python3 skills/auto-blog-cover/auto_blog_cover.py <path_to_markdown_file> [options]

Options

  • filepath: Path to the markdown post (Required).
  • --title: Manually specify title (overrides file content).
  • --subtitle: Manually specify subtitle.
  • --theme: Color theme (random, dark, light, blue).
  • --fields: Comma-separated Frontmatter fields to update. Default: banner_img,index_img.

Examples

Auto-detect everything:

bash
python3 skills/auto-blog-cover/auto_blog_cover.py content/posts/my-new-post.md

Override text (AI assisted scenario):

bash
python3 skills/auto-blog-cover/auto_blog_cover.py _posts/2024-02-01-ai.md \
  --title "AI Evolution" \
  --subtitle "From Function Call to MCP"

Custom fields for different blog engine:

bash
python3 skills/auto-blog-cover/auto_blog_cover.py post.md --fields "cover_image,og_image"