diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 6e0e641..3ed22a2 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,7 +6,7 @@ }, "metadata": { "description": "Skills shared by Baoyu for improving daily work efficiency", - "version": "1.7.0" + "version": "1.8.0" }, "plugins": [ { @@ -21,7 +21,8 @@ "./skills/baoyu-article-illustrator", "./skills/baoyu-cover-image", "./skills/baoyu-slide-deck", - "./skills/baoyu-comic" + "./skills/baoyu-comic", + "./skills/baoyu-infographic" ] }, { diff --git a/.gitignore b/.gitignore index 9fbeaae..776c304 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,4 @@ tests-data/ # Skill extensions (user customization) .baoyu-skills/ x-to-markdown/ +xhs-images/ diff --git a/CHANGELOG.md b/CHANGELOG.md index af0a312..db6693c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ English | [中文](./CHANGELOG.zh.md) +## 1.8.0 - 2026-01-20 + +### Features +- `baoyu-infographic`: new skill for professional infographic generation with 20 layout types (bridge, circular-flow, comparison-table, do-dont, equation, feature-list, fishbone, funnel, grid-cards, iceberg, journey-path, layers-stack, mind-map, nested-circles, priority-quadrants, pyramid, scale-balance, timeline-horizontal, tree-hierarchy, venn) and 17 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. + +### Fixes +- `baoyu-danger-gemini-web`: improves cookie validation by verifying actual Gemini session readiness instead of just checking cookie presence. + ## 1.7.0 - 2026-01-19 ### Features diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 94beb72..6b63063 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -2,6 +2,14 @@ [English](./CHANGELOG.md) | 中文 +## 1.8.0 - 2026-01-20 + +### 新功能 +- `baoyu-infographic`:新增专业信息图生成技能,支持 20 种布局类型(bridge 桥接、circular-flow 循环流程、comparison-table 对比表、do-dont 正误对比、equation 公式分解、feature-list 特性列表、fishbone 鱼骨图、funnel 漏斗、grid-cards 网格卡片、iceberg 冰山、journey-path 旅程路径、layers-stack 层级堆叠、mind-map 思维导图、nested-circles 嵌套圆、priority-quadrants 优先象限、pyramid 金字塔、scale-balance 天平、timeline-horizontal 时间线、tree-hierarchy 树状层级、venn 韦恩图)和 17 种视觉风格。智能分析内容、推荐布局×风格组合,生成发布级信息图。 + +### 修复 +- `baoyu-danger-gemini-web`:改进 cookie 验证逻辑,通过验证实际 Gemini 会话可用性而非仅检查 cookie 存在。 + ## 1.7.0 - 2026-01-19 ### 新功能 diff --git a/README.md b/README.md index 476fe2b..ee2bfd7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Simply tell Claude Code: | 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) | +| **content-skills** | Content generation and publishing | [xhs-images](#baoyu-xhs-images), [infographic](#baoyu-infographic), [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) | @@ -111,6 +111,118 @@ Xiaohongshu (RedNote) infographic series generator. Breaks down content into 1-1 | `comparison` | 2 sides | Before/after, pros/cons | | `flow` | 3-6 steps | Processes, timelines | +#### baoyu-infographic + +Generate professional infographics with 20 layout types and 17 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. + +```bash +# Auto-recommend combinations based on content +/baoyu-infographic path/to/content.md + +# Specify layout +/baoyu-infographic path/to/content.md --layout pyramid + +# Specify style (default: craft-handmade) +/baoyu-infographic path/to/content.md --style technical-schematic + +# Specify both +/baoyu-infographic path/to/content.md --layout funnel --style corporate-memphis + +# With aspect ratio +/baoyu-infographic path/to/content.md --aspect portrait +``` + +**Options**: +| Option | Description | +|--------|-------------| +| `--layout ` | Information layout (20 options) | +| `--style ` | Visual style (17 options, default: craft-handmade) | +| `--aspect ` | landscape (16:9), portrait (9:16), square (1:1) | +| `--lang ` | Output language (en, zh, ja, etc.) | + +**Layouts** (information structure): + +| Layout | Best For | +|--------|----------| +| `bridge` | Problem-solution, gap-crossing | +| `circular-flow` | Cycles, recurring processes | +| `comparison-table` | Multi-factor comparisons | +| `do-dont` | Correct vs incorrect practices | +| `equation` | Formula breakdown, input-output | +| `feature-list` | Product features, bullet points | +| `fishbone` | Root cause analysis | +| `funnel` | Conversion processes, filtering | +| `grid-cards` | Multiple topics, overview | +| `iceberg` | Surface vs hidden aspects | +| `journey-path` | Customer journey, milestones | +| `layers-stack` | Technology stack, layers | +| `mind-map` | Brainstorming, idea mapping | +| `nested-circles` | Levels of influence, scope | +| `priority-quadrants` | Eisenhower matrix, 2x2 | +| `pyramid` | Hierarchy, Maslow's needs | +| `scale-balance` | Pros vs cons, weighing | +| `timeline-horizontal` | History, chronological events | +| `tree-hierarchy` | Org charts, taxonomy | +| `venn` | Overlapping concepts | + +**Layout Previews**: + +| | | | +|:---:|:---:|:---:| +| ![bridge](./screenshots/infographic-layouts/bridge.webp) | ![circular-flow](./screenshots/infographic-layouts/circular-flow.webp) | ![comparison-table](./screenshots/infographic-layouts/comparison-table.webp) | +| bridge | circular-flow | comparison-table | +| ![do-dont](./screenshots/infographic-layouts/do-dont.webp) | ![equation](./screenshots/infographic-layouts/equation.webp) | ![feature-list](./screenshots/infographic-layouts/feature-list.webp) | +| do-dont | equation | feature-list | +| ![fishbone](./screenshots/infographic-layouts/fishbone.webp) | ![funnel](./screenshots/infographic-layouts/funnel.webp) | ![grid-cards](./screenshots/infographic-layouts/grid-cards.webp) | +| fishbone | funnel | grid-cards | +| ![iceberg](./screenshots/infographic-layouts/iceberg.webp) | ![journey-path](./screenshots/infographic-layouts/journey-path.webp) | ![layers-stack](./screenshots/infographic-layouts/layers-stack.webp) | +| iceberg | journey-path | layers-stack | +| ![mind-map](./screenshots/infographic-layouts/mind-map.webp) | ![nested-circles](./screenshots/infographic-layouts/nested-circles.webp) | ![priority-quadrants](./screenshots/infographic-layouts/priority-quadrants.webp) | +| mind-map | nested-circles | priority-quadrants | +| ![pyramid](./screenshots/infographic-layouts/pyramid.webp) | ![scale-balance](./screenshots/infographic-layouts/scale-balance.webp) | ![timeline-horizontal](./screenshots/infographic-layouts/timeline-horizontal.webp) | +| pyramid | scale-balance | timeline-horizontal | +| ![tree-hierarchy](./screenshots/infographic-layouts/tree-hierarchy.webp) | ![venn](./screenshots/infographic-layouts/venn.webp) | | +| tree-hierarchy | venn | | + +**Styles** (visual aesthetics): + +| Style | Description | +|-------|-------------| +| `craft-handmade` (Default) | Hand-drawn illustration, paper craft aesthetic | +| `claymation` | 3D clay figures, playful stop-motion | +| `kawaii` | Japanese cute, big eyes, pastel colors | +| `storybook-watercolor` | Soft painted illustrations, whimsical | +| `chalkboard` | Colorful chalk on black board | +| `cyberpunk-neon` | Neon glow on dark, futuristic | +| `bold-graphic` | Comic style, halftone dots, high contrast | +| `aged-academia` | Vintage science, sepia sketches | +| `corporate-memphis` | Flat vector people, vibrant fills | +| `technical-schematic` | Blueprint, isometric 3D, engineering | +| `origami` | Folded paper forms, geometric | +| `pixel-art` | Retro 8-bit, nostalgic gaming | +| `ui-wireframe` | Grayscale boxes, interface mockup | +| `subway-map` | Transit diagram, colored lines | +| `ikea-manual` | Minimal line art, assembly style | +| `knolling` | Organized flat-lay, top-down | +| `lego-brick` | Toy brick construction, playful | + +**Style Previews**: + +| | | | +|:---:|:---:|:---:| +| ![craft-handmade](./screenshots/infographic-styles/craft-handmade.webp) | ![claymation](./screenshots/infographic-styles/claymation.webp) | ![kawaii](./screenshots/infographic-styles/kawaii.webp) | +| craft-handmade | claymation | kawaii | +| ![storybook-watercolor](./screenshots/infographic-styles/storybook-watercolor.webp) | ![chalkboard](./screenshots/infographic-styles/chalkboard.webp) | ![cyberpunk-neon](./screenshots/infographic-styles/cyberpunk-neon.webp) | +| storybook-watercolor | chalkboard | cyberpunk-neon | +| ![bold-graphic](./screenshots/infographic-styles/bold-graphic.webp) | ![aged-academia](./screenshots/infographic-styles/aged-academia.webp) | ![corporate-memphis](./screenshots/infographic-styles/corporate-memphis.webp) | +| bold-graphic | aged-academia | corporate-memphis | +| ![technical-schematic](./screenshots/infographic-styles/technical-schematic.webp) | ![origami](./screenshots/infographic-styles/origami.webp) | ![pixel-art](./screenshots/infographic-styles/pixel-art.webp) | +| technical-schematic | origami | pixel-art | +| ![ui-wireframe](./screenshots/infographic-styles/ui-wireframe.webp) | ![subway-map](./screenshots/infographic-styles/subway-map.webp) | ![ikea-manual](./screenshots/infographic-styles/ikea-manual.webp) | +| ui-wireframe | subway-map | ikea-manual | +| ![knolling](./screenshots/infographic-styles/knolling.webp) | ![lego-brick](./screenshots/infographic-styles/lego-brick.webp) | | +| knolling | lego-brick | | + #### baoyu-cover-image Generate hand-drawn style cover images for articles with multiple style options. diff --git a/README.zh.md b/README.zh.md index 2714ea8..cd1cf80 100644 --- a/README.zh.md +++ b/README.zh.md @@ -53,7 +53,7 @@ npx add-skill jimliu/baoyu-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) | +| **content-skills** | 内容生成和发布 | [xhs-images](#baoyu-xhs-images), [infographic](#baoyu-infographic), [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) | @@ -111,6 +111,118 @@ npx add-skill jimliu/baoyu-skills | `comparison` | 双栏 | 对比、优劣 | | `flow` | 3-6 步 | 流程、时间线 | +#### baoyu-infographic + +专业信息图生成器,支持 20 种布局和 17 种视觉风格。分析内容后推荐布局×风格组合,生成可发布的信息图。 + +```bash +# 根据内容自动推荐组合 +/baoyu-infographic path/to/content.md + +# 指定布局 +/baoyu-infographic path/to/content.md --layout pyramid + +# 指定风格(默认:craft-handmade) +/baoyu-infographic path/to/content.md --style technical-schematic + +# 同时指定布局和风格 +/baoyu-infographic path/to/content.md --layout funnel --style corporate-memphis + +# 指定比例 +/baoyu-infographic path/to/content.md --aspect portrait +``` + +**选项**: +| 选项 | 说明 | +|------|------| +| `--layout ` | 信息布局(20 种选项) | +| `--style ` | 视觉风格(17 种选项,默认:craft-handmade) | +| `--aspect ` | landscape (16:9)、portrait (9:16)、square (1:1) | +| `--lang ` | 输出语言(en、zh、ja 等) | + +**布局**(信息结构): + +| 布局 | 适用场景 | +|------|----------| +| `bridge` | 问题→解决方案、跨越鸿沟 | +| `circular-flow` | 循环、周期性流程 | +| `comparison-table` | 多因素对比 | +| `do-dont` | 正确 vs 错误做法 | +| `equation` | 公式分解、输入→输出 | +| `feature-list` | 产品功能、要点列表 | +| `fishbone` | 根因分析、鱼骨图 | +| `funnel` | 转化漏斗、筛选过程 | +| `grid-cards` | 多主题概览、卡片网格 | +| `iceberg` | 表面 vs 隐藏层面 | +| `journey-path` | 用户旅程、里程碑 | +| `layers-stack` | 技术栈、分层结构 | +| `mind-map` | 头脑风暴、思维导图 | +| `nested-circles` | 影响层级、范围圈 | +| `priority-quadrants` | 四象限矩阵、优先级 | +| `pyramid` | 层级金字塔、马斯洛需求 | +| `scale-balance` | 利弊权衡、天平对比 | +| `timeline-horizontal` | 历史、时间线事件 | +| `tree-hierarchy` | 组织架构、分类树 | +| `venn` | 重叠概念、韦恩图 | + +**布局预览**: + +| | | | +|:---:|:---:|:---:| +| ![bridge](./screenshots/infographic-layouts/bridge.webp) | ![circular-flow](./screenshots/infographic-layouts/circular-flow.webp) | ![comparison-table](./screenshots/infographic-layouts/comparison-table.webp) | +| bridge | circular-flow | comparison-table | +| ![do-dont](./screenshots/infographic-layouts/do-dont.webp) | ![equation](./screenshots/infographic-layouts/equation.webp) | ![feature-list](./screenshots/infographic-layouts/feature-list.webp) | +| do-dont | equation | feature-list | +| ![fishbone](./screenshots/infographic-layouts/fishbone.webp) | ![funnel](./screenshots/infographic-layouts/funnel.webp) | ![grid-cards](./screenshots/infographic-layouts/grid-cards.webp) | +| fishbone | funnel | grid-cards | +| ![iceberg](./screenshots/infographic-layouts/iceberg.webp) | ![journey-path](./screenshots/infographic-layouts/journey-path.webp) | ![layers-stack](./screenshots/infographic-layouts/layers-stack.webp) | +| iceberg | journey-path | layers-stack | +| ![mind-map](./screenshots/infographic-layouts/mind-map.webp) | ![nested-circles](./screenshots/infographic-layouts/nested-circles.webp) | ![priority-quadrants](./screenshots/infographic-layouts/priority-quadrants.webp) | +| mind-map | nested-circles | priority-quadrants | +| ![pyramid](./screenshots/infographic-layouts/pyramid.webp) | ![scale-balance](./screenshots/infographic-layouts/scale-balance.webp) | ![timeline-horizontal](./screenshots/infographic-layouts/timeline-horizontal.webp) | +| pyramid | scale-balance | timeline-horizontal | +| ![tree-hierarchy](./screenshots/infographic-layouts/tree-hierarchy.webp) | ![venn](./screenshots/infographic-layouts/venn.webp) | | +| tree-hierarchy | venn | | + +**风格**(视觉美学): + +| 风格 | 描述 | +|------|------| +| `craft-handmade`(默认) | 手绘插画、纸艺风格 | +| `claymation` | 3D 黏土人物、定格动画感 | +| `kawaii` | 日系可爱、大眼睛、粉彩色 | +| `storybook-watercolor` | 柔和水彩、童话绘本 | +| `chalkboard` | 彩色粉笔、黑板风格 | +| `cyberpunk-neon` | 霓虹灯光、暗色未来感 | +| `bold-graphic` | 漫画风格、网点、高对比 | +| `aged-academia` | 复古科学、泛黄素描 | +| `corporate-memphis` | 扁平矢量人物、鲜艳填充 | +| `technical-schematic` | 蓝图、等距 3D、工程图 | +| `origami` | 折纸形态、几何感 | +| `pixel-art` | 复古 8-bit、怀旧游戏 | +| `ui-wireframe` | 灰度框图、界面原型 | +| `subway-map` | 地铁图、彩色线路 | +| `ikea-manual` | 极简线条、组装说明风 | +| `knolling` | 整齐平铺、俯视图 | +| `lego-brick` | 乐高积木、童趣拼搭 | + +**风格预览**: + +| | | | +|:---:|:---:|:---:| +| ![craft-handmade](./screenshots/infographic-styles/craft-handmade.webp) | ![claymation](./screenshots/infographic-styles/claymation.webp) | ![kawaii](./screenshots/infographic-styles/kawaii.webp) | +| craft-handmade | claymation | kawaii | +| ![storybook-watercolor](./screenshots/infographic-styles/storybook-watercolor.webp) | ![chalkboard](./screenshots/infographic-styles/chalkboard.webp) | ![cyberpunk-neon](./screenshots/infographic-styles/cyberpunk-neon.webp) | +| storybook-watercolor | chalkboard | cyberpunk-neon | +| ![bold-graphic](./screenshots/infographic-styles/bold-graphic.webp) | ![aged-academia](./screenshots/infographic-styles/aged-academia.webp) | ![corporate-memphis](./screenshots/infographic-styles/corporate-memphis.webp) | +| bold-graphic | aged-academia | corporate-memphis | +| ![technical-schematic](./screenshots/infographic-styles/technical-schematic.webp) | ![origami](./screenshots/infographic-styles/origami.webp) | ![pixel-art](./screenshots/infographic-styles/pixel-art.webp) | +| technical-schematic | origami | pixel-art | +| ![ui-wireframe](./screenshots/infographic-styles/ui-wireframe.webp) | ![subway-map](./screenshots/infographic-styles/subway-map.webp) | ![ikea-manual](./screenshots/infographic-styles/ikea-manual.webp) | +| ui-wireframe | subway-map | ikea-manual | +| ![knolling](./screenshots/infographic-styles/knolling.webp) | ![lego-brick](./screenshots/infographic-styles/lego-brick.webp) | | +| knolling | lego-brick | | + #### baoyu-cover-image 为文章生成手绘风格封面图,支持多种风格选项。 diff --git a/screenshots/infographic-layouts/bridge.webp b/screenshots/infographic-layouts/bridge.webp new file mode 100644 index 0000000..fe736b0 Binary files /dev/null and b/screenshots/infographic-layouts/bridge.webp differ diff --git a/screenshots/infographic-layouts/circular-flow.webp b/screenshots/infographic-layouts/circular-flow.webp new file mode 100644 index 0000000..70e8932 Binary files /dev/null and b/screenshots/infographic-layouts/circular-flow.webp differ diff --git a/screenshots/infographic-layouts/comparison-table.webp b/screenshots/infographic-layouts/comparison-table.webp new file mode 100644 index 0000000..68b6f77 Binary files /dev/null and b/screenshots/infographic-layouts/comparison-table.webp differ diff --git a/screenshots/infographic-layouts/do-dont.webp b/screenshots/infographic-layouts/do-dont.webp new file mode 100644 index 0000000..efe96ad Binary files /dev/null and b/screenshots/infographic-layouts/do-dont.webp differ diff --git a/screenshots/infographic-layouts/equation.webp b/screenshots/infographic-layouts/equation.webp new file mode 100644 index 0000000..3e415ea Binary files /dev/null and b/screenshots/infographic-layouts/equation.webp differ diff --git a/screenshots/infographic-layouts/feature-list.webp b/screenshots/infographic-layouts/feature-list.webp new file mode 100644 index 0000000..9487127 Binary files /dev/null and b/screenshots/infographic-layouts/feature-list.webp differ diff --git a/screenshots/infographic-layouts/fishbone.webp b/screenshots/infographic-layouts/fishbone.webp new file mode 100644 index 0000000..0c1a80f Binary files /dev/null and b/screenshots/infographic-layouts/fishbone.webp differ diff --git a/screenshots/infographic-layouts/funnel.webp b/screenshots/infographic-layouts/funnel.webp new file mode 100644 index 0000000..495067a Binary files /dev/null and b/screenshots/infographic-layouts/funnel.webp differ diff --git a/screenshots/infographic-layouts/grid-cards.webp b/screenshots/infographic-layouts/grid-cards.webp new file mode 100644 index 0000000..da22c5a Binary files /dev/null and b/screenshots/infographic-layouts/grid-cards.webp differ diff --git a/screenshots/infographic-layouts/iceberg.webp b/screenshots/infographic-layouts/iceberg.webp new file mode 100644 index 0000000..d755e15 Binary files /dev/null and b/screenshots/infographic-layouts/iceberg.webp differ diff --git a/screenshots/infographic-layouts/journey-path.webp b/screenshots/infographic-layouts/journey-path.webp new file mode 100644 index 0000000..c2b4e4d Binary files /dev/null and b/screenshots/infographic-layouts/journey-path.webp differ diff --git a/screenshots/infographic-layouts/layers-stack.webp b/screenshots/infographic-layouts/layers-stack.webp new file mode 100644 index 0000000..7ef1d22 Binary files /dev/null and b/screenshots/infographic-layouts/layers-stack.webp differ diff --git a/screenshots/infographic-layouts/mind-map.webp b/screenshots/infographic-layouts/mind-map.webp new file mode 100644 index 0000000..3e3559d Binary files /dev/null and b/screenshots/infographic-layouts/mind-map.webp differ diff --git a/screenshots/infographic-layouts/nested-circles.webp b/screenshots/infographic-layouts/nested-circles.webp new file mode 100644 index 0000000..15c166c Binary files /dev/null and b/screenshots/infographic-layouts/nested-circles.webp differ diff --git a/screenshots/infographic-layouts/priority-quadrants.webp b/screenshots/infographic-layouts/priority-quadrants.webp new file mode 100644 index 0000000..a661998 Binary files /dev/null and b/screenshots/infographic-layouts/priority-quadrants.webp differ diff --git a/screenshots/infographic-layouts/pyramid.webp b/screenshots/infographic-layouts/pyramid.webp new file mode 100644 index 0000000..a8ff493 Binary files /dev/null and b/screenshots/infographic-layouts/pyramid.webp differ diff --git a/screenshots/infographic-layouts/scale-balance.webp b/screenshots/infographic-layouts/scale-balance.webp new file mode 100644 index 0000000..8143a20 Binary files /dev/null and b/screenshots/infographic-layouts/scale-balance.webp differ diff --git a/screenshots/infographic-layouts/timeline-horizontal.webp b/screenshots/infographic-layouts/timeline-horizontal.webp new file mode 100644 index 0000000..64683f1 Binary files /dev/null and b/screenshots/infographic-layouts/timeline-horizontal.webp differ diff --git a/screenshots/infographic-layouts/tree-hierarchy.webp b/screenshots/infographic-layouts/tree-hierarchy.webp new file mode 100644 index 0000000..b068172 Binary files /dev/null and b/screenshots/infographic-layouts/tree-hierarchy.webp differ diff --git a/screenshots/infographic-layouts/venn.webp b/screenshots/infographic-layouts/venn.webp new file mode 100644 index 0000000..d0a08b9 Binary files /dev/null and b/screenshots/infographic-layouts/venn.webp differ diff --git a/screenshots/infographic-styles/aged-academia.webp b/screenshots/infographic-styles/aged-academia.webp new file mode 100644 index 0000000..a2bd37f Binary files /dev/null and b/screenshots/infographic-styles/aged-academia.webp differ diff --git a/screenshots/infographic-styles/bold-graphic.webp b/screenshots/infographic-styles/bold-graphic.webp new file mode 100644 index 0000000..4462277 Binary files /dev/null and b/screenshots/infographic-styles/bold-graphic.webp differ diff --git a/screenshots/infographic-styles/chalkboard.webp b/screenshots/infographic-styles/chalkboard.webp new file mode 100644 index 0000000..2237f55 Binary files /dev/null and b/screenshots/infographic-styles/chalkboard.webp differ diff --git a/screenshots/infographic-styles/claymation.webp b/screenshots/infographic-styles/claymation.webp new file mode 100644 index 0000000..ea8d95d Binary files /dev/null and b/screenshots/infographic-styles/claymation.webp differ diff --git a/screenshots/infographic-styles/corporate-memphis.webp b/screenshots/infographic-styles/corporate-memphis.webp new file mode 100644 index 0000000..a955982 Binary files /dev/null and b/screenshots/infographic-styles/corporate-memphis.webp differ diff --git a/screenshots/infographic-styles/craft-handmade.webp b/screenshots/infographic-styles/craft-handmade.webp new file mode 100644 index 0000000..102def1 Binary files /dev/null and b/screenshots/infographic-styles/craft-handmade.webp differ diff --git a/screenshots/infographic-styles/cyberpunk-neon.webp b/screenshots/infographic-styles/cyberpunk-neon.webp new file mode 100644 index 0000000..16225f0 Binary files /dev/null and b/screenshots/infographic-styles/cyberpunk-neon.webp differ diff --git a/screenshots/infographic-styles/ikea-manual.webp b/screenshots/infographic-styles/ikea-manual.webp new file mode 100644 index 0000000..475f572 Binary files /dev/null and b/screenshots/infographic-styles/ikea-manual.webp differ diff --git a/screenshots/infographic-styles/kawaii.webp b/screenshots/infographic-styles/kawaii.webp new file mode 100644 index 0000000..c973840 Binary files /dev/null and b/screenshots/infographic-styles/kawaii.webp differ diff --git a/screenshots/infographic-styles/knolling.webp b/screenshots/infographic-styles/knolling.webp new file mode 100644 index 0000000..7af79ff Binary files /dev/null and b/screenshots/infographic-styles/knolling.webp differ diff --git a/screenshots/infographic-styles/lego-brick.webp b/screenshots/infographic-styles/lego-brick.webp new file mode 100644 index 0000000..1e47146 Binary files /dev/null and b/screenshots/infographic-styles/lego-brick.webp differ diff --git a/screenshots/infographic-styles/origami.webp b/screenshots/infographic-styles/origami.webp new file mode 100644 index 0000000..94b5640 Binary files /dev/null and b/screenshots/infographic-styles/origami.webp differ diff --git a/screenshots/infographic-styles/pixel-art.webp b/screenshots/infographic-styles/pixel-art.webp new file mode 100644 index 0000000..640d6fa Binary files /dev/null and b/screenshots/infographic-styles/pixel-art.webp differ diff --git a/screenshots/infographic-styles/storybook-watercolor.webp b/screenshots/infographic-styles/storybook-watercolor.webp new file mode 100644 index 0000000..571f714 Binary files /dev/null and b/screenshots/infographic-styles/storybook-watercolor.webp differ diff --git a/screenshots/infographic-styles/subway-map.webp b/screenshots/infographic-styles/subway-map.webp new file mode 100644 index 0000000..e3aa9d2 Binary files /dev/null and b/screenshots/infographic-styles/subway-map.webp differ diff --git a/screenshots/infographic-styles/technical-schematic.webp b/screenshots/infographic-styles/technical-schematic.webp new file mode 100644 index 0000000..48f5294 Binary files /dev/null and b/screenshots/infographic-styles/technical-schematic.webp differ diff --git a/screenshots/infographic-styles/ui-wireframe.webp b/screenshots/infographic-styles/ui-wireframe.webp new file mode 100644 index 0000000..5c892cf Binary files /dev/null and b/screenshots/infographic-styles/ui-wireframe.webp differ diff --git a/skills/baoyu-danger-gemini-web/scripts/gemini-webapi/utils/load-browser-cookies.ts b/skills/baoyu-danger-gemini-web/scripts/gemini-webapi/utils/load-browser-cookies.ts index b4216d9..e587bd6 100644 --- a/skills/baoyu-danger-gemini-web/scripts/gemini-webapi/utils/load-browser-cookies.ts +++ b/skills/baoyu-danger-gemini-web/scripts/gemini-webapi/utils/load-browser-cookies.ts @@ -4,8 +4,9 @@ import { mkdir } from 'node:fs/promises'; import net from 'node:net'; import process from 'node:process'; +import { Endpoint, Headers } from '../constants.js'; import { logger } from './logger.js'; -import { fetch_with_timeout, sleep } from './http.js'; +import { cookie_header, fetch_with_timeout, sleep } from './http.js'; import { read_cookie_file, type CookieMap, write_cookie_file } from './cookie-file.js'; import { resolveGeminiWebChromeProfileDir, resolveGeminiWebCookiePath } from './paths.js'; @@ -177,6 +178,30 @@ async function launch_chrome(profileDir: string, port: number): Promise { + if (!cookies['__Secure-1PSID']) return false; + + try { + const res = await fetch_with_timeout(Endpoint.INIT, { + method: 'GET', + headers: { ...Headers.GEMINI, Cookie: cookie_header(cookies) }, + redirect: 'follow', + timeout_ms: 30_000, + }); + + if (!res.ok) { + if (verbose) logger.debug(`Gemini init check failed: ${res.status} ${res.statusText}`); + return false; + } + + const text = await res.text(); + return /\"SNlM0e\":\"(.*?)\"/.test(text); + } catch (e) { + if (verbose) logger.debug(`Gemini init check error: ${e instanceof Error ? e.message : String(e)}`); + return false; + } +} + async function fetch_google_cookies_via_cdp( profileDir: string, timeoutMs: number, @@ -200,7 +225,7 @@ async function fetch_google_cookies_via_cdp( await cdp.send('Network.enable', {}, { sessionId }); if (verbose) { - logger.info('Chrome opened. If needed, complete Google login in the window. Waiting for cookies...'); + logger.info('Chrome opened. If needed, complete Google login in the window. Waiting for a valid Gemini session...'); } const start = Date.now(); @@ -219,14 +244,14 @@ async function fetch_google_cookies_via_cdp( } last = m; - if (m['__Secure-1PSID'] && (m['__Secure-1PSIDTS'] || Date.now() - start > 10_000)) { + if (await is_gemini_session_ready(m, verbose)) { return m; } await sleep(1000); } - throw new Error(`Timed out waiting for Google cookies. Last keys: ${Object.keys(last).join(', ')}`); + throw new Error(`Timed out waiting for a valid Gemini session. Last keys: ${Object.keys(last).join(', ')}`); } finally { if (cdp) { try { diff --git a/skills/baoyu-infographic/SKILL.md b/skills/baoyu-infographic/SKILL.md new file mode 100644 index 0000000..438665e --- /dev/null +++ b/skills/baoyu-infographic/SKILL.md @@ -0,0 +1,491 @@ +--- +name: baoyu-infographic +description: Generate professional infographics with 20 layout types and 17 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", or "visual summary". +--- + +# Infographic Generator + +Generate professional infographics with two dimensions: layout (information structure) and style (visual aesthetics). + +## Usage + +```bash +# Auto-recommend combinations based on content +/baoyu-infographic path/to/content.md + +# Specify layout +/baoyu-infographic path/to/content.md --layout hierarchical-layers + +# Specify style (default: craft-handmade) +/baoyu-infographic path/to/content.md --style technical-schematic + +# Specify both +/baoyu-infographic path/to/content.md --layout funnel --style corporate-memphis + +# With aspect ratio +/baoyu-infographic path/to/content.md --aspect portrait + +# Direct content input +/baoyu-infographic +[paste content] + +# Direct input with options +/baoyu-infographic --layout linear-progression --style aged-academia +[paste content] +``` + +## Options + +| Option | Description | +|--------|-------------| +| `--layout ` | Information layout (20 options, see Layout Gallery) | +| `--style ` | Visual style (17 options, default: craft-handmade) | +| `--aspect ` | landscape (16:9), portrait (9:16), square (1:1) | +| `--lang ` | Output language (en, zh, ja, etc.) | + +## Two Dimensions + +| Dimension | Controls | Count | +|-----------|----------|-------| +| **Layout** | Information structure: hierarchy, flow, relationships | 20 types | +| **Style** | Visual aesthetics: colors, textures, artistic treatment | 17 types | + +Layout × Style can be freely combined. Example: `--layout hierarchical-layers --style craft-handmade` creates a hierarchy with playful hand-drawn aesthetics. + +## Layout Gallery + +| Layout | Best For | +|--------|----------| +| `linear-progression` | Timelines, step-by-step processes, tutorials | +| `binary-comparison` | A vs B, before-after, pros-cons | +| `comparison-matrix` | Multi-factor comparisons | +| `hierarchical-layers` | Pyramids, concentric circles, priority levels | +| `tree-branching` | Categories, taxonomies | +| `hub-spoke` | Central concept with related items | +| `structural-breakdown` | Exploded views, cross-sections, part labeling | +| `bento-grid` | Multiple topics, overview (default) | +| `iceberg` | Surface vs hidden aspects | +| `bridge` | Problem-solution, gap-crossing | +| `funnel` | Conversion processes, filtering | +| `isometric-map` | Spatial relationships, locations | +| `dashboard` | Metrics, KPIs, data display | +| `periodic-table` | Categorized collections | +| `comic-strip` | Narratives, sequences | +| `story-mountain` | Plot structure, tension arcs | +| `jigsaw` | Interconnected parts | +| `venn-diagram` | Overlapping concepts | +| `winding-roadmap` | Journey, milestones | +| `circular-flow` | Cycles, recurring processes | + +Detailed layout definitions: `references/layouts/.md` + +## Style Gallery + +| Style | Description | +|-------|-------------| +| `craft-handmade` (Default) | Hand-drawn illustration, paper craft aesthetic | +| `claymation` | 3D clay figures, playful stop-motion | +| `kawaii` | Japanese cute, big eyes, pastel colors | +| `storybook-watercolor` | Soft painted illustrations, whimsical | +| `chalkboard` | Colorful chalk on black board | +| `cyberpunk-neon` | Neon glow on dark, futuristic | +| `bold-graphic` | Comic style, halftone dots, high contrast | +| `aged-academia` | Vintage science, sepia sketches | +| `corporate-memphis` | Flat vector people, vibrant fills | +| `technical-schematic` | Blueprint, isometric 3D, engineering | +| `origami` | Folded paper forms, geometric | +| `pixel-art` | Retro 8-bit, nostalgic gaming | +| `ui-wireframe` | Grayscale boxes, interface mockup | +| `subway-map` | Transit diagram, colored lines | +| `ikea-manual` | Minimal line art, assembly style | +| `knolling` | Organized flat-lay, top-down | +| `lego-brick` | Toy brick construction, playful | + +Detailed style definitions: `references/styles/