mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-19 17:09:47 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e07d33fed0 | |||
| e964feb5e5 | |||
| 7669556736 |
@@ -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": "1.13.0"
|
"version": "1.14.0"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -147,3 +147,5 @@ tests-data/
|
|||||||
x-to-markdown/
|
x-to-markdown/
|
||||||
xhs-images/
|
xhs-images/
|
||||||
url-to-markdown/
|
url-to-markdown/
|
||||||
|
cover-image/
|
||||||
|
slide-deck/
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
English | [中文](./CHANGELOG.zh.md)
|
English | [中文](./CHANGELOG.zh.md)
|
||||||
|
|
||||||
|
## 1.14.0 - 2026-01-22
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- `baoyu-post-to-x`: improves video ready detection for more reliable video posting.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
- `baoyu-slide-deck`: comprehensive SKILL.md enhancement—adds slide count guidance (recommended 8-25, max 30), audience guidelines table with audience-specific principles, style selection principles with content-type recommendations, layout selection tips with common mistakes to avoid, visual hierarchy principles, content density guidelines (McKinsey-style high-density principles), color selection guide, typography principles with font recommendations (English and Chinese fonts with multilingual pairing), and visual elements reference (backgrounds, typography treatments, geometric accents).
|
||||||
|
|
||||||
## 1.13.0 - 2026-01-21
|
## 1.13.0 - 2026-01-21
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
[English](./CHANGELOG.md) | 中文
|
[English](./CHANGELOG.md) | 中文
|
||||||
|
|
||||||
|
## 1.14.0 - 2026-01-22
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- `baoyu-post-to-x`:改进视频就绪检测,提升视频发布稳定性。
|
||||||
|
|
||||||
|
### 文档
|
||||||
|
- `baoyu-slide-deck`:SKILL.md 全面增强——新增幻灯片数量指南(推荐 8-25 张,最多 30 张)、受众指南表格及各受众特定原则、风格选择原则与内容类型推荐、布局选择技巧与常见错误提示、视觉层次原则、内容密度指南(麦肯锡风格高密度原则)、配色选择指南、字体排版原则与字体推荐(中英文字体及多语言搭配方案)、视觉元素参考(背景处理、字体处理、几何装饰)。
|
||||||
|
|
||||||
## 1.13.0 - 2026-01-21
|
## 1.13.0 - 2026-01-21
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
@@ -112,24 +112,44 @@ export async function postVideoToX(options: XVideoOptions): Promise<void> {
|
|||||||
nodeId,
|
nodeId,
|
||||||
files: [absVideoPath],
|
files: [absVideoPath],
|
||||||
}, { sessionId });
|
}, { sessionId });
|
||||||
console.log('[x-video] Video file set, waiting for processing...');
|
console.log('[x-video] Video file set, uploading in background...');
|
||||||
|
|
||||||
// Wait for video to process
|
// Wait a moment for upload to start, then type text while video processes
|
||||||
|
await sleep(2000);
|
||||||
|
|
||||||
|
// Type text while video uploads in background
|
||||||
|
if (text) {
|
||||||
|
console.log('[x-video] Typing text...');
|
||||||
|
await cdp.send('Runtime.evaluate', {
|
||||||
|
expression: `
|
||||||
|
const editor = document.querySelector('[data-testid="tweetTextarea_0"]');
|
||||||
|
if (editor) {
|
||||||
|
editor.focus();
|
||||||
|
document.execCommand('insertText', false, ${JSON.stringify(text)});
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
}, { sessionId });
|
||||||
|
await sleep(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait for video to finish processing by checking if tweet button is enabled
|
||||||
|
console.log('[x-video] Waiting for video processing...');
|
||||||
const waitForVideoReady = async (maxWaitMs = 180_000): Promise<boolean> => {
|
const waitForVideoReady = async (maxWaitMs = 180_000): Promise<boolean> => {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
let dots = 0;
|
let dots = 0;
|
||||||
while (Date.now() - start < maxWaitMs) {
|
while (Date.now() - start < maxWaitMs) {
|
||||||
const result = await cdp!.send<{ result: { value: { hasMedia: boolean; isProcessing: boolean } } }>('Runtime.evaluate', {
|
const result = await cdp!.send<{ result: { value: { hasMedia: boolean; buttonEnabled: boolean } } }>('Runtime.evaluate', {
|
||||||
expression: `(() => {
|
expression: `(() => {
|
||||||
const hasMedia = !!document.querySelector('[data-testid="attachments"] video, [data-testid="videoPlayer"], video');
|
const hasMedia = !!document.querySelector('[data-testid="attachments"] video, [data-testid="videoPlayer"], video');
|
||||||
const isProcessing = !!document.querySelector('[role="progressbar"], [data-testid="progressBar"]');
|
const tweetBtn = document.querySelector('[data-testid="tweetButton"]');
|
||||||
return { hasMedia, isProcessing };
|
const buttonEnabled = tweetBtn && !tweetBtn.disabled && tweetBtn.getAttribute('aria-disabled') !== 'true';
|
||||||
|
return { hasMedia, buttonEnabled };
|
||||||
})()`,
|
})()`,
|
||||||
returnByValue: true,
|
returnByValue: true,
|
||||||
}, { sessionId });
|
}, { sessionId });
|
||||||
|
|
||||||
const { hasMedia, isProcessing } = result.result.value;
|
const { hasMedia, buttonEnabled } = result.result.value;
|
||||||
if (hasMedia && !isProcessing) {
|
if (hasMedia && buttonEnabled) {
|
||||||
console.log('');
|
console.log('');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -150,21 +170,6 @@ export async function postVideoToX(options: XVideoOptions): Promise<void> {
|
|||||||
console.log('[x-video] Video may still be processing. Please check browser window.');
|
console.log('[x-video] Video may still be processing. Please check browser window.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type text AFTER video is uploaded
|
|
||||||
if (text) {
|
|
||||||
console.log('[x-video] Typing text...');
|
|
||||||
await cdp.send('Runtime.evaluate', {
|
|
||||||
expression: `
|
|
||||||
const editor = document.querySelector('[data-testid="tweetTextarea_0"]');
|
|
||||||
if (editor) {
|
|
||||||
editor.focus();
|
|
||||||
document.execCommand('insertText', false, ${JSON.stringify(text)});
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}, { sessionId });
|
|
||||||
await sleep(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (submit) {
|
if (submit) {
|
||||||
console.log('[x-video] Submitting post...');
|
console.log('[x-video] Submitting post...');
|
||||||
await cdp.send('Runtime.evaluate', {
|
await cdp.send('Runtime.evaluate', {
|
||||||
|
|||||||
@@ -41,11 +41,74 @@ Transform content into professional slide deck images with flexible style option
|
|||||||
| `--style <name>` | Visual style (see Style Gallery) |
|
| `--style <name>` | Visual style (see Style Gallery) |
|
||||||
| `--audience <type>` | Target audience: beginners, intermediate, experts, executives, general |
|
| `--audience <type>` | Target audience: beginners, intermediate, experts, executives, general |
|
||||||
| `--lang <code>` | Output language (en, zh, ja, etc.) |
|
| `--lang <code>` | Output language (en, zh, ja, etc.) |
|
||||||
| `--slides <number>` | Target slide count |
|
| `--slides <number>` | Target slide count (recommended: 8-25, max: 30) |
|
||||||
| `--outline-only` | Generate outline only, skip image generation |
|
| `--outline-only` | Generate outline only, skip image generation |
|
||||||
|
|
||||||
|
**Slide Count Guidance**:
|
||||||
|
| Content Length | Recommended Slides |
|
||||||
|
|----------------|-------------------|
|
||||||
|
| Short (< 1000 words) | 5-10 |
|
||||||
|
| Medium (1000-3000 words) | 10-18 |
|
||||||
|
| Long (3000-5000 words) | 15-25 |
|
||||||
|
| Very Long (> 5000 words) | 20-30 (consider splitting) |
|
||||||
|
|
||||||
|
Maximum 30 slides per deck. For longer content, split into multiple decks.
|
||||||
|
|
||||||
|
## Audience Guidelines
|
||||||
|
|
||||||
|
Design decisions should adapt to target audience. Use `--audience` to set.
|
||||||
|
|
||||||
|
| Audience | Content Density | Visual Style | Terminology | Slides |
|
||||||
|
|----------|-----------------|--------------|-------------|--------|
|
||||||
|
| `beginners` | Low | Friendly, illustrative | Plain language | 8-15 |
|
||||||
|
| `intermediate` | Medium | Balanced, structured | Some jargon OK | 10-20 |
|
||||||
|
| `experts` | High | Data-rich, precise | Technical terms | 12-25 |
|
||||||
|
| `executives` | Medium-High | Clean, impactful | Business language | 8-12 |
|
||||||
|
| `general` | Medium | Accessible, engaging | Minimal jargon | 10-18 |
|
||||||
|
|
||||||
|
### Audience-Specific Principles
|
||||||
|
|
||||||
|
**Beginners**:
|
||||||
|
- One concept per slide
|
||||||
|
- Visual metaphors over abstract diagrams
|
||||||
|
- Step-by-step progression
|
||||||
|
- Generous whitespace
|
||||||
|
|
||||||
|
**Experts**:
|
||||||
|
- Multiple data points per slide acceptable
|
||||||
|
- Technical diagrams with precise labels
|
||||||
|
- Assume domain knowledge
|
||||||
|
- Dense but organized information
|
||||||
|
|
||||||
|
**Executives**:
|
||||||
|
- Lead with insights, not data
|
||||||
|
- "So what?" on every slide
|
||||||
|
- Decision-enabling content
|
||||||
|
- Bottom-line upfront (BLUF)
|
||||||
|
|
||||||
## Style Gallery
|
## Style Gallery
|
||||||
|
|
||||||
|
### Style Selection Principles
|
||||||
|
|
||||||
|
**Content-First Approach**:
|
||||||
|
1. Analyze content topic, mood, and industry before selecting
|
||||||
|
2. Consider target audience expectations
|
||||||
|
3. Match style to subject matter (not personal preference)
|
||||||
|
|
||||||
|
**Quick Reference by Content Type**:
|
||||||
|
| Content Type | Recommended Styles |
|
||||||
|
|--------------|-------------------|
|
||||||
|
| Technical/Architecture | `blueprint`, `intuition-machine` |
|
||||||
|
| Educational/Tutorials | `sketch-notes`, `chalkboard` |
|
||||||
|
| Corporate/Business | `corporate`, `minimal` |
|
||||||
|
| Creative/Artistic | `vector-illustration`, `watercolor` |
|
||||||
|
| Product/SaaS | `notion`, `bold-editorial` |
|
||||||
|
| Scientific/Research | `scientific`, `editorial-infographic` |
|
||||||
|
|
||||||
|
**Note**: Full style specifications in `references/styles/<style>.md`
|
||||||
|
|
||||||
|
### Available Styles
|
||||||
|
|
||||||
| Style | Description | Best For |
|
| Style | Description | Best For |
|
||||||
|-------|-------------|----------|
|
|-------|-------------|----------|
|
||||||
| `blueprint` (Default) | Technical schematics, grid texture | Architecture, system design |
|
| `blueprint` (Default) | Technical schematics, grid texture | Architecture, system design |
|
||||||
@@ -127,6 +190,32 @@ Optional layout hints for individual slides. Specify in outline's `// LAYOUT` se
|
|||||||
|
|
||||||
**Usage**: Add `Layout: <name>` in slide's `// LAYOUT` section to guide visual composition.
|
**Usage**: Add `Layout: <name>` in slide's `// LAYOUT` section to guide visual composition.
|
||||||
|
|
||||||
|
### Layout Selection Tips
|
||||||
|
|
||||||
|
**Match Layout to Content**:
|
||||||
|
| Content Type | Recommended Layouts |
|
||||||
|
|--------------|-------------------|
|
||||||
|
| Single narrative | `bullet-list`, `image-caption` |
|
||||||
|
| Two concepts | `split-screen`, `binary-comparison` |
|
||||||
|
| Three items | `three-columns`, `icon-grid` |
|
||||||
|
| Process/Steps | `linear-progression`, `winding-roadmap` |
|
||||||
|
| Data/Metrics | `dashboard`, `key-stat` |
|
||||||
|
| Relationships | `hub-spoke`, `venn-diagram` |
|
||||||
|
| Hierarchy | `hierarchical-layers`, `tree-branching` |
|
||||||
|
|
||||||
|
**Layout Flow Patterns**:
|
||||||
|
| Position | Recommended Layouts |
|
||||||
|
|----------|-------------------|
|
||||||
|
| Opening | `title-hero`, `agenda` |
|
||||||
|
| Middle | Content-specific layouts |
|
||||||
|
| Closing | `quote-callout`, `key-stat` |
|
||||||
|
|
||||||
|
**Common Mistakes to Avoid**:
|
||||||
|
- ✗ Using 3-column layout for 2 items (leaves columns empty)
|
||||||
|
- ✗ Stacking charts/tables below text (use side-by-side instead)
|
||||||
|
- ✗ Image layouts without actual images
|
||||||
|
- ✗ Quote layouts for emphasis (use only for real quotes with attribution)
|
||||||
|
|
||||||
## Design Philosophy
|
## Design Philosophy
|
||||||
|
|
||||||
This deck is designed for **reading and sharing**, not live presentation:
|
This deck is designed for **reading and sharing**, not live presentation:
|
||||||
@@ -135,6 +224,142 @@ This deck is designed for **reading and sharing**, not live presentation:
|
|||||||
- Include **all necessary context** within each slide
|
- Include **all necessary context** within each slide
|
||||||
- Optimize for **social media sharing** and offline reading
|
- Optimize for **social media sharing** and offline reading
|
||||||
|
|
||||||
|
### Visual Hierarchy Principles
|
||||||
|
|
||||||
|
| Principle | Description |
|
||||||
|
|-----------|-------------|
|
||||||
|
| Focal Point | ONE dominant element per slide draws attention first |
|
||||||
|
| Rule of Thirds | Position key elements at grid intersections |
|
||||||
|
| Z-Pattern | Guide eye: top-left → top-right → bottom-left → bottom-right |
|
||||||
|
| Size Contrast | Headlines 2-3x larger than body text |
|
||||||
|
| Breathing Room | Minimum 10% margin from all edges |
|
||||||
|
|
||||||
|
### Content Density
|
||||||
|
|
||||||
|
Professional presentations balance information density with clarity.
|
||||||
|
|
||||||
|
| Level | Description | Use When |
|
||||||
|
|-------|-------------|----------|
|
||||||
|
| High | Multiple data points, detailed charts, dense text | Expert audience, technical reviews, data-driven decisions |
|
||||||
|
| Medium | Key points with supporting details, moderate visuals | General business, mixed audiences |
|
||||||
|
| Low | One main idea, large visuals, minimal text | Beginners, keynotes, emotional impact |
|
||||||
|
|
||||||
|
**High-Density Principles** (McKinsey-style):
|
||||||
|
- Every element earns its space
|
||||||
|
- Data speaks louder than decoration
|
||||||
|
- Annotations explain insights, not describe data
|
||||||
|
- White space is strategic, not filler
|
||||||
|
- Information hierarchy guides the eye
|
||||||
|
|
||||||
|
**Density by Slide Type**:
|
||||||
|
| Slide Type | Recommended Density |
|
||||||
|
|------------|-------------------|
|
||||||
|
| Cover/Title | Low |
|
||||||
|
| Agenda/Overview | Medium |
|
||||||
|
| Content/Analysis | Medium-High |
|
||||||
|
| Data/Metrics | High |
|
||||||
|
| Quote/Impact | Low |
|
||||||
|
| Summary/Takeaway | Medium |
|
||||||
|
|
||||||
|
### Color Selection
|
||||||
|
|
||||||
|
**Content-First Approach**:
|
||||||
|
1. Analyze content topic, mood, and industry
|
||||||
|
2. Consider target audience expectations
|
||||||
|
3. Match palette to subject matter (not defaults)
|
||||||
|
4. Ensure strong contrast for readability
|
||||||
|
|
||||||
|
**Quick Palette Guide**:
|
||||||
|
| Content Type | Recommended Palettes |
|
||||||
|
|--------------|---------------------|
|
||||||
|
| Technical/Architecture | Blues, grays, blueprint tones |
|
||||||
|
| Educational/Friendly | Warm colors, earth tones |
|
||||||
|
| Corporate/Professional | Navy, gold, structured palettes |
|
||||||
|
| Creative/Artistic | Bold colors, unexpected combinations |
|
||||||
|
| Scientific/Medical | Clean whites, precise color coding |
|
||||||
|
|
||||||
|
**Note**: Full color specs in `references/styles/<style>.md`
|
||||||
|
|
||||||
|
### Typography Principles
|
||||||
|
|
||||||
|
| Element | Treatment |
|
||||||
|
|---------|-----------|
|
||||||
|
| Headlines | Bold, 2-3x body size, narrative style |
|
||||||
|
| Body Text | Regular weight, readable size |
|
||||||
|
| Captions | Smaller, lighter weight |
|
||||||
|
| Data Labels | Monospace for technical content |
|
||||||
|
| Emphasis | Use bold or color, not underlines |
|
||||||
|
|
||||||
|
### Font Recommendations
|
||||||
|
|
||||||
|
Fonts for AI-generated slides. Specify in prompts for consistent rendering.
|
||||||
|
|
||||||
|
**English Fonts**:
|
||||||
|
| Font | Style | Best For |
|
||||||
|
|------|-------|----------|
|
||||||
|
| Liter | Sans-serif, geometric | Modern, clean, technical |
|
||||||
|
| HedvigLettersSans | Sans-serif, distinctive | Brand-forward, creative |
|
||||||
|
| Oranienbaum | High-contrast serif | Elegant, classical |
|
||||||
|
| SortsMillGoudy | Classical serif | Traditional, readable |
|
||||||
|
| Coda | Round sans-serif | Friendly, approachable |
|
||||||
|
|
||||||
|
**Chinese Fonts**:
|
||||||
|
| Font | Style | Best For |
|
||||||
|
|------|-------|----------|
|
||||||
|
| MiSans | Modern sans-serif | Clean, versatile, screen-optimized |
|
||||||
|
| Noto Sans SC | Neutral sans-serif | Standard, multilingual |
|
||||||
|
| siyuanSongti | Refined Song typeface | Elegant, editorial |
|
||||||
|
| alimamashuheiti | Geometric sans-serif | Commercial, structured |
|
||||||
|
| LXGW Bright | Song-Kai hybrid | Warm, readable |
|
||||||
|
|
||||||
|
**Multilingual Pairing**:
|
||||||
|
| Use Case | English | Chinese |
|
||||||
|
|----------|---------|---------|
|
||||||
|
| Technical | Liter | MiSans |
|
||||||
|
| Editorial | Oranienbaum | siyuanSongti |
|
||||||
|
| Friendly | Coda | LXGW Bright |
|
||||||
|
| Corporate | HedvigLettersSans | alimamashuheiti |
|
||||||
|
|
||||||
|
### Consistency Requirements
|
||||||
|
|
||||||
|
| Element | Guideline |
|
||||||
|
|---------|-----------|
|
||||||
|
| Spacing | Consistent margins and padding throughout |
|
||||||
|
| Colors | Maximum 3-4 colors per slide, palette consistent across deck |
|
||||||
|
| Typography | Same font families and sizes for same content types |
|
||||||
|
| Visual Language | Repeat patterns, shapes, and treatments |
|
||||||
|
|
||||||
|
## Visual Elements Reference
|
||||||
|
|
||||||
|
Quick reference for visual treatments. Full specs in style definitions.
|
||||||
|
|
||||||
|
### Background Treatments
|
||||||
|
|
||||||
|
| Treatment | Description | Best For |
|
||||||
|
|-----------|-------------|----------|
|
||||||
|
| Solid color | Single background color | Clean, minimal |
|
||||||
|
| Split background | Two colors, diagonal or vertical | Contrast, sections |
|
||||||
|
| Gradient | Subtle vertical or diagonal fade | Modern, dynamic |
|
||||||
|
| Textured | Pattern or texture overlay | Character, style |
|
||||||
|
|
||||||
|
### Typography Treatments
|
||||||
|
|
||||||
|
| Treatment | Description | Best For |
|
||||||
|
|-----------|-------------|----------|
|
||||||
|
| Size contrast | 3-4x difference headline vs body | Impact, hierarchy |
|
||||||
|
| All-caps headers | Uppercase with letter spacing | Authority, structure |
|
||||||
|
| Monospace data | Fixed-width for numbers/code | Technical, precision |
|
||||||
|
| Hand-drawn | Organic, imperfect letterforms | Friendly, approachable |
|
||||||
|
|
||||||
|
### Geometric Accents
|
||||||
|
|
||||||
|
| Element | Description | Best For |
|
||||||
|
|---------|-------------|----------|
|
||||||
|
| Diagonal dividers | Angled section separators | Energy, movement |
|
||||||
|
| Corner brackets | L-shaped frames | Focus, framing |
|
||||||
|
| Circles/hexagons | Shape frames for images | Modern, tech |
|
||||||
|
| Underline accents | Thick lines under headers | Emphasis, hierarchy |
|
||||||
|
|
||||||
## File Management
|
## File Management
|
||||||
|
|
||||||
### Output Directory
|
### Output Directory
|
||||||
|
|||||||
Reference in New Issue
Block a user