Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aea27950ad | |||
| 76ddcf134e | |||
| 5a0feba96e | |||
| 97bc68efd8 | |||
| 464edf0656 | |||
| 43c2589a38 |
@@ -6,17 +6,15 @@
|
|||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
||||||
"version": "1.0.0"
|
"version": "1.3.0"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "content-skills",
|
"name": "content-skills",
|
||||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
"description": "Content generation and publishing skills",
|
||||||
"source": "./",
|
"source": "./",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"skills": [
|
"skills": [
|
||||||
"./skills/baoyu-danger-gemini-web",
|
|
||||||
"./skills/baoyu-danger-x-to-markdown",
|
|
||||||
"./skills/baoyu-xhs-images",
|
"./skills/baoyu-xhs-images",
|
||||||
"./skills/baoyu-post-to-x",
|
"./skills/baoyu-post-to-x",
|
||||||
"./skills/baoyu-post-to-wechat",
|
"./skills/baoyu-post-to-wechat",
|
||||||
@@ -25,6 +23,25 @@
|
|||||||
"./skills/baoyu-slide-deck",
|
"./skills/baoyu-slide-deck",
|
||||||
"./skills/baoyu-comic"
|
"./skills/baoyu-comic"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ai-generation-skills",
|
||||||
|
"description": "AI-powered generation backends",
|
||||||
|
"source": "./",
|
||||||
|
"strict": false,
|
||||||
|
"skills": [
|
||||||
|
"./skills/baoyu-danger-gemini-web"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utility-skills",
|
||||||
|
"description": "Utility tools for content processing",
|
||||||
|
"source": "./",
|
||||||
|
"strict": false,
|
||||||
|
"skills": [
|
||||||
|
"./skills/baoyu-danger-x-to-markdown",
|
||||||
|
"./skills/baoyu-compress-image"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,54 @@
|
|||||||
|
|
||||||
English | [中文](./CHANGELOG.zh.md)
|
English | [中文](./CHANGELOG.zh.md)
|
||||||
|
|
||||||
|
## 1.3.0 - 2026-01-18
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-comic`: adds `wuxia` style—Hong Kong martial arts comic style with ink brush strokes, dynamic combat poses, and qi energy effects. Best for wuxia/xianxia and Chinese historical fiction.
|
||||||
|
- `baoyu-comic`: adds style and layout preview screenshots for all 8 styles and 6 layouts in README.
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
- `baoyu-comic`: removes `tech` style (replaced by `ohmsha` for technical content).
|
||||||
|
|
||||||
|
## 1.2.0 - 2026-01-18
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- Session-independent output directories: each generation session creates a new directory (`<skill-suffix>/<topic-slug>/`), even for the same source file. Conflicts resolved by appending timestamp.
|
||||||
|
- Multi-source file support: source files now saved as `source-{slug}.{ext}`, supporting multiple inputs (text, images, files from conversation).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
- `CLAUDE.md`: updates Output Path Convention with new session-independent directory structure and multi-source file naming.
|
||||||
|
- Multiple skills: updates file management sections to reflect new directory and source file conventions.
|
||||||
|
- `baoyu-slide-deck`, `baoyu-article-illustrator`, `baoyu-cover-image`, `baoyu-xhs-images`, `baoyu-comic`
|
||||||
|
|
||||||
|
## 1.1.0 - 2026-01-18
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-compress-image`: new utility skill for cross-platform image compression. Converts to WebP by default with PNG-to-PNG support. Uses system tools (sips, cwebp, ImageMagick) with Sharp fallback.
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
- Marketplace structure: reorganizes plugins into three categories—`content-skills`, `ai-generation-skills`, and `utility-skills`—for better organization.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
- `CLAUDE.md`, `README.md`, `README.zh.md`: updates skill architecture documentation to reflect the new three-category structure.
|
||||||
|
|
||||||
|
## 1.0.1 - 2026-01-18
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
- Code structure improvements for better readability and maintainability.
|
||||||
|
- `baoyu-slide-deck`: unified style reference file formats.
|
||||||
|
|
||||||
|
### Other
|
||||||
|
- Screenshots: converted from PNG to WebP format for smaller file sizes; added screenshots for new styles.
|
||||||
|
|
||||||
|
## 1.0.0 - 2026-01-18
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-danger-x-to-markdown`: new skill to convert X/Twitter posts and threads to Markdown format.
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
- `baoyu-gemini-web` renamed to `baoyu-danger-gemini-web` to indicate potential risks of using reverse-engineered APIs.
|
||||||
|
|
||||||
## 0.11.0 - 2026-01-18
|
## 0.11.0 - 2026-01-18
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,6 +2,54 @@
|
|||||||
|
|
||||||
[English](./CHANGELOG.md) | 中文
|
[English](./CHANGELOG.md) | 中文
|
||||||
|
|
||||||
|
## 1.3.0 - 2026-01-18
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-comic`:新增 `wuxia` 武侠风格——港漫武侠风格,水墨笔触、动态打斗、气功特效。适用于武侠、仙侠、中国历史小说。
|
||||||
|
- `baoyu-comic`:README 新增风格和布局预览截图(8 种风格 + 6 种布局)。
|
||||||
|
|
||||||
|
### 重构
|
||||||
|
- `baoyu-comic`:移除 `tech` 风格(技术内容改用 `ohmsha` 风格)。
|
||||||
|
|
||||||
|
## 1.2.0 - 2026-01-18
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- Session 独立输出目录:每次生成创建独立目录(`<skill-suffix>/<topic-slug>/`),即使是同一源文件也会新建目录。目录冲突时追加时间戳。
|
||||||
|
- 多源文件支持:源文件现以 `source-{slug}.{ext}` 命名,支持多个输入(文本、图片、会话中的文件)。
|
||||||
|
|
||||||
|
### 文档
|
||||||
|
- `CLAUDE.md`:更新 Output Path Convention,采用新的 session 独立目录结构和多源文件命名规范。
|
||||||
|
- 多个技能:更新文件管理部分,反映新的目录和源文件规范。
|
||||||
|
- `baoyu-slide-deck`、`baoyu-article-illustrator`、`baoyu-cover-image`、`baoyu-xhs-images`、`baoyu-comic`
|
||||||
|
|
||||||
|
## 1.1.0 - 2026-01-18
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-compress-image`:新增跨平台图片压缩技能。默认转换为 WebP 格式,支持 PNG 转 PNG。自动选择系统工具(sips、cwebp、ImageMagick),Sharp 作为兜底方案。
|
||||||
|
|
||||||
|
### 重构
|
||||||
|
- Marketplace 结构重组:将插件分为三大类——`content-skills`(内容技能)、`ai-generation-skills`(AI 生成技能)和 `utility-skills`(工具技能),便于管理和发现。
|
||||||
|
|
||||||
|
### 文档
|
||||||
|
- `CLAUDE.md`、`README.md`、`README.zh.md`:更新技能架构文档,反映新的三类分组结构。
|
||||||
|
|
||||||
|
## 1.0.1 - 2026-01-18
|
||||||
|
|
||||||
|
### 重构
|
||||||
|
- 代码结构优化,提升可读性和可维护性。
|
||||||
|
- `baoyu-slide-deck`:统一风格参考文件格式。
|
||||||
|
|
||||||
|
### 其他
|
||||||
|
- 截图:从 PNG 转换为 WebP 格式,减小文件体积;新增新风格的截图。
|
||||||
|
|
||||||
|
## 1.0.0 - 2026-01-18
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-danger-x-to-markdown`:新增技能,将 X/Twitter 帖子和线程转换为 Markdown 格式。
|
||||||
|
|
||||||
|
### 破坏性变更
|
||||||
|
- `baoyu-gemini-web` 重命名为 `baoyu-danger-gemini-web`,以提示使用逆向工程 API 的潜在风险。
|
||||||
|
|
||||||
## 0.11.0 - 2026-01-18
|
## 0.11.0 - 2026-01-18
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
@@ -8,17 +8,34 @@ Claude Code marketplace plugin providing AI-powered content generation skills. S
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
Skills are organized into three plugin categories in `marketplace.json`:
|
||||||
|
|
||||||
```
|
```
|
||||||
skills/
|
skills/
|
||||||
├── baoyu-danger-gemini-web/ # Core: Gemini API wrapper (text + image gen)
|
├── [content-skills] # Content generation and publishing
|
||||||
├── baoyu-xhs-images/ # Xiaohongshu infographic series (1-10 images)
|
│ ├── baoyu-xhs-images/ # Xiaohongshu infographic series (1-10 images)
|
||||||
├── baoyu-cover-image/ # Article cover images (2.35:1 aspect)
|
│ ├── baoyu-cover-image/ # Article cover images (2.35:1 aspect)
|
||||||
├── baoyu-slide-deck/ # Presentation slides with outlines
|
│ ├── baoyu-slide-deck/ # Presentation slides with outlines
|
||||||
├── baoyu-article-illustrator/ # Smart illustration placement
|
│ ├── baoyu-article-illustrator/ # Smart illustration placement
|
||||||
├── baoyu-post-to-x/ # X/Twitter posting automation
|
│ ├── baoyu-comic/ # Knowledge comics (Logicomix/Ohmsha style)
|
||||||
└── baoyu-post-to-wechat/ # WeChat Official Account posting
|
│ ├── baoyu-post-to-x/ # X/Twitter posting automation
|
||||||
|
│ └── baoyu-post-to-wechat/ # WeChat Official Account posting
|
||||||
|
│
|
||||||
|
├── [ai-generation-skills] # AI-powered generation backends
|
||||||
|
│ └── baoyu-danger-gemini-web/ # Gemini API wrapper (text + image gen)
|
||||||
|
│
|
||||||
|
└── [utility-skills] # Utility tools for content processing
|
||||||
|
├── baoyu-danger-x-to-markdown/ # X/Twitter content to markdown
|
||||||
|
└── baoyu-compress-image/ # Image compression
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Plugin Categories**:
|
||||||
|
| Category | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| `content-skills` | Skills that generate or publish content (images, slides, comics, posts) |
|
||||||
|
| `ai-generation-skills` | Backend skills providing AI generation capabilities |
|
||||||
|
| `utility-skills` | Helper tools for content processing (conversion, compression) |
|
||||||
|
|
||||||
Each skill contains:
|
Each skill contains:
|
||||||
- `SKILL.md` - YAML front matter (name, description) + documentation
|
- `SKILL.md` - YAML front matter (name, description) + documentation
|
||||||
- `scripts/` - TypeScript implementations
|
- `scripts/` - TypeScript implementations
|
||||||
@@ -70,9 +87,28 @@ npx -y bun skills/baoyu-danger-gemini-web/scripts/main.ts --promptfiles system.m
|
|||||||
- SKILL.md `name` field: `baoyu-<name>`
|
- SKILL.md `name` field: `baoyu-<name>`
|
||||||
2. Add TypeScript in `skills/baoyu-<name>/scripts/`
|
2. Add TypeScript in `skills/baoyu-<name>/scripts/`
|
||||||
3. Add prompt templates in `skills/baoyu-<name>/prompts/` if needed
|
3. Add prompt templates in `skills/baoyu-<name>/prompts/` if needed
|
||||||
4. Register in `marketplace.json` plugins[0].skills array as `./skills/baoyu-<name>`
|
4. **Choose the appropriate category** and register in `marketplace.json`:
|
||||||
|
- `content-skills`: For content generation/publishing (images, slides, posts)
|
||||||
|
- `ai-generation-skills`: For AI backend capabilities
|
||||||
|
- `utility-skills`: For helper tools (conversion, compression)
|
||||||
|
- If none fit, create a new category with descriptive name
|
||||||
5. **Add Script Directory section** to SKILL.md (see template below)
|
5. **Add Script Directory section** to SKILL.md (see template below)
|
||||||
|
|
||||||
|
### Choosing a Category
|
||||||
|
|
||||||
|
| If your skill... | Use category |
|
||||||
|
|------------------|--------------|
|
||||||
|
| Generates visual content (images, slides, comics) | `content-skills` |
|
||||||
|
| Publishes to platforms (X, WeChat, etc.) | `content-skills` |
|
||||||
|
| Provides AI generation backend | `ai-generation-skills` |
|
||||||
|
| Converts or processes content | `utility-skills` |
|
||||||
|
| Compresses or optimizes files | `utility-skills` |
|
||||||
|
|
||||||
|
**Creating a new category**: If the skill doesn't fit existing categories, add a new plugin object to `marketplace.json` with:
|
||||||
|
- `name`: Descriptive kebab-case name (e.g., `analytics-skills`)
|
||||||
|
- `description`: Brief description of the category
|
||||||
|
- `skills`: Array with the skill path
|
||||||
|
|
||||||
### Script Directory Template
|
### Script Directory Template
|
||||||
|
|
||||||
Every SKILL.md with scripts MUST include this section after Usage:
|
Every SKILL.md with scripts MUST include this section after Usage:
|
||||||
@@ -137,27 +173,33 @@ Use this template when implementing image generation in skills:
|
|||||||
|
|
||||||
### Output Path Convention
|
### Output Path Convention
|
||||||
|
|
||||||
Generated images from the same skill and source file MUST be grouped together:
|
Each session creates an independent directory. Even the same source file generates a new directory per session.
|
||||||
|
|
||||||
**With source file** (e.g., `/path/to/project/content/my-article.md`):
|
**Output Directory**:
|
||||||
```
|
```
|
||||||
/path/to/project/content/my-article/<skill-suffix>/
|
<skill-suffix>/<topic-slug>/
|
||||||
```
|
```
|
||||||
- Remove file extension from source filename
|
- `<skill-suffix>`: Skill name suffix (e.g., `xhs-images`, `cover-image`, `slide-deck`, `comic`)
|
||||||
- Use skill name suffix (e.g., `xhs-images`, `cover-image`, `slide-deck`)
|
- `<topic-slug>`: Generated from content topic (2-4 words, kebab-case)
|
||||||
- Example: source `/tests-data/anthropic-economic-index.md` + skill `baoyu-xhs-images` → `/tests-data/anthropic-economic-index/xhs-images/`
|
- Example: `xhs-images/ai-future-trends/`
|
||||||
|
|
||||||
**Without source file**:
|
**Slug Generation**:
|
||||||
```
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
./<skill-suffix>/<source-slug>/
|
2. Example: "Introduction to Machine Learning" → `intro-machine-learning`
|
||||||
```
|
|
||||||
- Place under current project directory
|
|
||||||
- Use descriptive slug for the content
|
|
||||||
|
|
||||||
**Directory Backup**:
|
**Conflict Resolution**:
|
||||||
- If output directory already exists, rename existing directory with timestamp
|
If `<skill-suffix>/<topic-slug>/` already exists:
|
||||||
- Format: `<dirname>-backup-YYYYMMDD-HHMMSS`
|
- Append timestamp: `<topic-slug>-YYYYMMDD-HHMMSS`
|
||||||
- Example: `xhs-images` → `xhs-images-backup-20260117-143052`
|
- Example: `ai-future` exists → `ai-future-20260118-143052`
|
||||||
|
|
||||||
|
**Source Files**:
|
||||||
|
- Copy all sources to `<skill-suffix>/<topic-slug>/` with naming: `source-{slug}.{ext}`
|
||||||
|
- Multiple sources supported: text, images, files from conversation
|
||||||
|
- Examples:
|
||||||
|
- `source-article.md` (main text content)
|
||||||
|
- `source-reference.png` (image from conversation)
|
||||||
|
- `source-data.csv` (additional file)
|
||||||
|
- Original source files remain unchanged
|
||||||
|
|
||||||
### Image Naming Convention
|
### Image Naming Convention
|
||||||
|
|
||||||
|
|||||||
@@ -31,13 +31,16 @@ Run the following command in Claude Code:
|
|||||||
|
|
||||||
1. Select **Browse and install plugins**
|
1. Select **Browse and install plugins**
|
||||||
2. Select **baoyu-skills**
|
2. Select **baoyu-skills**
|
||||||
3. Select **content-skills**
|
3. Select the plugin(s) you want to install
|
||||||
4. Select **Install now**
|
4. Select **Install now**
|
||||||
|
|
||||||
**Option 2: Direct Install**
|
**Option 2: Direct Install**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Install specific plugin
|
||||||
/plugin install content-skills@baoyu-skills
|
/plugin install content-skills@baoyu-skills
|
||||||
|
/plugin install ai-generation-skills@baoyu-skills
|
||||||
|
/plugin install utility-skills@baoyu-skills
|
||||||
```
|
```
|
||||||
|
|
||||||
**Option 3: Ask the Agent**
|
**Option 3: Ask the Agent**
|
||||||
@@ -46,6 +49,14 @@ Simply tell Claude Code:
|
|||||||
|
|
||||||
> Please install Skills from github.com/JimLiu/baoyu-skills
|
> Please install Skills from github.com/JimLiu/baoyu-skills
|
||||||
|
|
||||||
|
### Available Plugins
|
||||||
|
|
||||||
|
| Plugin | Description | Skills |
|
||||||
|
|--------|-------------|--------|
|
||||||
|
| **content-skills** | Content generation and publishing | [xhs-images](#baoyu-xhs-images), [cover-image](#baoyu-cover-image), [slide-deck](#baoyu-slide-deck), [comic](#baoyu-comic), [article-illustrator](#baoyu-article-illustrator), [post-to-x](#baoyu-post-to-x), [post-to-wechat](#baoyu-post-to-wechat) |
|
||||||
|
| **ai-generation-skills** | AI-powered generation backends | [danger-gemini-web](#baoyu-danger-gemini-web) |
|
||||||
|
| **utility-skills** | Utility tools for content processing | [danger-x-to-markdown](#baoyu-danger-x-to-markdown), [compress-image](#baoyu-compress-image) |
|
||||||
|
|
||||||
## Update Skills
|
## Update Skills
|
||||||
|
|
||||||
To update skills to the latest version:
|
To update skills to the latest version:
|
||||||
@@ -61,47 +72,13 @@ You can also **Enable auto-update** to get the latest versions automatically.
|
|||||||
|
|
||||||
## Available Skills
|
## Available Skills
|
||||||
|
|
||||||
### baoyu-danger-gemini-web
|
Skills are organized into three categories:
|
||||||
|
|
||||||
Interacts with Gemini Web to generate text and images.
|
### Content Skills
|
||||||
|
|
||||||
**Text Generation:**
|
Content generation and publishing skills.
|
||||||
|
|
||||||
```bash
|
#### baoyu-xhs-images
|
||||||
/baoyu-danger-gemini-web "Hello, Gemini"
|
|
||||||
/baoyu-danger-gemini-web --prompt "Explain quantum computing"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Image Generation:**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
/baoyu-danger-gemini-web --prompt "A cute cat" --image cat.png
|
|
||||||
/baoyu-danger-gemini-web --promptfiles system.md content.md --image out.png
|
|
||||||
```
|
|
||||||
|
|
||||||
### baoyu-danger-x-to-markdown
|
|
||||||
|
|
||||||
Converts X (Twitter) content to markdown format. Supports tweet threads and X Articles.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Convert tweet to markdown
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456
|
|
||||||
|
|
||||||
# Save to specific file
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 -o output.md
|
|
||||||
|
|
||||||
# JSON output
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 --json
|
|
||||||
```
|
|
||||||
|
|
||||||
**Supported URLs:**
|
|
||||||
- `https://x.com/<user>/status/<id>`
|
|
||||||
- `https://twitter.com/<user>/status/<id>`
|
|
||||||
- `https://x.com/i/article/<id>`
|
|
||||||
|
|
||||||
**Authentication:** Uses environment variables (`X_AUTH_TOKEN`, `X_CT0`) or Chrome login for cookie-based auth.
|
|
||||||
|
|
||||||
### baoyu-xhs-images
|
|
||||||
|
|
||||||
Xiaohongshu (RedNote) infographic series generator. Breaks down content into 1-10 cartoon-style infographics with **Style × Layout** two-dimensional system.
|
Xiaohongshu (RedNote) infographic series generator. Breaks down content into 1-10 cartoon-style infographics with **Style × Layout** two-dimensional system.
|
||||||
|
|
||||||
@@ -134,7 +111,7 @@ Xiaohongshu (RedNote) infographic series generator. Breaks down content into 1-1
|
|||||||
| `comparison` | 2 sides | Before/after, pros/cons |
|
| `comparison` | 2 sides | Before/after, pros/cons |
|
||||||
| `flow` | 3-6 steps | Processes, timelines |
|
| `flow` | 3-6 steps | Processes, timelines |
|
||||||
|
|
||||||
### baoyu-cover-image
|
#### baoyu-cover-image
|
||||||
|
|
||||||
Generate hand-drawn style cover images for articles with multiple style options.
|
Generate hand-drawn style cover images for articles with multiple style options.
|
||||||
|
|
||||||
@@ -152,7 +129,7 @@ Generate hand-drawn style cover images for articles with multiple style options.
|
|||||||
|
|
||||||
Available styles: `elegant` (default), `tech`, `warm`, `bold`, `minimal`, `playful`, `nature`, `retro`
|
Available styles: `elegant` (default), `tech`, `warm`, `bold`, `minimal`, `playful`, `nature`, `retro`
|
||||||
|
|
||||||
### baoyu-slide-deck
|
#### baoyu-slide-deck
|
||||||
|
|
||||||
Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images.
|
Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images.
|
||||||
|
|
||||||
@@ -191,9 +168,24 @@ Generate professional slide deck images from content. Creates comprehensive outl
|
|||||||
| `vintage` | Aged-paper aesthetic, historical document styling | Historical, heritage, biography |
|
| `vintage` | Aged-paper aesthetic, historical document styling | Historical, heritage, biography |
|
||||||
| `watercolor` | Soft hand-painted textures, natural warmth | Lifestyle, wellness, travel |
|
| `watercolor` | Soft hand-painted textures, natural warmth | Lifestyle, wellness, travel |
|
||||||
|
|
||||||
|
**Style Previews**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| blueprint | bold-editorial | corporate |
|
||||||
|
|  |  |  |
|
||||||
|
| dark-atmospheric | editorial-infographic | fantasy-animation |
|
||||||
|
|  |  |  |
|
||||||
|
| intuition-machine | minimal | notion |
|
||||||
|
|  |  |  |
|
||||||
|
| pixel-art | scientific | sketch-notes |
|
||||||
|
|  |  |  |
|
||||||
|
| vector-illustration | vintage | watercolor |
|
||||||
|
|
||||||
After generation, slides are automatically merged into a `.pptx` file for easy sharing.
|
After generation, slides are automatically merged into a `.pptx` file for easy sharing.
|
||||||
|
|
||||||
### baoyu-comic
|
#### baoyu-comic
|
||||||
|
|
||||||
Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohmsha manga guide). Creates original educational comics with detailed panel layouts and sequential image generation.
|
Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohmsha manga guide). Creates original educational comics with detailed panel layouts and sequential image generation.
|
||||||
|
|
||||||
@@ -222,7 +214,7 @@ Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohms
|
|||||||
**Options**:
|
**Options**:
|
||||||
| Option | Values |
|
| Option | Values |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| `--style` | `classic` (default), `dramatic`, `warm`, `tech`, `sepia`, `vibrant`, `ohmsha`, `realistic`, or custom description |
|
| `--style` | `classic` (default), `dramatic`, `warm`, `sepia`, `vibrant`, `ohmsha`, `realistic`, `wuxia`, or custom description |
|
||||||
| `--layout` | `standard` (default), `cinematic`, `dense`, `splash`, `mixed`, `webtoon` |
|
| `--layout` | `standard` (default), `cinematic`, `dense`, `splash`, `mixed`, `webtoon` |
|
||||||
| `--aspect` | `3:4` (default, portrait), `4:3` (landscape), `16:9` (widescreen) |
|
| `--aspect` | `3:4` (default, portrait), `4:3` (landscape), `16:9` (widescreen) |
|
||||||
| `--lang` | `auto` (default), `zh`, `en`, `ja`, etc. |
|
| `--lang` | `auto` (default), `zh`, `en`, `ja`, etc. |
|
||||||
@@ -234,11 +226,22 @@ Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohms
|
|||||||
| `classic` (default) | Traditional Ligne Claire with clean uniform outlines, flat colors, detailed backgrounds | Biographies, balanced narratives, educational content |
|
| `classic` (default) | Traditional Ligne Claire with clean uniform outlines, flat colors, detailed backgrounds | Biographies, balanced narratives, educational content |
|
||||||
| `dramatic` | High contrast with heavy shadows, intense expressions, angular compositions | Pivotal discoveries, conflicts, climactic scenes |
|
| `dramatic` | High contrast with heavy shadows, intense expressions, angular compositions | Pivotal discoveries, conflicts, climactic scenes |
|
||||||
| `warm` | Soft edges, golden tones, cozy interiors with nostalgic feel | Personal stories, childhood scenes, mentorship |
|
| `warm` | Soft edges, golden tones, cozy interiors with nostalgic feel | Personal stories, childhood scenes, mentorship |
|
||||||
| `tech` | Precise geometric lines, circuit motifs, neon accents on dark backgrounds | Computing history, AI stories, modern tech |
|
|
||||||
| `sepia` | Vintage illustration style with aged paper effect, period-accurate details | Pre-1950s stories, classical science, historical figures |
|
| `sepia` | Vintage illustration style with aged paper effect, period-accurate details | Pre-1950s stories, classical science, historical figures |
|
||||||
| `vibrant` | Energetic lines with weight variation, bright colors, dynamic poses | Science explanations, "aha" moments, young audience |
|
| `vibrant` | Energetic lines with weight variation, bright colors, dynamic poses | Science explanations, "aha" moments, young audience |
|
||||||
| `ohmsha` | Manga guide style with visual metaphors, gadgets, student/mentor dynamic | Technical tutorials, complex concepts (ML, physics) |
|
| `ohmsha` | Manga guide style with visual metaphors, gadgets, student/mentor dynamic | Technical tutorials, complex concepts (ML, physics) |
|
||||||
| `realistic` | Full-color realistic manga with digital painting, smooth gradients, accurate proportions | Wine, food, business, lifestyle, professional topics |
|
| `realistic` | Full-color realistic manga with digital painting, smooth gradients, accurate proportions | Wine, food, business, lifestyle, professional topics |
|
||||||
|
| `wuxia` | Hong Kong martial arts style with ink brush strokes, dynamic combat, qi effects | Martial arts, wuxia/xianxia, Chinese historical fiction |
|
||||||
|
|
||||||
|
**Style Previews**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| classic | dramatic | warm |
|
||||||
|
|  |  |  |
|
||||||
|
| sepia | vibrant | ohmsha |
|
||||||
|
|  |  | |
|
||||||
|
| realistic | wuxia | |
|
||||||
|
|
||||||
**Layouts** (panel arrangement):
|
**Layouts** (panel arrangement):
|
||||||
| Layout | Panels/Page | Best for |
|
| Layout | Panels/Page | Best for |
|
||||||
@@ -250,7 +253,39 @@ Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohms
|
|||||||
| `mixed` | 3-7 varies | Complex narratives, emotional arcs |
|
| `mixed` | 3-7 varies | Complex narratives, emotional arcs |
|
||||||
| `webtoon` | 3-5 vertical | Ohmsha tutorials, mobile reading |
|
| `webtoon` | 3-5 vertical | Ohmsha tutorials, mobile reading |
|
||||||
|
|
||||||
### baoyu-post-to-wechat
|
**Layout Previews**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| standard | cinematic | dense |
|
||||||
|
|  |  |  |
|
||||||
|
| splash | mixed | webtoon |
|
||||||
|
|
||||||
|
#### baoyu-article-illustrator
|
||||||
|
|
||||||
|
Smart article illustration skill. Analyzes article content and generates illustrations at positions requiring visual aids.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-article-illustrator path/to/article.md
|
||||||
|
```
|
||||||
|
|
||||||
|
#### baoyu-post-to-x
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Post with text
|
||||||
|
/baoyu-post-to-x "Hello from Claude Code!"
|
||||||
|
|
||||||
|
# Post with images
|
||||||
|
/baoyu-post-to-x "Check this out" --image photo.png
|
||||||
|
|
||||||
|
# Post X Article
|
||||||
|
/baoyu-post-to-x --article path/to/article.md
|
||||||
|
```
|
||||||
|
|
||||||
|
#### baoyu-post-to-wechat
|
||||||
|
|
||||||
Post content to WeChat Official Account (微信公众号). Two modes available:
|
Post content to WeChat Official Account (微信公众号). Two modes available:
|
||||||
|
|
||||||
@@ -272,6 +307,63 @@ Post content to WeChat Official Account (微信公众号). Two modes available:
|
|||||||
|
|
||||||
Prerequisites: Google Chrome installed. First run requires QR code login (session preserved).
|
Prerequisites: Google Chrome installed. First run requires QR code login (session preserved).
|
||||||
|
|
||||||
|
### AI Generation Skills
|
||||||
|
|
||||||
|
AI-powered generation backends.
|
||||||
|
|
||||||
|
#### baoyu-danger-gemini-web
|
||||||
|
|
||||||
|
Interacts with Gemini Web to generate text and images.
|
||||||
|
|
||||||
|
**Text Generation:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-danger-gemini-web "Hello, Gemini"
|
||||||
|
/baoyu-danger-gemini-web --prompt "Explain quantum computing"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Image Generation:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-danger-gemini-web --prompt "A cute cat" --image cat.png
|
||||||
|
/baoyu-danger-gemini-web --promptfiles system.md content.md --image out.png
|
||||||
|
```
|
||||||
|
|
||||||
|
### Utility Skills
|
||||||
|
|
||||||
|
Utility tools for content processing.
|
||||||
|
|
||||||
|
#### baoyu-danger-x-to-markdown
|
||||||
|
|
||||||
|
Converts X (Twitter) content to markdown format. Supports tweet threads and X Articles.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Convert tweet to markdown
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456
|
||||||
|
|
||||||
|
# Save to specific file
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 -o output.md
|
||||||
|
|
||||||
|
# JSON output
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 --json
|
||||||
|
```
|
||||||
|
|
||||||
|
**Supported URLs:**
|
||||||
|
- `https://x.com/<user>/status/<id>`
|
||||||
|
- `https://twitter.com/<user>/status/<id>`
|
||||||
|
- `https://x.com/i/article/<id>`
|
||||||
|
|
||||||
|
**Authentication:** Uses environment variables (`X_AUTH_TOKEN`, `X_CT0`) or Chrome login for cookie-based auth.
|
||||||
|
|
||||||
|
#### baoyu-compress-image
|
||||||
|
|
||||||
|
Compress images to reduce file size while maintaining quality.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-compress-image path/to/image.png
|
||||||
|
/baoyu-compress-image path/to/images/ --quality 80
|
||||||
|
```
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
All skills support customization via `EXTEND.md` files. Create an extension file to override default styles, add custom configurations, or define your own presets.
|
All skills support customization via `EXTEND.md` files. Create an extension file to override default styles, add custom configurations, or define your own presets.
|
||||||
|
|||||||
@@ -31,13 +31,16 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
|
|
||||||
1. 选择 **Browse and install plugins**
|
1. 选择 **Browse and install plugins**
|
||||||
2. 选择 **baoyu-skills**
|
2. 选择 **baoyu-skills**
|
||||||
3. 选择 **content-skills**
|
3. 选择要安装的插件
|
||||||
4. 选择 **Install now**
|
4. 选择 **Install now**
|
||||||
|
|
||||||
**方式二:直接安装**
|
**方式二:直接安装**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# 安装指定插件
|
||||||
/plugin install content-skills@baoyu-skills
|
/plugin install content-skills@baoyu-skills
|
||||||
|
/plugin install ai-generation-skills@baoyu-skills
|
||||||
|
/plugin install utility-skills@baoyu-skills
|
||||||
```
|
```
|
||||||
|
|
||||||
**方式三:告诉 Agent**
|
**方式三:告诉 Agent**
|
||||||
@@ -46,6 +49,14 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
|
|
||||||
> 请帮我安装 github.com/JimLiu/baoyu-skills 中的 Skills
|
> 请帮我安装 github.com/JimLiu/baoyu-skills 中的 Skills
|
||||||
|
|
||||||
|
### 可用插件
|
||||||
|
|
||||||
|
| 插件 | 说明 | 包含技能 |
|
||||||
|
|------|------|----------|
|
||||||
|
| **content-skills** | 内容生成和发布 | [xhs-images](#baoyu-xhs-images), [cover-image](#baoyu-cover-image), [slide-deck](#baoyu-slide-deck), [comic](#baoyu-comic), [article-illustrator](#baoyu-article-illustrator), [post-to-x](#baoyu-post-to-x), [post-to-wechat](#baoyu-post-to-wechat) |
|
||||||
|
| **ai-generation-skills** | AI 生成后端 | [danger-gemini-web](#baoyu-danger-gemini-web) |
|
||||||
|
| **utility-skills** | 内容处理工具 | [danger-x-to-markdown](#baoyu-danger-x-to-markdown), [compress-image](#baoyu-compress-image) |
|
||||||
|
|
||||||
## 更新技能
|
## 更新技能
|
||||||
|
|
||||||
更新技能到最新版本:
|
更新技能到最新版本:
|
||||||
@@ -61,47 +72,13 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
|
|
||||||
## 可用技能
|
## 可用技能
|
||||||
|
|
||||||
### baoyu-danger-gemini-web
|
技能分为三大类:
|
||||||
|
|
||||||
与 Gemini Web 交互,生成文本和图片。
|
### 内容技能 (Content Skills)
|
||||||
|
|
||||||
**文本生成:**
|
内容生成和发布技能。
|
||||||
|
|
||||||
```bash
|
#### baoyu-xhs-images
|
||||||
/baoyu-danger-gemini-web "你好,Gemini"
|
|
||||||
/baoyu-danger-gemini-web --prompt "解释量子计算"
|
|
||||||
```
|
|
||||||
|
|
||||||
**图片生成:**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
/baoyu-danger-gemini-web --prompt "一只可爱的猫" --image cat.png
|
|
||||||
/baoyu-danger-gemini-web --promptfiles system.md content.md --image out.png
|
|
||||||
```
|
|
||||||
|
|
||||||
### baoyu-danger-x-to-markdown
|
|
||||||
|
|
||||||
将 X (Twitter) 内容转换为 markdown 格式。支持推文串和 X 文章。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 将推文转换为 markdown
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456
|
|
||||||
|
|
||||||
# 保存到指定文件
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 -o output.md
|
|
||||||
|
|
||||||
# JSON 输出
|
|
||||||
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 --json
|
|
||||||
```
|
|
||||||
|
|
||||||
**支持的 URL:**
|
|
||||||
- `https://x.com/<user>/status/<id>`
|
|
||||||
- `https://twitter.com/<user>/status/<id>`
|
|
||||||
- `https://x.com/i/article/<id>`
|
|
||||||
|
|
||||||
**身份验证:** 使用环境变量(`X_AUTH_TOKEN`、`X_CT0`)或 Chrome 登录进行 cookie 认证。
|
|
||||||
|
|
||||||
### baoyu-xhs-images
|
|
||||||
|
|
||||||
小红书信息图系列生成器。将内容拆解为 1-10 张卡通风格信息图,支持 **风格 × 布局** 二维系统。
|
小红书信息图系列生成器。将内容拆解为 1-10 张卡通风格信息图,支持 **风格 × 布局** 二维系统。
|
||||||
|
|
||||||
@@ -134,7 +111,7 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
| `comparison` | 双栏 | 对比、优劣 |
|
| `comparison` | 双栏 | 对比、优劣 |
|
||||||
| `flow` | 3-6 步 | 流程、时间线 |
|
| `flow` | 3-6 步 | 流程、时间线 |
|
||||||
|
|
||||||
### baoyu-cover-image
|
#### baoyu-cover-image
|
||||||
|
|
||||||
为文章生成手绘风格封面图,支持多种风格选项。
|
为文章生成手绘风格封面图,支持多种风格选项。
|
||||||
|
|
||||||
@@ -152,7 +129,7 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
|
|
||||||
可用风格:`elegant`(默认)、`tech`、`warm`、`bold`、`minimal`、`playful`、`nature`、`retro`
|
可用风格:`elegant`(默认)、`tech`、`warm`、`bold`、`minimal`、`playful`、`nature`、`retro`
|
||||||
|
|
||||||
### baoyu-slide-deck
|
#### baoyu-slide-deck
|
||||||
|
|
||||||
从内容生成专业的幻灯片图片。先创建包含样式说明的完整大纲,然后逐页生成幻灯片图片。
|
从内容生成专业的幻灯片图片。先创建包含样式说明的完整大纲,然后逐页生成幻灯片图片。
|
||||||
|
|
||||||
@@ -191,9 +168,24 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
| `vintage` | 做旧纸张美学,历史文档风格 | 历史、传记、人文 |
|
| `vintage` | 做旧纸张美学,历史文档风格 | 历史、传记、人文 |
|
||||||
| `watercolor` | 柔和手绘水彩纹理,自然温暖 | 生活方式、健康、旅行 |
|
| `watercolor` | 柔和手绘水彩纹理,自然温暖 | 生活方式、健康、旅行 |
|
||||||
|
|
||||||
|
**风格预览**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| blueprint | bold-editorial | corporate |
|
||||||
|
|  |  |  |
|
||||||
|
| dark-atmospheric | editorial-infographic | fantasy-animation |
|
||||||
|
|  |  |  |
|
||||||
|
| intuition-machine | minimal | notion |
|
||||||
|
|  |  |  |
|
||||||
|
| pixel-art | scientific | sketch-notes |
|
||||||
|
|  |  |  |
|
||||||
|
| vector-illustration | vintage | watercolor |
|
||||||
|
|
||||||
生成完成后,所有幻灯片会自动合并为 `.pptx` 文件,方便分享。
|
生成完成后,所有幻灯片会自动合并为 `.pptx` 文件,方便分享。
|
||||||
|
|
||||||
### baoyu-comic
|
#### baoyu-comic
|
||||||
|
|
||||||
知识漫画创作器,支持多种风格(Logicomix/清线风格、欧姆社漫画教程风格)。创作带有详细分镜布局的原创教育漫画,逐页生成图片。
|
知识漫画创作器,支持多种风格(Logicomix/清线风格、欧姆社漫画教程风格)。创作带有详细分镜布局的原创教育漫画,逐页生成图片。
|
||||||
|
|
||||||
@@ -222,7 +214,7 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
**选项**:
|
**选项**:
|
||||||
| 选项 | 取值 |
|
| 选项 | 取值 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `--style` | `classic`(默认)、`dramatic`、`warm`、`tech`、`sepia`、`vibrant`、`ohmsha`、`realistic`,或自然语言描述 |
|
| `--style` | `classic`(默认)、`dramatic`、`warm`、`sepia`、`vibrant`、`ohmsha`、`realistic`、`wuxia`,或自然语言描述 |
|
||||||
| `--layout` | `standard`(默认)、`cinematic`、`dense`、`splash`、`mixed`、`webtoon` |
|
| `--layout` | `standard`(默认)、`cinematic`、`dense`、`splash`、`mixed`、`webtoon` |
|
||||||
| `--aspect` | `3:4`(默认,竖版)、`4:3`(横版)、`16:9`(宽屏) |
|
| `--aspect` | `3:4`(默认,竖版)、`4:3`(横版)、`16:9`(宽屏) |
|
||||||
| `--lang` | `auto`(默认)、`zh`、`en`、`ja` 等 |
|
| `--lang` | `auto`(默认)、`zh`、`en`、`ja` 等 |
|
||||||
@@ -234,11 +226,22 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
| `classic`(默认) | 传统清线风格,统一线条、平涂色彩、精细背景 | 传记、平衡叙事、教育内容 |
|
| `classic`(默认) | 传统清线风格,统一线条、平涂色彩、精细背景 | 传记、平衡叙事、教育内容 |
|
||||||
| `dramatic` | 高对比度,重阴影、紧张表情、棱角分明的构图 | 重大发现、冲突、高潮场景 |
|
| `dramatic` | 高对比度,重阴影、紧张表情、棱角分明的构图 | 重大发现、冲突、高潮场景 |
|
||||||
| `warm` | 柔和边缘、金色调、温馨室内、怀旧感 | 个人故事、童年场景、师生情 |
|
| `warm` | 柔和边缘、金色调、温馨室内、怀旧感 | 个人故事、童年场景、师生情 |
|
||||||
| `tech` | 精确几何线条、电路纹理、深色背景配霓虹色 | 计算机史、AI 故事、现代科技 |
|
|
||||||
| `sepia` | 复古插画风格、做旧纸张效果、时代准确细节 | 1950 年前故事、古典科学、历史人物 |
|
| `sepia` | 复古插画风格、做旧纸张效果、时代准确细节 | 1950 年前故事、古典科学、历史人物 |
|
||||||
| `vibrant` | 富有活力的线条、明亮色彩、动感姿态 | 科学解说、"顿悟"时刻、青少年读者 |
|
| `vibrant` | 富有活力的线条、明亮色彩、动感姿态 | 科学解说、"顿悟"时刻、青少年读者 |
|
||||||
| `ohmsha` | 欧姆社漫画风格,视觉比喻、道具、学生/导师互动 | 技术教程、复杂概念(机器学习、物理) |
|
| `ohmsha` | 欧姆社漫画风格,视觉比喻、道具、学生/导师互动 | 技术教程、复杂概念(机器学习、物理) |
|
||||||
| `realistic` | 全彩写实日漫风格,数字绘画、平滑渐变、准确人体比例 | 红酒、美食、商业、生活方式、专业话题 |
|
| `realistic` | 全彩写实日漫风格,数字绘画、平滑渐变、准确人体比例 | 红酒、美食、商业、生活方式、专业话题 |
|
||||||
|
| `wuxia` | 港漫武侠风格,水墨笔触、动态打斗、气功特效 | 武侠、仙侠、中国历史小说 |
|
||||||
|
|
||||||
|
**风格预览**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| classic | dramatic | warm |
|
||||||
|
|  |  |  |
|
||||||
|
| sepia | vibrant | ohmsha |
|
||||||
|
|  |  | |
|
||||||
|
| realistic | wuxia | |
|
||||||
|
|
||||||
**布局**(分镜排列):
|
**布局**(分镜排列):
|
||||||
| 布局 | 每页分镜数 | 适用场景 |
|
| 布局 | 每页分镜数 | 适用场景 |
|
||||||
@@ -250,7 +253,39 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
| `mixed` | 3-7 不等 | 复杂叙事、情感弧线 |
|
| `mixed` | 3-7 不等 | 复杂叙事、情感弧线 |
|
||||||
| `webtoon` | 3-5 竖向 | 欧姆社教程、手机阅读 |
|
| `webtoon` | 3-5 竖向 | 欧姆社教程、手机阅读 |
|
||||||
|
|
||||||
### baoyu-post-to-wechat
|
**布局预览**:
|
||||||
|
|
||||||
|
| | | |
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|  |  |  |
|
||||||
|
| standard | cinematic | dense |
|
||||||
|
|  |  |  |
|
||||||
|
| splash | mixed | webtoon |
|
||||||
|
|
||||||
|
#### baoyu-article-illustrator
|
||||||
|
|
||||||
|
智能文章插图技能。分析文章内容,在需要视觉辅助的位置生成插图。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-article-illustrator path/to/article.md
|
||||||
|
```
|
||||||
|
|
||||||
|
#### baoyu-post-to-x
|
||||||
|
|
||||||
|
发布内容和文章到 X (Twitter)。支持带图片的普通帖子和 X 文章(长篇 Markdown)。使用真实 Chrome + CDP 绕过反自动化检测。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 发布文字
|
||||||
|
/baoyu-post-to-x "Hello from Claude Code!"
|
||||||
|
|
||||||
|
# 发布带图片
|
||||||
|
/baoyu-post-to-x "看看这个" --image photo.png
|
||||||
|
|
||||||
|
# 发布 X 文章
|
||||||
|
/baoyu-post-to-x --article path/to/article.md
|
||||||
|
```
|
||||||
|
|
||||||
|
#### baoyu-post-to-wechat
|
||||||
|
|
||||||
发布内容到微信公众号,支持两种模式:
|
发布内容到微信公众号,支持两种模式:
|
||||||
|
|
||||||
@@ -272,6 +307,63 @@ npx add-skill jimliu/baoyu-skills
|
|||||||
|
|
||||||
前置要求:已安装 Google Chrome,首次运行需扫码登录(登录状态会保存)
|
前置要求:已安装 Google Chrome,首次运行需扫码登录(登录状态会保存)
|
||||||
|
|
||||||
|
### AI 生成技能 (AI Generation Skills)
|
||||||
|
|
||||||
|
AI 驱动的生成后端。
|
||||||
|
|
||||||
|
#### baoyu-danger-gemini-web
|
||||||
|
|
||||||
|
与 Gemini Web 交互,生成文本和图片。
|
||||||
|
|
||||||
|
**文本生成:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-danger-gemini-web "你好,Gemini"
|
||||||
|
/baoyu-danger-gemini-web --prompt "解释量子计算"
|
||||||
|
```
|
||||||
|
|
||||||
|
**图片生成:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-danger-gemini-web --prompt "一只可爱的猫" --image cat.png
|
||||||
|
/baoyu-danger-gemini-web --promptfiles system.md content.md --image out.png
|
||||||
|
```
|
||||||
|
|
||||||
|
### 工具技能 (Utility Skills)
|
||||||
|
|
||||||
|
内容处理工具。
|
||||||
|
|
||||||
|
#### baoyu-danger-x-to-markdown
|
||||||
|
|
||||||
|
将 X (Twitter) 内容转换为 markdown 格式。支持推文串和 X 文章。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 将推文转换为 markdown
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456
|
||||||
|
|
||||||
|
# 保存到指定文件
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 -o output.md
|
||||||
|
|
||||||
|
# JSON 输出
|
||||||
|
/baoyu-danger-x-to-markdown https://x.com/username/status/123456 --json
|
||||||
|
```
|
||||||
|
|
||||||
|
**支持的 URL:**
|
||||||
|
- `https://x.com/<user>/status/<id>`
|
||||||
|
- `https://twitter.com/<user>/status/<id>`
|
||||||
|
- `https://x.com/i/article/<id>`
|
||||||
|
|
||||||
|
**身份验证:** 使用环境变量(`X_AUTH_TOKEN`、`X_CT0`)或 Chrome 登录进行 cookie 认证。
|
||||||
|
|
||||||
|
#### baoyu-compress-image
|
||||||
|
|
||||||
|
压缩图片以减小文件大小,同时保持质量。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/baoyu-compress-image path/to/image.png
|
||||||
|
/baoyu-compress-image path/to/images/ --quality 80
|
||||||
|
```
|
||||||
|
|
||||||
## 自定义扩展
|
## 自定义扩展
|
||||||
|
|
||||||
所有技能支持通过 `EXTEND.md` 文件自定义。创建扩展文件可覆盖默认样式、添加自定义配置或定义个人预设。
|
所有技能支持通过 `EXTEND.md` 文件自定义。创建扩展文件可覆盖默认样式、添加自定义配置或定义个人预设。
|
||||||
|
|||||||
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 782 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 936 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 402 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 926 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 98 KiB |
@@ -102,43 +102,42 @@ When no `--style` is specified, analyze content to select the best style:
|
|||||||
|
|
||||||
## File Management
|
## File Management
|
||||||
|
|
||||||
### With Article Path
|
### Output Directory
|
||||||
|
|
||||||
Save illustrations to `[source-name-no-ext]/illustrations/` subdirectory in the same folder as the article:
|
Each session creates an independent directory named by content slug:
|
||||||
|
|
||||||
```
|
```
|
||||||
path/to/
|
illustrations/{topic-slug}/
|
||||||
├── article.md
|
├── source-{slug}.{ext} # Source files (text, images, etc.)
|
||||||
└── article/
|
├── outline.md
|
||||||
└── illustrations/
|
├── outline-{style}.md # Style variant outlines
|
||||||
├── outline.md
|
├── prompts/
|
||||||
├── prompts/
|
│ ├── illustration-concept-a.md
|
||||||
│ ├── illustration-concept-a.md
|
│ ├── illustration-concept-b.md
|
||||||
│ ├── illustration-concept-b.md
|
│ └── ...
|
||||||
│ └── ...
|
├── illustration-concept-a.png
|
||||||
├── illustration-concept-a.png
|
├── illustration-concept-b.png
|
||||||
├── illustration-concept-b.png
|
└── ...
|
||||||
└── ...
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Example: `/posts/ai-future.md` → `/posts/ai-future/illustrations/`
|
**Slug Generation**:
|
||||||
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
|
2. Example: "The Future of AI" → `future-of-ai`
|
||||||
|
|
||||||
### Without Article Path (Pasted Content)
|
### Conflict Resolution
|
||||||
|
|
||||||
Save to `./illustrations/[topic-slug]/`:
|
If `illustrations/{topic-slug}/` already exists:
|
||||||
|
- Append timestamp: `{topic-slug}-YYYYMMDD-HHMMSS`
|
||||||
|
- Example: `ai-future` exists → `ai-future-20260118-143052`
|
||||||
|
|
||||||
```
|
### Source Files
|
||||||
illustrations/
|
|
||||||
└── ai-future/
|
|
||||||
├── source.md
|
|
||||||
├── outline.md
|
|
||||||
├── prompts/
|
|
||||||
└── *.png
|
|
||||||
```
|
|
||||||
|
|
||||||
### Directory Backup
|
Copy all sources with naming `source-{slug}.{ext}`:
|
||||||
|
- `source-article.md` (main text content)
|
||||||
|
- `source-photo.jpg` (image from conversation)
|
||||||
|
- `source-reference.pdf` (additional file)
|
||||||
|
|
||||||
If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
|
Multiple sources supported: text, images, files from conversation.
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Create original knowledge comics with multiple visual styles.
|
|||||||
|
|
||||||
| Option | Values |
|
| Option | Values |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
| `--style` | classic (default), dramatic, warm, tech, sepia, vibrant, ohmsha, realistic, or custom description |
|
| `--style` | classic (default), dramatic, warm, sepia, vibrant, ohmsha, realistic, wuxia, or custom description |
|
||||||
| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon |
|
| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon |
|
||||||
| `--aspect` | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) |
|
| `--aspect` | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) |
|
||||||
| `--lang` | auto (default), zh, en, ja, etc. |
|
| `--lang` | auto (default), zh, en, ja, etc. |
|
||||||
@@ -32,11 +32,12 @@ Style × Layout × Aspect can be freely combined. Custom styles can be described
|
|||||||
| Content Signals | Style | Layout |
|
| Content Signals | Style | Layout |
|
||||||
|-----------------|-------|--------|
|
|-----------------|-------|--------|
|
||||||
| Tutorial, how-to, beginner | ohmsha | webtoon |
|
| Tutorial, how-to, beginner | ohmsha | webtoon |
|
||||||
| Computing, AI, programming | tech | dense |
|
| Computing, AI, programming | ohmsha | dense |
|
||||||
| Pre-1950, classical, ancient | sepia | cinematic |
|
| Pre-1950, classical, ancient | sepia | cinematic |
|
||||||
| Personal story, mentor | warm | standard |
|
| Personal story, mentor | warm | standard |
|
||||||
| Conflict, breakthrough | dramatic | splash |
|
| Conflict, breakthrough | dramatic | splash |
|
||||||
| Wine, food, business, lifestyle, professional | realistic | cinematic |
|
| Wine, food, business, lifestyle, professional | realistic | cinematic |
|
||||||
|
| Martial arts, wuxia, xianxia, Chinese historical | wuxia | splash |
|
||||||
| Biography, balanced | classic | mixed |
|
| Biography, balanced | classic | mixed |
|
||||||
|
|
||||||
## Script Directory
|
## Script Directory
|
||||||
@@ -55,9 +56,11 @@ Style × Layout × Aspect can be freely combined. Custom styles can be described
|
|||||||
|
|
||||||
## File Structure
|
## File Structure
|
||||||
|
|
||||||
|
Each session creates an independent directory named by content slug:
|
||||||
|
|
||||||
```
|
```
|
||||||
[target]/
|
comic/{topic-slug}/
|
||||||
├── source.md # Source content (if pasted, not file)
|
├── source-{slug}.{ext} # Source files (text, images, etc.)
|
||||||
├── analysis.md # Deep analysis results (YAML+MD)
|
├── analysis.md # Deep analysis results (YAML+MD)
|
||||||
├── storyboard-chronological.md # Variant A (preserved)
|
├── storyboard-chronological.md # Variant A (preserved)
|
||||||
├── storyboard-thematic.md # Variant B (preserved)
|
├── storyboard-thematic.md # Variant B (preserved)
|
||||||
@@ -83,13 +86,19 @@ Style × Layout × Aspect can be freely combined. Custom styles can be described
|
|||||||
└── {topic-slug}.pdf
|
└── {topic-slug}.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
**Target directory**:
|
**Slug Generation**:
|
||||||
- With source path: `[source-dir]/[source-name-no-ext]/comic/`
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
- Example: `/posts/turing-story.md` → `/posts/turing-story/comic/`
|
2. Example: "Alan Turing Biography" → `alan-turing-bio`
|
||||||
- Without source: `./comic/[topic-slug]/`
|
|
||||||
|
|
||||||
**Directory backup**:
|
**Conflict Resolution**:
|
||||||
- If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
|
If `comic/{topic-slug}/` already exists:
|
||||||
|
- Append timestamp: `{topic-slug}-YYYYMMDD-HHMMSS`
|
||||||
|
- Example: `turing-story` exists → `turing-story-20260118-143052`
|
||||||
|
|
||||||
|
**Source Files**:
|
||||||
|
Copy all sources with naming `source-{slug}.{ext}`:
|
||||||
|
- `source-biography.md`, `source-portrait.jpg`, `source-timeline.png`, etc.
|
||||||
|
- Multiple sources supported: text, images, files from conversation
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
@@ -164,7 +173,7 @@ What readers will gain:
|
|||||||
## Content Signals
|
## Content Signals
|
||||||
|
|
||||||
- "biography" → classic + mixed
|
- "biography" → classic + mixed
|
||||||
- "computing history" → tech + dense
|
- "computing history" → ohmsha + dense
|
||||||
- "personal tragedy" → dramatic + splash
|
- "personal tragedy" → dramatic + splash
|
||||||
|
|
||||||
## Recommended Approaches
|
## Recommended Approaches
|
||||||
@@ -181,7 +190,7 @@ Create three distinct variants, each combining a narrative approach with a recom
|
|||||||
| Variant | Narrative Approach | Recommended Style | Layout |
|
| Variant | Narrative Approach | Recommended Style | Layout |
|
||||||
|---------|-------------------|-------------------|--------|
|
|---------|-------------------|-------------------|--------|
|
||||||
| A | Chronological | sepia | cinematic |
|
| A | Chronological | sepia | cinematic |
|
||||||
| B | Thematic | tech | dense |
|
| B | Thematic | ohmsha | dense |
|
||||||
| C | Character-focused | warm | standard |
|
| C | Character-focused | warm | standard |
|
||||||
|
|
||||||
**For each variant**:
|
**For each variant**:
|
||||||
@@ -229,13 +238,13 @@ Create three distinct variants, each combining a narrative approach with a recom
|
|||||||
```
|
```
|
||||||
Question 1 (Storyboard): Which storyboard variant?
|
Question 1 (Storyboard): Which storyboard variant?
|
||||||
- A: Chronological + sepia (Recommended)
|
- A: Chronological + sepia (Recommended)
|
||||||
- B: Thematic + tech
|
- B: Thematic + ohmsha
|
||||||
- C: Character-focused + warm
|
- C: Character-focused + warm
|
||||||
- Custom
|
- Custom
|
||||||
|
|
||||||
Question 2 (Style): Which visual style?
|
Question 2 (Style): Which visual style?
|
||||||
- sepia (Recommended from variant)
|
- sepia (Recommended from variant)
|
||||||
- classic / dramatic / warm / tech / vibrant / ohmsha / realistic
|
- classic / dramatic / warm / sepia / vibrant / ohmsha / realistic / wuxia
|
||||||
- Custom description
|
- Custom description
|
||||||
|
|
||||||
Question 3 (Language) - only if mismatch:
|
Question 3 (Language) - only if mismatch:
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ Technical explanations, complex narratives, timelines
|
|||||||
|
|
||||||
## Best Style Pairings
|
## Best Style Pairings
|
||||||
|
|
||||||
tech, ohmsha, vibrant
|
ohmsha, vibrant
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ Ohmsha-style tutorials, mobile reading, step-by-step guides
|
|||||||
|
|
||||||
## Best Style Pairings
|
## Best Style Pairings
|
||||||
|
|
||||||
ohmsha, tech, vibrant
|
ohmsha, vibrant
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
# tech
|
|
||||||
|
|
||||||
Modern, digital-age narratives
|
|
||||||
|
|
||||||
## Style Guidelines
|
|
||||||
|
|
||||||
### Line Work
|
|
||||||
- 2px, precise geometric undertones
|
|
||||||
- Clean, technical precision
|
|
||||||
- Circuit-like patterns in backgrounds
|
|
||||||
|
|
||||||
### Character Design
|
|
||||||
- Contemporary clothing, focused expressions
|
|
||||||
- Modern tech accessories
|
|
||||||
- Clean, precise features
|
|
||||||
|
|
||||||
### Background Treatment
|
|
||||||
- Digital elements, screens, circuit motifs
|
|
||||||
- Grid patterns
|
|
||||||
- Glowing interface elements
|
|
||||||
|
|
||||||
## Color Palette
|
|
||||||
|
|
||||||
- Primary: Cyan (#00D4FF), deep blue (#1A365D), white
|
|
||||||
- Accents: Neon green (#00FF88), electric purple (#805AD5)
|
|
||||||
- Background: Dark gray (#1A202C), grid patterns
|
|
||||||
|
|
||||||
## Mood
|
|
||||||
|
|
||||||
Innovation, digital, contemporary
|
|
||||||
|
|
||||||
## Best For
|
|
||||||
|
|
||||||
Computing history, AI stories, modern tech
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# wuxia
|
||||||
|
|
||||||
|
Hong Kong martial arts comic style (港漫武侠风格)
|
||||||
|
|
||||||
|
## Style Guidelines
|
||||||
|
|
||||||
|
### Line Work
|
||||||
|
- 2-3px dynamic brush strokes with varying weight
|
||||||
|
- Ink wash effects, traditional Chinese brush feel
|
||||||
|
- Speed lines and impact effects for action scenes
|
||||||
|
- Bold, confident strokes with sharp edges
|
||||||
|
|
||||||
|
### Character Design
|
||||||
|
- Realistic human proportions (7.5-8 head heights)
|
||||||
|
- Defined musculature, dynamic warrior poses
|
||||||
|
- Flowing hair and clothing in motion
|
||||||
|
- Intense, determined facial expressions
|
||||||
|
- Traditional Chinese martial arts attire (robes, armor)
|
||||||
|
|
||||||
|
### Background Treatment
|
||||||
|
- Dramatic landscapes: mountains, waterfalls, temples
|
||||||
|
- Ink wash atmospheric effects
|
||||||
|
- Flying debris, dust clouds during combat
|
||||||
|
- Energy/qi effects with flowing lines
|
||||||
|
- High contrast silhouettes
|
||||||
|
|
||||||
|
## Color Palette
|
||||||
|
|
||||||
|
- Primary: Deep black ink, crimson red (#8B0000), gold (#D4AF37)
|
||||||
|
- Skin: Natural tan with dramatic shadows
|
||||||
|
- Background: Misty grays, earth tones, ink wash gradients
|
||||||
|
- Effects: Glowing qi energy (blue, gold, white)
|
||||||
|
|
||||||
|
## Special Effects
|
||||||
|
|
||||||
|
- **Combat impact**: Radiating lines, shockwaves, debris
|
||||||
|
- **Qi/energy**: Flowing aura, glowing effects around characters
|
||||||
|
- **Movement**: Extreme speed lines, motion blur
|
||||||
|
- **Atmosphere**: Ink wash clouds, mist, flying leaves/petals
|
||||||
|
|
||||||
|
## Quality Markers
|
||||||
|
|
||||||
|
A good wuxia comic page exhibits:
|
||||||
|
- ✓ Dynamic action poses with sense of motion
|
||||||
|
- ✓ Ink brush aesthetic in line work
|
||||||
|
- ✓ High contrast dramatic lighting
|
||||||
|
- ✓ Atmospheric backgrounds with Chinese elements
|
||||||
|
- ✓ Energy/qi effects that feel powerful
|
||||||
|
- ✓ Flowing fabric and hair movement
|
||||||
|
- ✓ Impactful combat moments
|
||||||
|
|
||||||
|
## Best For
|
||||||
|
|
||||||
|
Martial arts stories, Chinese historical fiction, action-heavy narratives, wuxia/xianxia adaptations
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
---
|
||||||
|
name: baoyu-compress-image
|
||||||
|
description: Cross-platform image compression skill. Converts images to WebP by default with PNG-to-PNG support. Uses system tools (sips, cwebp, ImageMagick) with Sharp fallback.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Image Compressor
|
||||||
|
|
||||||
|
Cross-platform image compression with WebP default output, PNG-to-PNG support, preferring system tools with Sharp fallback.
|
||||||
|
|
||||||
|
## Script Directory
|
||||||
|
|
||||||
|
**Important**: All scripts are located in the `scripts/` subdirectory of this skill.
|
||||||
|
|
||||||
|
**Agent Execution Instructions**:
|
||||||
|
1. Determine this SKILL.md file's directory path as `SKILL_DIR`
|
||||||
|
2. Script path = `${SKILL_DIR}/scripts/<script-name>.ts`
|
||||||
|
3. Replace all `${SKILL_DIR}` in this document with the actual path
|
||||||
|
|
||||||
|
**Script Reference**:
|
||||||
|
| Script | Purpose |
|
||||||
|
|--------|---------|
|
||||||
|
| `scripts/main.ts` | CLI entry point for image compression |
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Compress to WebP (default)
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png
|
||||||
|
|
||||||
|
# Keep original format (PNG → PNG)
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --format png
|
||||||
|
|
||||||
|
# Custom quality
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -q 75
|
||||||
|
|
||||||
|
# Process directory
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r
|
||||||
|
```
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### Single File Compression
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Basic (converts to WebP, replaces original)
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png
|
||||||
|
|
||||||
|
# Custom output path
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -o compressed.webp
|
||||||
|
|
||||||
|
# Keep original file
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --keep
|
||||||
|
|
||||||
|
# Custom quality (0-100, default: 80)
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -q 75
|
||||||
|
|
||||||
|
# Keep original format
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -f png
|
||||||
|
```
|
||||||
|
|
||||||
|
### Directory Processing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Process all images in directory
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/
|
||||||
|
|
||||||
|
# Recursive processing
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r
|
||||||
|
|
||||||
|
# With custom quality
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r -q 75
|
||||||
|
```
|
||||||
|
|
||||||
|
### Output Formats
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Plain text (default)
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png
|
||||||
|
|
||||||
|
# JSON output
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --json
|
||||||
|
```
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
| Option | Short | Description | Default |
|
||||||
|
|--------|-------|-------------|---------|
|
||||||
|
| `<input>` | | Input file or directory | Required |
|
||||||
|
| `--output <path>` | `-o` | Output path | Same path, new extension |
|
||||||
|
| `--format <fmt>` | `-f` | webp, png, jpeg | webp |
|
||||||
|
| `--quality <n>` | `-q` | Quality 0-100 | 80 |
|
||||||
|
| `--keep` | `-k` | Keep original file | false |
|
||||||
|
| `--recursive` | `-r` | Process directories recursively | false |
|
||||||
|
| `--json` | | JSON output | false |
|
||||||
|
| `--help` | `-h` | Show help | |
|
||||||
|
|
||||||
|
## Compressor Selection
|
||||||
|
|
||||||
|
Priority order (auto-detected):
|
||||||
|
|
||||||
|
1. **sips** (macOS built-in, WebP support since macOS 11)
|
||||||
|
2. **cwebp** (Google's official WebP tool)
|
||||||
|
3. **ImageMagick** (`convert` command)
|
||||||
|
4. **Sharp** (npm package, auto-installed by Bun)
|
||||||
|
|
||||||
|
The skill automatically selects the best available compressor.
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
### Text Mode (default)
|
||||||
|
|
||||||
|
```
|
||||||
|
image.png → image.webp (245KB → 89KB, 64% reduction)
|
||||||
|
```
|
||||||
|
|
||||||
|
### JSON Mode
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"input": "image.png",
|
||||||
|
"output": "image.webp",
|
||||||
|
"inputSize": 250880,
|
||||||
|
"outputSize": 91136,
|
||||||
|
"ratio": 0.36,
|
||||||
|
"compressor": "sips"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Directory JSON Mode
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"files": [...],
|
||||||
|
"summary": {
|
||||||
|
"totalFiles": 10,
|
||||||
|
"totalInputSize": 2508800,
|
||||||
|
"totalOutputSize": 911360,
|
||||||
|
"ratio": 0.36,
|
||||||
|
"compressor": "sips"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Compress single image
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts photo.png
|
||||||
|
# photo.png → photo.webp (1.2MB → 340KB, 72% reduction)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compress with custom quality
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts photo.png -q 60
|
||||||
|
# photo.png → photo.webp (1.2MB → 280KB, 77% reduction)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Keep original format
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts screenshot.png -f png --keep
|
||||||
|
# screenshot.png → screenshot-compressed.png (500KB → 380KB, 24% reduction)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Process entire directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts ./screenshots/ -r
|
||||||
|
# Processed 15 files: 12.5MB → 4.2MB (66% reduction)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get JSON for scripting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --json | jq '.ratio'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Extension Support
|
||||||
|
|
||||||
|
Custom configurations via EXTEND.md.
|
||||||
|
|
||||||
|
**Check paths** (priority order):
|
||||||
|
1. `.baoyu-skills/baoyu-compress-image/EXTEND.md` (project)
|
||||||
|
2. `~/.baoyu-skills/baoyu-compress-image/EXTEND.md` (user)
|
||||||
|
|
||||||
|
If found, load before workflow. Extension content overrides defaults.
|
||||||
@@ -0,0 +1,315 @@
|
|||||||
|
#!/usr/bin/env bun
|
||||||
|
import { existsSync, statSync, readdirSync, unlinkSync, renameSync } from "fs";
|
||||||
|
import { basename, dirname, extname, join, resolve } from "path";
|
||||||
|
import { spawn } from "child_process";
|
||||||
|
|
||||||
|
type Compressor = "sips" | "cwebp" | "imagemagick" | "sharp";
|
||||||
|
type Format = "webp" | "png" | "jpeg";
|
||||||
|
|
||||||
|
interface Options {
|
||||||
|
input: string;
|
||||||
|
output?: string;
|
||||||
|
format: Format;
|
||||||
|
quality: number;
|
||||||
|
keep: boolean;
|
||||||
|
recursive: boolean;
|
||||||
|
json: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Result {
|
||||||
|
input: string;
|
||||||
|
output: string;
|
||||||
|
inputSize: number;
|
||||||
|
outputSize: number;
|
||||||
|
ratio: number;
|
||||||
|
compressor: Compressor;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SUPPORTED_EXTS = [".png", ".jpg", ".jpeg", ".webp", ".gif", ".tiff"];
|
||||||
|
|
||||||
|
async function commandExists(cmd: string): Promise<boolean> {
|
||||||
|
try {
|
||||||
|
const proc = spawn("which", [cmd], { stdio: "pipe" });
|
||||||
|
return new Promise((res) => {
|
||||||
|
proc.on("close", (code) => res(code === 0));
|
||||||
|
proc.on("error", () => res(false));
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detectCompressor(format: Format): Promise<Compressor> {
|
||||||
|
if (format === "webp") {
|
||||||
|
if (await commandExists("cwebp")) return "cwebp";
|
||||||
|
if (await commandExists("convert")) return "imagemagick";
|
||||||
|
return "sharp";
|
||||||
|
}
|
||||||
|
if (process.platform === "darwin") return "sips";
|
||||||
|
if (await commandExists("convert")) return "imagemagick";
|
||||||
|
return "sharp";
|
||||||
|
}
|
||||||
|
|
||||||
|
function runCmd(cmd: string, args: string[]): Promise<{ code: number; stderr: string }> {
|
||||||
|
return new Promise((res) => {
|
||||||
|
const proc = spawn(cmd, args, { stdio: ["ignore", "ignore", "pipe"] });
|
||||||
|
let stderr = "";
|
||||||
|
proc.stderr?.on("data", (d) => (stderr += d.toString()));
|
||||||
|
proc.on("close", (code) => res({ code: code ?? 1, stderr }));
|
||||||
|
proc.on("error", (e) => res({ code: 1, stderr: e.message }));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function compressWithSips(input: string, output: string, format: Format, quality: number): Promise<void> {
|
||||||
|
const fmt = format === "jpeg" ? "jpeg" : format;
|
||||||
|
const args = ["-s", "format", fmt, "-s", "formatOptions", String(quality), input, "--out", output];
|
||||||
|
const { code, stderr } = await runCmd("sips", args);
|
||||||
|
if (code !== 0) throw new Error(`sips failed: ${stderr}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function compressWithCwebp(input: string, output: string, quality: number): Promise<void> {
|
||||||
|
const args = ["-q", String(quality), input, "-o", output];
|
||||||
|
const { code, stderr } = await runCmd("cwebp", args);
|
||||||
|
if (code !== 0) throw new Error(`cwebp failed: ${stderr}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function compressWithImagemagick(input: string, output: string, quality: number): Promise<void> {
|
||||||
|
const args = [input, "-quality", String(quality), output];
|
||||||
|
const { code, stderr } = await runCmd("convert", args);
|
||||||
|
if (code !== 0) throw new Error(`convert failed: ${stderr}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function compressWithSharp(input: string, output: string, format: Format, quality: number): Promise<void> {
|
||||||
|
const sharp = (await import("sharp")).default;
|
||||||
|
let pipeline = sharp(input);
|
||||||
|
if (format === "webp") pipeline = pipeline.webp({ quality });
|
||||||
|
else if (format === "png") pipeline = pipeline.png({ quality });
|
||||||
|
else if (format === "jpeg") pipeline = pipeline.jpeg({ quality });
|
||||||
|
await pipeline.toFile(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function compress(
|
||||||
|
compressor: Compressor,
|
||||||
|
input: string,
|
||||||
|
output: string,
|
||||||
|
format: Format,
|
||||||
|
quality: number
|
||||||
|
): Promise<void> {
|
||||||
|
switch (compressor) {
|
||||||
|
case "sips":
|
||||||
|
await compressWithSips(input, output, format, quality);
|
||||||
|
break;
|
||||||
|
case "cwebp":
|
||||||
|
if (format !== "webp") {
|
||||||
|
await compressWithSharp(input, output, format, quality);
|
||||||
|
} else {
|
||||||
|
await compressWithCwebp(input, output, quality);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "imagemagick":
|
||||||
|
await compressWithImagemagick(input, output, quality);
|
||||||
|
break;
|
||||||
|
case "sharp":
|
||||||
|
await compressWithSharp(input, output, format, quality);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOutputPath(input: string, format: Format, keep: boolean, customOutput?: string): string {
|
||||||
|
if (customOutput) return resolve(customOutput);
|
||||||
|
const dir = dirname(input);
|
||||||
|
const base = basename(input, extname(input));
|
||||||
|
const ext = format === "jpeg" ? ".jpg" : `.${format}`;
|
||||||
|
if (keep && extname(input).toLowerCase() === ext) {
|
||||||
|
return join(dir, `${base}-compressed${ext}`);
|
||||||
|
}
|
||||||
|
return join(dir, `${base}${ext}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatSize(bytes: number): string {
|
||||||
|
if (bytes < 1024) return `${bytes}B`;
|
||||||
|
if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)}KB`;
|
||||||
|
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function processFile(
|
||||||
|
compressor: Compressor,
|
||||||
|
input: string,
|
||||||
|
opts: Options
|
||||||
|
): Promise<Result> {
|
||||||
|
const absInput = resolve(input);
|
||||||
|
const inputSize = statSync(absInput).size;
|
||||||
|
const output = getOutputPath(absInput, opts.format, opts.keep, opts.output);
|
||||||
|
const tempOutput = output + ".tmp";
|
||||||
|
|
||||||
|
await compress(compressor, absInput, tempOutput, opts.format, opts.quality);
|
||||||
|
|
||||||
|
const outputSize = statSync(tempOutput).size;
|
||||||
|
|
||||||
|
if (!opts.keep && absInput !== output) {
|
||||||
|
unlinkSync(absInput);
|
||||||
|
}
|
||||||
|
renameSync(tempOutput, output);
|
||||||
|
|
||||||
|
return {
|
||||||
|
input: absInput,
|
||||||
|
output,
|
||||||
|
inputSize,
|
||||||
|
outputSize,
|
||||||
|
ratio: outputSize / inputSize,
|
||||||
|
compressor,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function collectFiles(dir: string, recursive: boolean): string[] {
|
||||||
|
const files: string[] = [];
|
||||||
|
const entries = readdirSync(dir, { withFileTypes: true });
|
||||||
|
for (const entry of entries) {
|
||||||
|
const full = join(dir, entry.name);
|
||||||
|
if (entry.isDirectory() && recursive) {
|
||||||
|
files.push(...collectFiles(full, recursive));
|
||||||
|
} else if (entry.isFile() && SUPPORTED_EXTS.includes(extname(entry.name).toLowerCase())) {
|
||||||
|
files.push(full);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
|
||||||
|
function printHelp() {
|
||||||
|
console.log(`Usage: bun main.ts <input> [options]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-o, --output <path> Output path
|
||||||
|
-f, --format <fmt> Output format: webp, png, jpeg (default: webp)
|
||||||
|
-q, --quality <n> Quality 0-100 (default: 80)
|
||||||
|
-k, --keep Keep original file
|
||||||
|
-r, --recursive Process directories recursively
|
||||||
|
--json JSON output
|
||||||
|
-h, --help Show help`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseArgs(args: string[]): Options | null {
|
||||||
|
const opts: Options = {
|
||||||
|
input: "",
|
||||||
|
format: "webp",
|
||||||
|
quality: 80,
|
||||||
|
keep: false,
|
||||||
|
recursive: false,
|
||||||
|
json: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
for (let i = 0; i < args.length; i++) {
|
||||||
|
const arg = args[i];
|
||||||
|
if (arg === "-h" || arg === "--help") {
|
||||||
|
printHelp();
|
||||||
|
process.exit(0);
|
||||||
|
} else if (arg === "-o" || arg === "--output") {
|
||||||
|
opts.output = args[++i];
|
||||||
|
} else if (arg === "-f" || arg === "--format") {
|
||||||
|
const fmt = args[++i]?.toLowerCase();
|
||||||
|
if (fmt === "webp" || fmt === "png" || fmt === "jpeg" || fmt === "jpg") {
|
||||||
|
opts.format = fmt === "jpg" ? "jpeg" : (fmt as Format);
|
||||||
|
} else {
|
||||||
|
console.error(`Invalid format: ${fmt}`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if (arg === "-q" || arg === "--quality") {
|
||||||
|
const q = parseInt(args[++i], 10);
|
||||||
|
if (isNaN(q) || q < 0 || q > 100) {
|
||||||
|
console.error(`Invalid quality: ${args[i]}`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
opts.quality = q;
|
||||||
|
} else if (arg === "-k" || arg === "--keep") {
|
||||||
|
opts.keep = true;
|
||||||
|
} else if (arg === "-r" || arg === "--recursive") {
|
||||||
|
opts.recursive = true;
|
||||||
|
} else if (arg === "--json") {
|
||||||
|
opts.json = true;
|
||||||
|
} else if (!arg.startsWith("-") && !opts.input) {
|
||||||
|
opts.input = arg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!opts.input) {
|
||||||
|
console.error("Error: Input file or directory required");
|
||||||
|
printHelp();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const args = process.argv.slice(2);
|
||||||
|
const opts = parseArgs(args);
|
||||||
|
if (!opts) process.exit(1);
|
||||||
|
|
||||||
|
const input = resolve(opts.input);
|
||||||
|
if (!existsSync(input)) {
|
||||||
|
console.error(`Error: ${input} not found`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const compressor = await detectCompressor(opts.format);
|
||||||
|
const isDir = statSync(input).isDirectory();
|
||||||
|
|
||||||
|
if (isDir) {
|
||||||
|
const files = collectFiles(input, opts.recursive);
|
||||||
|
if (files.length === 0) {
|
||||||
|
console.error("No supported images found");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const results: Result[] = [];
|
||||||
|
for (const file of files) {
|
||||||
|
try {
|
||||||
|
const r = await processFile(compressor, file, { ...opts, output: undefined });
|
||||||
|
results.push(r);
|
||||||
|
if (!opts.json) {
|
||||||
|
const reduction = Math.round((1 - r.ratio) * 100);
|
||||||
|
console.log(`${r.input} → ${r.output} (${formatSize(r.inputSize)} → ${formatSize(r.outputSize)}, ${reduction}% reduction)`);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (!opts.json) console.error(`Error processing ${file}: ${(e as Error).message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opts.json) {
|
||||||
|
const totalInput = results.reduce((s, r) => s + r.inputSize, 0);
|
||||||
|
const totalOutput = results.reduce((s, r) => s + r.outputSize, 0);
|
||||||
|
console.log(
|
||||||
|
JSON.stringify({
|
||||||
|
files: results,
|
||||||
|
summary: {
|
||||||
|
totalFiles: results.length,
|
||||||
|
totalInputSize: totalInput,
|
||||||
|
totalOutputSize: totalOutput,
|
||||||
|
ratio: totalInput > 0 ? totalOutput / totalInput : 0,
|
||||||
|
compressor,
|
||||||
|
},
|
||||||
|
}, null, 2)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
const totalInput = results.reduce((s, r) => s + r.inputSize, 0);
|
||||||
|
const totalOutput = results.reduce((s, r) => s + r.outputSize, 0);
|
||||||
|
const reduction = Math.round((1 - totalOutput / totalInput) * 100);
|
||||||
|
console.log(`\nProcessed ${results.length} files: ${formatSize(totalInput)} → ${formatSize(totalOutput)} (${reduction}% reduction)`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const r = await processFile(compressor, input, opts);
|
||||||
|
if (opts.json) {
|
||||||
|
console.log(JSON.stringify(r, null, 2));
|
||||||
|
} else {
|
||||||
|
const reduction = Math.round((1 - r.ratio) * 100);
|
||||||
|
console.log(`${r.input} → ${r.output} (${formatSize(r.inputSize)} → ${formatSize(r.outputSize)}, ${reduction}% reduction)`);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`Error: ${(e as Error).message}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
@@ -74,38 +74,35 @@ When no `--style` is specified, the system analyzes content to select the best s
|
|||||||
|
|
||||||
## File Management
|
## File Management
|
||||||
|
|
||||||
### With Article Path
|
### Output Directory
|
||||||
|
|
||||||
Save to `[source-name-no-ext]/cover-image/` subdirectory in the same folder as the article:
|
Each session creates an independent directory named by content slug:
|
||||||
|
|
||||||
```
|
```
|
||||||
path/to/
|
cover-image/{topic-slug}/
|
||||||
├── article.md
|
├── source-{slug}.{ext} # Source files (text, images, etc.)
|
||||||
└── article/
|
├── prompts/
|
||||||
└── cover-image/
|
│ └── cover.md
|
||||||
├── prompts/
|
└── cover.png
|
||||||
│ └── cover.md
|
|
||||||
└── cover.png
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Example: `/posts/ai-future.md` → `/posts/ai-future/cover-image/`
|
**Slug Generation**:
|
||||||
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
|
2. Example: "The Future of AI" → `future-of-ai`
|
||||||
|
|
||||||
### Without Article Path (Pasted Content)
|
### Conflict Resolution
|
||||||
|
|
||||||
Save to `./cover-image/[topic-slug]/`:
|
If `cover-image/{topic-slug}/` already exists:
|
||||||
|
- Append timestamp: `{topic-slug}-YYYYMMDD-HHMMSS`
|
||||||
|
- Example: `ai-future` exists → `ai-future-20260118-143052`
|
||||||
|
|
||||||
```
|
### Source Files
|
||||||
cover-image/
|
|
||||||
└── ai-future/
|
|
||||||
├── source.md # Saved pasted content
|
|
||||||
├── prompts/
|
|
||||||
│ └── cover.md
|
|
||||||
└── cover.png
|
|
||||||
```
|
|
||||||
|
|
||||||
### Directory Backup
|
Copy all sources with naming `source-{slug}.{ext}`:
|
||||||
|
- `source-article.md` (main text content)
|
||||||
|
- `source-logo.png` (image from conversation)
|
||||||
|
|
||||||
If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
|
Multiple sources supported: text, images, files from conversation.
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -95,36 +95,40 @@ This deck is designed for **reading and sharing**, not live presentation:
|
|||||||
|
|
||||||
## File Management
|
## File Management
|
||||||
|
|
||||||
### With Content Path
|
### Output Directory
|
||||||
```
|
|
||||||
content-dir/
|
|
||||||
├── source-content.md
|
|
||||||
└── source-content/
|
|
||||||
└── slide-deck/
|
|
||||||
├── outline.md
|
|
||||||
├── prompts/
|
|
||||||
│ └── 01-slide-cover.md, 02-slide-{slug}.md, ...
|
|
||||||
├── 01-slide-cover.png, 02-slide-{slug}.png, ...
|
|
||||||
├── {topic-slug}.pptx
|
|
||||||
└── {topic-slug}.pdf
|
|
||||||
```
|
|
||||||
|
|
||||||
Example: `/posts/ai-intro.md` → `/posts/ai-intro/slide-deck/`
|
Each session creates an independent directory named by content slug:
|
||||||
|
|
||||||
### Without Content Path (Pasted Content)
|
|
||||||
```
|
```
|
||||||
slide-deck/{topic-slug}/
|
slide-deck/{topic-slug}/
|
||||||
├── source.md
|
├── source-{slug}.{ext} # Source files (text, images, etc.)
|
||||||
├── outline.md
|
├── outline.md
|
||||||
|
├── outline-{style}.md # Style variant outlines
|
||||||
├── prompts/
|
├── prompts/
|
||||||
├── *.png
|
│ └── 01-slide-cover.md, 02-slide-{slug}.md, ...
|
||||||
|
├── 01-slide-cover.png, 02-slide-{slug}.png, ...
|
||||||
├── {topic-slug}.pptx
|
├── {topic-slug}.pptx
|
||||||
└── {topic-slug}.pdf
|
└── {topic-slug}.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
### Directory Backup
|
**Slug Generation**:
|
||||||
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
|
2. Example: "Introduction to Machine Learning" → `intro-machine-learning`
|
||||||
|
|
||||||
If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
|
### Conflict Resolution
|
||||||
|
|
||||||
|
If `slide-deck/{topic-slug}/` already exists:
|
||||||
|
- Append timestamp: `{topic-slug}-YYYYMMDD-HHMMSS`
|
||||||
|
- Example: `intro-ml` exists → `intro-ml-20260118-143052`
|
||||||
|
|
||||||
|
### Source Files
|
||||||
|
|
||||||
|
Copy all sources with naming `source-{slug}.{ext}`:
|
||||||
|
- `source-article.md` (main text content)
|
||||||
|
- `source-diagram.png` (image from conversation)
|
||||||
|
- `source-data.xlsx` (additional file)
|
||||||
|
|
||||||
|
Multiple sources supported: text, images, files from conversation.
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -67,3 +67,4 @@ Clean sans-serif such as Inter, SF Pro, or Helvetica Neue. Medium weight for bod
|
|||||||
## Best For
|
## Best For
|
||||||
|
|
||||||
Product launches, marketing presentations, keynote speeches, brand showcases, investor pitches, high-stakes presentations
|
Product launches, marketing presentations, keynote speeches, brand showcases, investor pitches, high-stakes presentations
|
||||||
|
|
||||||
|
|||||||
@@ -49,16 +49,6 @@ Clean geometric sans-serif for text box content. Readable at smaller sizes. Cons
|
|||||||
- "KEY QUOTE:" box at bottom with core insight
|
- "KEY QUOTE:" box at bottom with core insight
|
||||||
- No title blocks, stamps, or watermarks in corners
|
- No title blocks, stamps, or watermarks in corners
|
||||||
|
|
||||||
## Text Box Types
|
|
||||||
|
|
||||||
| Label | Purpose |
|
|
||||||
|-------|---------|
|
|
||||||
| DEFINITION 定义: | Core concept definition from source |
|
|
||||||
| KEY INSIGHT 核心洞察: | Main analytical insight |
|
|
||||||
| EXAMPLE 案例: | Concrete example from content |
|
|
||||||
| KEY QUOTE 关键引文: | Important quote from source |
|
|
||||||
| CONTEXT 背景: | Contextual information |
|
|
||||||
|
|
||||||
## Style Rules
|
## Style Rules
|
||||||
|
|
||||||
### Do
|
### Do
|
||||||
@@ -77,17 +67,6 @@ Clean geometric sans-serif for text box content. Readable at smaller sizes. Cons
|
|||||||
- Use gradients or glossy effects
|
- Use gradients or glossy effects
|
||||||
- Add slide numbers, footers, or logos
|
- Add slide numbers, footers, or logos
|
||||||
|
|
||||||
## Prompt Structure
|
|
||||||
|
|
||||||
1. Start with "Technical blueprint infographic."
|
|
||||||
2. Title format: "Title: '[中文标题]' in dark maroon ALL CAPS in brackets, with English subtitle below"
|
|
||||||
3. Describe main visual (isometric 3D or 2D technical illustration)
|
|
||||||
4. Describe background pattern (faded, thematic)
|
|
||||||
5. List 3-5 text boxes with specific content
|
|
||||||
6. Include bilingual callout labels
|
|
||||||
7. Specify paper texture and colors
|
|
||||||
8. End with: "Clean corners with no title blocks or stamps. 4K ultra-high resolution. Technical blueprint aesthetic."
|
|
||||||
|
|
||||||
## Best For
|
## Best For
|
||||||
|
|
||||||
Technical explanations, concept breakdowns, academic presentations, knowledge documentation, research summaries, educational content with depth, bilingual audiences
|
Technical explanations, concept breakdowns, academic presentations, knowledge documentation, research summaries, educational content with depth, bilingual audiences
|
||||||
|
|||||||
@@ -92,9 +92,11 @@ Detailed layout definitions: `references/layouts/<layout>.md`
|
|||||||
|
|
||||||
## File Structure
|
## File Structure
|
||||||
|
|
||||||
|
Each session creates an independent directory named by content slug:
|
||||||
|
|
||||||
```
|
```
|
||||||
[target]/
|
xhs-images/{topic-slug}/
|
||||||
├── source.md # Source content (if pasted)
|
├── source-{slug}.{ext} # Source files (text, images, etc.)
|
||||||
├── analysis.md # Deep analysis results
|
├── analysis.md # Deep analysis results
|
||||||
├── outline-style-[slug].md # Variant A (e.g., outline-style-tech.md)
|
├── outline-style-[slug].md # Variant A (e.g., outline-style-tech.md)
|
||||||
├── outline-style-[slug].md # Variant B (e.g., outline-style-notion.md)
|
├── outline-style-[slug].md # Variant B (e.g., outline-style-notion.md)
|
||||||
@@ -109,13 +111,19 @@ Detailed layout definitions: `references/layouts/<layout>.md`
|
|||||||
└── NN-ending-[slug].png
|
└── NN-ending-[slug].png
|
||||||
```
|
```
|
||||||
|
|
||||||
**Target directory**:
|
**Slug Generation**:
|
||||||
- With source path: `[source-dir]/[source-name-no-ext]/xhs-images/`
|
1. Extract main topic from content (2-4 words, kebab-case)
|
||||||
- Example: `/tests-data/article.md` → `/tests-data/article/xhs-images/`
|
2. Example: "AI工具推荐" → `ai-tools-recommend`
|
||||||
- Without source: `./xhs-images/[topic-slug]/`
|
|
||||||
|
|
||||||
**Directory backup**:
|
**Conflict Resolution**:
|
||||||
- If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
|
If `xhs-images/{topic-slug}/` already exists:
|
||||||
|
- Append timestamp: `{topic-slug}-YYYYMMDD-HHMMSS`
|
||||||
|
- Example: `ai-tools` exists → `ai-tools-20260118-143052`
|
||||||
|
|
||||||
|
**Source Files**:
|
||||||
|
Copy all sources with naming `source-{slug}.{ext}`:
|
||||||
|
- `source-article.md`, `source-photo.jpg`, etc.
|
||||||
|
- Multiple sources supported: text, images, files from conversation
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
|
|||||||