baoyu-skills: Specialized Agent Tools for Content Generation

repository·main·Indexed 31 days ago

https://github.com/jimliu/baoyu-skills

A collection of specialized tools for AI agents to perform tasks like generating cover images, infographics, social media content, and SVG diagrams. Includes baoyu-codex-imagegen for image generation via Codex CLI, baoyu-fetch for extracting web content as Markdown or JSON using Chrome CDP, baoyu-xhs-images for Xiaohongshu-style cards, baoyu-infographic for professional layouts, and baoyu-diagram for SVG-based flowcharts and sequence diagrams.

Tokens
195.2K
Snippets
172
Records
737
Agent score
96%

What's inside baoyu-skills

  1. Overview of baoyu-format-markdown

    main

    The baoyu-format-markdown skill transforms plain text or markdown into well-structured, reader-friendly markdown. It adds frontmatter, titles, summaries, headings, bold text, lists, and code blocks to improve layout and readability.

    Core Principle: The skill only adjusts formatting and fixes obvious typos. It never adds, deletes, or rewrites the original content.

  2. Overview of the baoyu-diagram skill

    main

    The baoyu-diagram skill is a professional SVG diagram generator designed to create high-quality, dark-themed technical visualizations. It supports a wide range of diagram types including Architecture, Flowcharts, Sequence, Structural, Mind Maps, Timelines, Illustrative, State Machines, and Data Flow diagrams.

    All outputs are single, self-contained .svg files with embedded styles and fonts, making them easy to use in any web or documentation environment. The skill is triggered by requests for diagrams (e.g., "draw a flowchart", "architecture diagram") or when a user asks to visualize uploaded content.

  3. Overview of baoyu-wechat-summary

    main

    The baoyu-wechat-summary skill extracts highlights from WeChat group chats and converts them into structured, readable digests. It maintains long-term group history, user profiles, and group-level fact memory across multiple runs.

    Key Features:

    • Two Digest Modes: Generates a normal digest by default, with an optional roast (毒舌) version for a more critical/humorous tone.
    • Memory Management: Tracks per-group history (history.json, history-digests.jsonl), per-user profiles, and group facts (memory.md).
    • External Dependency: Relies on the wx-cli binary (the wx command). It does not bundle the script itself.

    ⚠️ Sandbox Warning: Because wx-cli accesses ~/.wx-cli/ and WeChat's data directory (e.g., ~/Library/Containers/com.tencent.xinWeChat/ on macOS), all wx commands must be executed with dangerouslyDisableSandbox: true in environments like Claude Code.

  4. Overview of baoyu-slide-deck

    main

    The baoyu-slide-deck skill transforms content into professional slide deck images designed for reading and sharing (e.g., social media or logical scrolling) rather than live presentations. It works by first creating outlines with style instructions and then generating individual slide images as raster assets.

    Key Capabilities:

    • Generates high-quality slide images from text content.
    • Supports various image generation backends (Codex, Cursor, etc.).
    • Can merge generated images into PowerPoint (.pptx) or PDF formats.
    • Allows customization of style, audience, language, and slide count.
  5. Post content to WeChat Official Account

    main

    The baoyu-post-to-wechat skill allows you to publish content to a WeChat Official Account (微信公众号) using either the WeChat API or a Chrome browser (via CDP). It supports two main formats:

    1. Articles (文章): Long-form content using HTML, Markdown, or plain text. Markdown input automatically converts external links into bottom citations for a cleaner WeChat look (unless --no-cite is used).
    2. Image-Text Posts (图文): Short posts consisting of multiple images (up to 9) and text.

    Publishing Methods

    • api (Recommended): Fast; requires API credentials and your local IP to be in the WeChat allowlist.
    • browser: Slower; uses Chrome with a logged-in session via CDP.
    • remote-api: Fast; used when your local IP is not allowlisted but a remote server's IP is. It tunnels outbound HTTPS calls to WeChat through an SSH SOCKS5 dynamic port forward. No files or secrets are stored on the remote host.
  6. Understand the Chunked Refined Translation process

    main

    When content exceeds the chunk threshold in Refined mode, the system uses a distributed approach between a Main Agent and multiple **Subagents":

    1. Main Agent performs analysis on the entire document $\rightarrow$ 01-analysis.md.
    2. Main Agent assembles the global translation prompt $\rightarrow$ 02-prompt.md.
    3. Content is split into chunks in the chunks/ directory.
    4. Subagents (one per chunk) are spawned in parallel. Each subagent reads 02-prompt.md to ensure context consistency and produces a chunk draft.
    5. All chunk results are merged into 03-draft.md.
    6. Main Agent performs the Critical Review $\rightarrow$ 04-critique.md.
    7. Main Agent performs Revision $\rightarrow$ 05-revision.md.
    8. Main Agent performs final Polish $\rightarrow$ translation.md.
    9. Final Step: A cross-chunk consistency check is performed on terminology, narrative flow, and transitions at chunk boundaries.
  7. Post to X (Twitter) Overview

    main

    The baoyu-post-to-x skill allows posting text, images, videos, and long-form articles (X Articles) to X via a real Chrome browser. It supports multiple execution modes depending on the user's environment and preference:

    • Codex Chrome Plugin Mode: Uses the user's real Chrome profile and X login via the bundled Chrome extension. This is the required mode when the user explicitly requests @chrome or the Codex Chrome plugin.
    • Chrome Computer Use Mode: Uses mcp__computer_use__.* to interact with the visible Google Chrome UI. This is the preferred default if no specific plugin preference is stated.
    • CDP Script Mode: A fallback mode using Chrome DevTools Protocol scripts, used only when other modes are unavailable or explicitly requested.

    Note: Never use the in-app Browser for X publishing workflows.

  8. Publish Markdown articles to X Articles

    main

    The baoyu-post-to-x skill allows you to publish Markdown articles to the X Articles editor with rich text formatting and images. It supports three distinct workflows depending on the user's request or availability:

    1. Codex Chrome Plugin Workflow: Triggered by requests for "Codex Chrome plugin", "@chrome", or "Chrome Extension". Uses the chrome:Chrome skill and its Node REPL browser client.
    2. Computer Use Workflow: Triggered by explicit requests for "Chrome Computer Use". Uses Codex Computer Use against Google Chrome.
    3. CDP Script Workflow: The fallback method used if Computer Use is unavailable or blocked, or if the user explicitly requests "CDP/script mode".

    Prerequisites:

    • X Premium subscription (required for Articles)
    • Google Chrome installed
    • bun installed
  9. Use the baoyu-comic skill for knowledge comic creation

    main

    The baoyu-comic skill is designed to create original educational comics (e.g., "knowledge comics", "biography comics", "tutorial comics") using flexible art style and tone combinations. It supports detailed panel layouts and batch image generation.

    Key Capabilities:

    • Art Styles: Choose from ligne-claire, manga, realistic, ink-brush, chalk, or minimalist.
    • Tones: Set the mood using neutral, warm, dramatic, romantic, energetic, vintage, or action.
    • Layouts: Control panel arrangement with standard, cinematic, dense, splash, mixed, webtoon, or four-panel.
    • Presets: Use specialized presets like ohmsha, wuxia, shoujo, concept-story, or four-panel which bundle specific art and tone settings.
  10. Understand WeChat digest output formats (Normal vs. Roast)

    main

    The baoyu-wechat-summary skill produces two types of digests:

    1. Normal version (Default): A sober, professional summary of group chat activity. It serves as the source of truth for profile updates and incremental mode.
    2. Roast version (Opt-in via include_roast=true): A sarcastic, sharp, and provocative critique of the chat activity. It uses the same structure as the normal version but with a different tone, leaderboard annotations, and user portraits.

    Key differences:

    • Tone: Normal is professional; Roast is sharp and mocking (but not malicious).
    • Title: Roast version includes a "毒舌版" suffix.
    • Pain-points: The Pain-point section is omitted in the Roast version.
    • @bot Q&A: In Roast mode, this becomes the "毒舌值班版" (Roast Duty version) with a mocking tone.
    • Footer: Normal uses a standard footer; Roast uses a disclaimer about being an emotionless AI.
    • User Portraits: Roast uses a "不留情面版" (Merciless version) that highlights flaws and contradictions.
  11. Use the baoyu-article-illustrator skill

    main

    The baoyu-article-illustrator skill analyzes articles to identify where visual aids are needed and generates consistent illustrations using a Type × Style × Palette approach.

    Triggering the skill: You can invoke this skill by asking to:

    • "illustrate article"
    • "add images"
    • "generate images for article"
    • "为文章配图"

    Core Concept: The Three Dimensions To ensure visual consistency, the skill uses three dimensions to define an image:

    1. Type: The information structure (e.g., infographic, scene, flowchart, comparison, framework, timeline).
    2. Style: The rendering approach (e.g., notion, warm, minimal, blueprint, watercolor, elegant).
    3. Palette: The color scheme (e.g., macaron, warm, neon).

    You can combine these manually or use a --preset flag (e.g., --preset edu-visual) to apply a pre-defined combination.

    # Example manual combination
    --type infographic --style vector-illustration --palette macaron
    
    # Example using a preset
    --preset edu-visual
  12. Extract resources and code from Electron apps

    main

    The baoyu-electron-extract skill allows you to decompile or inspect the source code of an installed Electron application. It extracts the app.asar bundle and attempts to reconstruct the original source tree using .js.map files (if they contain sourcesContent). If source maps are unavailable, it falls back to extracting the raw files and formatting the minified JavaScript/CSS with Prettier.

    Key Features

    • Source-map Restoration: Rebuilds the original directory structure (e.g., src/main.ts) inside a restored/ directory.
    • Prettier Formatting: Automatically formats minified code if source maps are missing.
    • Platform Support: Works on macOS and Windows. It automatically searches standard installation directories (like /Applications or %LOCALAPPDATA%\Programs).
    • Noise Reduction: Always skips node_modules and bundler runtime files to focus on the application's actual source code.
    # Example: Extracting the 'Codex' app
    ${BUN_X} {baseDir}/scripts/main.ts Codex