feat: add baoyu- prefix

This commit is contained in:
Jim Liu 宝玉 2026-01-15 14:18:56 -06:00
parent f49acb9983
commit da920bb830
51 changed files with 82 additions and 77 deletions

View File

@ -6,7 +6,7 @@
}, },
"metadata": { "metadata": {
"description": "Skills shared by Baoyu for improving daily work efficiency", "description": "Skills shared by Baoyu for improving daily work efficiency",
"version": "0.3.1" "version": "0.4.0"
}, },
"plugins": [ "plugins": [
{ {
@ -15,13 +15,13 @@
"source": "./", "source": "./",
"strict": false, "strict": false,
"skills": [ "skills": [
"./skills/gemini-web", "./skills/baoyu-gemini-web",
"./skills/xhs-images", "./skills/baoyu-xhs-images",
"./skills/post-to-x", "./skills/baoyu-post-to-x",
"./skills/post-to-wechat", "./skills/baoyu-post-to-wechat",
"./skills/article-illustrator", "./skills/baoyu-article-illustrator",
"./skills/cover-image", "./skills/baoyu-cover-image",
"./skills/slide-deck" "./skills/baoyu-slide-deck"
] ]
} }
] ]

View File

@ -10,12 +10,13 @@ Claude Code marketplace plugin providing AI-powered content generation skills. S
``` ```
skills/ skills/
├── gemini-web/ # Core: Gemini API wrapper (text + image gen) ├── baoyu-gemini-web/ # Core: Gemini API wrapper (text + image gen)
├── xhs-images/ # Xiaohongshu infographic series (1-10 images) ├── baoyu-xhs-images/ # Xiaohongshu infographic series (1-10 images)
├── cover-image/ # Article cover images (2.35:1 aspect) ├── baoyu-cover-image/ # Article cover images (2.35:1 aspect)
├── slide-deck/ # Presentation slides with outlines ├── baoyu-slide-deck/ # Presentation slides with outlines
├── article-illustrator/ # Smart illustration placement ├── baoyu-article-illustrator/ # Smart illustration placement
└── post-to-x/ # X/Twitter posting automation ├── baoyu-post-to-x/ # X/Twitter posting automation
└── baoyu-post-to-wechat/ # WeChat Official Account posting
``` ```
Each skill contains: Each skill contains:
@ -34,24 +35,24 @@ npx -y bun skills/<skill>/scripts/main.ts [options]
Examples: Examples:
```bash ```bash
# Text generation # Text generation
npx -y bun skills/gemini-web/scripts/main.ts "Hello" npx -y bun skills/baoyu-gemini-web/scripts/main.ts "Hello"
# Image generation # Image generation
npx -y bun skills/gemini-web/scripts/main.ts --prompt "A cat" --image cat.png npx -y bun skills/baoyu-gemini-web/scripts/main.ts --prompt "A cat" --image cat.png
# From prompt files # From prompt files
npx -y bun skills/gemini-web/scripts/main.ts --promptfiles system.md content.md --image out.png npx -y bun skills/baoyu-gemini-web/scripts/main.ts --promptfiles system.md content.md --image out.png
``` ```
## Key Dependencies ## Key Dependencies
- **Bun**: TypeScript runtime (via `npx -y bun`) - **Bun**: TypeScript runtime (via `npx -y bun`)
- **Chrome**: Required for `gemini-web` auth and `post-to-x` automation - **Chrome**: Required for `baoyu-gemini-web` auth and `baoyu-post-to-x` automation
- **No npm packages**: Self-contained TypeScript, no external dependencies - **No npm packages**: Self-contained TypeScript, no external dependencies
## Authentication ## Authentication
`gemini-web` uses browser cookies for Google auth: `baoyu-gemini-web` uses browser cookies for Google auth:
- First run opens Chrome for login - First run opens Chrome for login
- Cookies cached in data directory - Cookies cached in data directory
- Force refresh: `--login` flag - Force refresh: `--login` flag
@ -62,10 +63,14 @@ npx -y bun skills/gemini-web/scripts/main.ts --promptfiles system.md content.md
## Adding New Skills ## Adding New Skills
1. Create `skills/<name>/SKILL.md` with YAML front matter **IMPORTANT**: All skills MUST use `baoyu-` prefix to avoid conflicts when users import this plugin.
2. Add TypeScript in `skills/<name>/scripts/`
3. Add prompt templates in `skills/<name>/prompts/` if needed 1. Create `skills/baoyu-<name>/SKILL.md` with YAML front matter
4. Register in `marketplace.json` plugins[0].skills array - Directory name: `baoyu-<name>`
- SKILL.md `name` field: `baoyu-<name>`
2. Add TypeScript in `skills/baoyu-<name>/scripts/`
3. Add prompt templates in `skills/baoyu-<name>/prompts/` if needed
4. Register in `marketplace.json` plugins[0].skills array as `./skills/baoyu-<name>`
## Code Style ## Code Style

View File

@ -1,5 +1,5 @@
--- ---
name: article-illustrator name: baoyu-article-illustrator
description: Smart article illustration skill. Analyzes article content and generates illustrations at positions requiring visual aids with multiple style options. Use when user asks to "add illustrations to article", "generate images for article", or "illustrate article". description: Smart article illustration skill. Analyzes article content and generates illustrations at positions requiring visual aids with multiple style options. Use when user asks to "add illustrations to article", "generate images for article", or "illustrate article".
--- ---
@ -11,15 +11,15 @@ Analyze article structure and content, identify positions requiring visual aids,
```bash ```bash
# Auto-select style based on content # Auto-select style based on content
/article-illustrator path/to/article.md /baoyu-article-illustrator path/to/article.md
# Specify a style # Specify a style
/article-illustrator path/to/article.md --style tech /baoyu-article-illustrator path/to/article.md --style tech
/article-illustrator path/to/article.md --style warm /baoyu-article-illustrator path/to/article.md --style warm
/article-illustrator path/to/article.md --style minimal /baoyu-article-illustrator path/to/article.md --style minimal
# Combine with other options # Combine with other options
/article-illustrator path/to/article.md --style playful /baoyu-article-illustrator path/to/article.md --style playful
``` ```
## Options ## Options

View File

@ -1,5 +1,5 @@
--- ---
name: cover-image name: baoyu-cover-image
description: Generate elegant cover images for articles. Analyzes content and creates eye-catching hand-drawn style cover images with multiple style options. Use when user asks to "generate cover image", "create article cover", or "make a cover for article". description: Generate elegant cover images for articles. Analyzes content and creates eye-catching hand-drawn style cover images with multiple style options. Use when user asks to "generate cover image", "create article cover", or "make a cover for article".
--- ---
@ -11,25 +11,25 @@ Generate hand-drawn style cover images for articles with multiple style options.
```bash ```bash
# From markdown file (auto-select style based on content) # From markdown file (auto-select style based on content)
/cover-image path/to/article.md /baoyu-cover-image path/to/article.md
# Specify a style # Specify a style
/cover-image path/to/article.md --style tech /baoyu-cover-image path/to/article.md --style tech
/cover-image path/to/article.md --style warm /baoyu-cover-image path/to/article.md --style warm
/cover-image path/to/article.md --style bold /baoyu-cover-image path/to/article.md --style bold
# Without title text # Without title text
/cover-image path/to/article.md --no-title /baoyu-cover-image path/to/article.md --no-title
# Combine options # Combine options
/cover-image path/to/article.md --style minimal --no-title /baoyu-cover-image path/to/article.md --style minimal --no-title
# From direct text input # From direct text input
/cover-image /baoyu-cover-image
[paste content or describe the topic] [paste content or describe the topic]
# Direct input with style # Direct input with style
/cover-image --style playful /baoyu-cover-image --style playful
[paste content] [paste content]
``` ```

View File

@ -1,5 +1,5 @@
--- ---
name: gemini-web name: baoyu-gemini-web
description: Interacts with Gemini Web to generate text and images. Use when the user needs AI-generated content via Gemini, including text responses and image generation. description: Interacts with Gemini Web to generate text and images. Use when the user needs AI-generated content via Gemini, including text responses and image generation.
--- ---

View File

@ -100,7 +100,7 @@ export async function loadGeminiCookies(
} }
log?.( log?.(
'[gemini-web] Missing Gemini auth cookies. Run `npx -y bun skills/gemini-web/scripts/main.ts --login` to sign in and refresh cookies.', '[gemini-web] Missing Gemini auth cookies. Run `npx -y bun skills/baoyu-gemini-web/scripts/main.ts --login` to sign in and refresh cookies.',
); );
return merged; return merged;
} }
@ -124,7 +124,7 @@ export function createGeminiWebExecutor(
const cookieMap = await loadGeminiCookies(runOptions.config, log); const cookieMap = await loadGeminiCookies(runOptions.config, log);
if (!hasRequiredGeminiCookies(cookieMap)) { if (!hasRequiredGeminiCookies(cookieMap)) {
throw new Error( throw new Error(
'Gemini browser mode requires auth cookies (missing __Secure-1PSID/__Secure-1PSIDTS). Run `npx -y bun skills/gemini-web/scripts/main.ts --login` to sign in and save cookies.', 'Gemini browser mode requires auth cookies (missing __Secure-1PSID/__Secure-1PSIDTS). Run `npx -y bun skills/baoyu-gemini-web/scripts/main.ts --login` to sign in and save cookies.',
); );
} }

View File

@ -16,10 +16,10 @@ function printUsage(exitCode = 0): never {
const profileDir = resolveGeminiWebChromeProfileDir(); const profileDir = resolveGeminiWebChromeProfileDir();
console.log(`Usage: console.log(`Usage:
npx -y bun skills/gemini-web/scripts/main.ts --prompt "Hello" npx -y bun skills/baoyu-gemini-web/scripts/main.ts --prompt "Hello"
npx -y bun skills/gemini-web/scripts/main.ts "Hello" npx -y bun skills/baoyu-gemini-web/scripts/main.ts "Hello"
npx -y bun skills/gemini-web/scripts/main.ts --prompt "A cute cat" --image generated.png npx -y bun skills/baoyu-gemini-web/scripts/main.ts --prompt "A cute cat" --image generated.png
npx -y bun skills/gemini-web/scripts/main.ts --promptfiles system.md content.md --image out.png npx -y bun skills/baoyu-gemini-web/scripts/main.ts --promptfiles system.md content.md --image out.png
Options: Options:
-p, --prompt <text> Prompt text -p, --prompt <text> Prompt text

View File

@ -1,5 +1,5 @@
--- ---
name: post-to-wechat name: baoyu-post-to-wechat
description: Post content to WeChat Official Account (微信公众号). Supports both article posting (文章) and image-text posting (图文). description: Post content to WeChat Official Account (微信公众号). Supports both article posting (文章) and image-text posting (图文).
--- ---

View File

@ -1,5 +1,5 @@
--- ---
name: post-to-x name: baoyu-post-to-x
description: Post content and articles to X (Twitter). Supports regular posts with images and X Articles (long-form Markdown). Uses real Chrome with CDP to bypass anti-automation. description: Post content and articles to X (Twitter). Supports regular posts with images and X Articles (long-form Markdown). Uses real Chrome with CDP to bypass anti-automation.
--- ---
@ -16,16 +16,16 @@ Post content, images, and long-form articles to X using real Chrome browser (byp
```bash ```bash
# Post text only # Post text only
/post-to-x "Your post content here" /baoyu-post-to-x "Your post content here"
# Post with image # Post with image
/post-to-x "Your post content" --image /path/to/image.png /baoyu-post-to-x "Your post content" --image /path/to/image.png
# Post with multiple images (up to 4) # Post with multiple images (up to 4)
/post-to-x "Your post content" --image img1.png --image img2.png /baoyu-post-to-x "Your post content" --image img1.png --image img2.png
# Actually submit the post # Actually submit the post
/post-to-x "Your post content" --submit /baoyu-post-to-x "Your post content" --submit
``` ```
## Prerequisites ## Prerequisites
@ -102,7 +102,7 @@ mcp__playwright__browser_take_screenshot filename="preview.png"
## Example Session ## Example Session
``` ```
User: /post-to-x "Hello from Claude!" --image ./screenshot.png User: /baoyu-post-to-x "Hello from Claude!" --image ./screenshot.png
Claude: Claude:
1. Runs: npx -y bun ./scripts/x-browser.ts "Hello from Claude!" --image ./screenshot.png 1. Runs: npx -y bun ./scripts/x-browser.ts "Hello from Claude!" --image ./screenshot.png
@ -147,16 +147,16 @@ Publish Markdown articles to X Articles editor with rich text formatting and ima
```bash ```bash
# Publish markdown article (preview mode) # Publish markdown article (preview mode)
/post-to-x article /path/to/article.md /baoyu-post-to-x article /path/to/article.md
# With custom cover image # With custom cover image
/post-to-x article article.md --cover ./hero.png /baoyu-post-to-x article article.md --cover ./hero.png
# With custom title # With custom title
/post-to-x article article.md --title "My Custom Title" /baoyu-post-to-x article article.md --title "My Custom Title"
# Actually publish (not just draft) # Actually publish (not just draft)
/post-to-x article article.md --submit /baoyu-post-to-x article article.md --submit
``` ```
## Prerequisites for Articles ## Prerequisites for Articles
@ -292,7 +292,7 @@ JSON output:
## Article Example Session ## Article Example Session
``` ```
User: /post-to-x article ./blog/my-post.md --cover ./thumbnail.png User: /baoyu-post-to-x article ./blog/my-post.md --cover ./thumbnail.png
Claude: Claude:
1. Parses markdown: title="My Post", 3 content images 1. Parses markdown: title="My Post", 3 content images

View File

@ -1,5 +1,5 @@
--- ---
name: slide-deck name: baoyu-slide-deck
description: Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images. Use when user asks to "create slides", "make a presentation", "generate deck", or "slide deck". description: Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images. Use when user asks to "create slides", "make a presentation", "generate deck", or "slide deck".
--- ---
@ -11,26 +11,26 @@ Transform content into professional slide deck with comprehensive outlines and g
```bash ```bash
# From markdown file # From markdown file
/slide-deck path/to/article.md /baoyu-slide-deck path/to/article.md
# With style preference # With style preference
/slide-deck path/to/article.md --style corporate /baoyu-slide-deck path/to/article.md --style corporate
/slide-deck path/to/article.md --style playful /baoyu-slide-deck path/to/article.md --style playful
/slide-deck path/to/article.md --style technical /baoyu-slide-deck path/to/article.md --style technical
# With audience specification # With audience specification
/slide-deck path/to/article.md --audience beginners /baoyu-slide-deck path/to/article.md --audience beginners
/slide-deck path/to/article.md --audience executives /baoyu-slide-deck path/to/article.md --audience executives
# With language # With language
/slide-deck path/to/article.md --lang zh /baoyu-slide-deck path/to/article.md --lang zh
/slide-deck path/to/article.md --lang en /baoyu-slide-deck path/to/article.md --lang en
# Outline only (no image generation) # Outline only (no image generation)
/slide-deck path/to/article.md --outline-only /baoyu-slide-deck path/to/article.md --outline-only
# Direct content input # Direct content input
/slide-deck /baoyu-slide-deck
[paste content] [paste content]
``` ```
@ -131,7 +131,7 @@ path/to/
### Without Article Path ### Without Article Path
``` ```
./slide-deck-outputs/YYYY-MM-DD/[topic-slug]/ ./baoyu-slide-deck-outputs/YYYY-MM-DD/[topic-slug]/
├── outline.md ├── outline.md
├── prompts/ ├── prompts/
│ ├── 01-cover.md │ ├── 01-cover.md
@ -272,7 +272,7 @@ Style notes: [specific style characteristics to emphasize]
For each slide, generate using: For each slide, generate using:
```bash ```bash
/gemini-web --promptfiles [SKILL_ROOT]/skills/slide-deck/prompts/system.md [TARGET_DIR]/prompts/01-cover.md --image [TARGET_DIR]/01-cover.png /baoyu-gemini-web --promptfiles [SKILL_ROOT]/skills/baoyu-slide-deck/prompts/system.md [TARGET_DIR]/prompts/01-cover.md --image [TARGET_DIR]/01-cover.png
``` ```
Generation flow: Generation flow:

View File

@ -1,5 +1,5 @@
--- ---
name: xhs-images name: baoyu-xhs-images
description: Xiaohongshu (Little Red Book) infographic series generator with multiple style options. Breaks down content into 1-10 cartoon-style infographics. Use when user asks to create "小红书图片", "XHS images", or "RedNote infographics". description: Xiaohongshu (Little Red Book) infographic series generator with multiple style options. Breaks down content into 1-10 cartoon-style infographics. Use when user asks to create "小红书图片", "XHS images", or "RedNote infographics".
--- ---
@ -11,23 +11,23 @@ Break down complex content into eye-catching infographic series for Xiaohongshu
```bash ```bash
# Auto-select style and layout based on content # Auto-select style and layout based on content
/xhs-images posts/ai-future/article.md /baoyu-xhs-images posts/ai-future/article.md
# Specify style # Specify style
/xhs-images posts/ai-future/article.md --style notion /baoyu-xhs-images posts/ai-future/article.md --style notion
# Specify layout # Specify layout
/xhs-images posts/ai-future/article.md --layout dense /baoyu-xhs-images posts/ai-future/article.md --layout dense
# Combine style and layout # Combine style and layout
/xhs-images posts/ai-future/article.md --style tech --layout list /baoyu-xhs-images posts/ai-future/article.md --style tech --layout list
# Direct content input # Direct content input
/xhs-images /baoyu-xhs-images
[paste content] [paste content]
# Direct input with options # Direct input with options
/xhs-images --style bold --layout comparison /baoyu-xhs-images --style bold --layout comparison
[paste content] [paste content]
``` ```