- Add reference image handling with direct/style/palette usage types
- Enhance first-time setup as blocking operation
- Update prompt construction with reference frontmatter format
- Add --ref parameter for reference images (style/palette/direct usage)
- Add visual-elements.md with icon vocabulary by topic
- Enhance first-time setup as blocking operation
- Remove character limits from titles, use original source titles
- Update prompt template with reference handling
- Add wechat-api.ts for direct API-based article publishing
- Support plain text, HTML, and markdown inputs with auto-conversion
- Add external theme discovery from MD_THEME_DIR environment variable
- Improve CSS inlining with juice library integration
- Support WeChat API credentials via .baoyu-skills/.env
Previously, the script always launched a new Chrome instance, which failed
when Chrome was already running due to profile lock conflicts on macOS.
Users had to close all Chrome windows before publishing.
This change adds auto-detection of existing Chrome debug ports and reuses
an already-logged-in WeChat tab when available, falling back to launching
a new instance only when no existing Chrome is found.
Changes:
- cdp.ts: add tryConnectExisting() and findExistingChromeDebugPort()
- wechat-article.ts: try existing Chrome before launching new one,
reuse logged-in WeChat tab (identified by token= in URL),
add waitForElement() for reliable menu detection,
add --cdp-port option for manual override,
fix process not exiting after completion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Problem
The baoyu-post-to-wechat skill failed on Windows due to:
1. `new URL(import.meta.url).pathname` returns incorrect path format on Windows
2. Copy/paste operations used `xdotool` (Linux tool) which doesn't exist on Windows
## Solution
1. **md-to-wechat.ts**: Use `fileURLToPath()` to correctly resolve file paths on Windows
2. **wechat-article.ts**: Use CDP `Input.dispatchKeyEvent` for copy/paste operations
- Replaces system-dependent tools (xdotool/osascript)
- Works consistently across Windows/macOS/Linux
- More reliable as it operates within Chrome session
## Changes
- Import `fileURLToPath` from 'node:url'
- Replace `new URL(import.meta.url).pathname` with `fileURLToPath(import.meta.url)`
- Replace system tool calls with CDP keyboard events for Ctrl+C and Ctrl+V
- Add platform-specific modifier handling (Cmd for macOS, Ctrl for Windows/Linux)
## Testing
- Tested successfully on Windows 11
- Markdown conversion works correctly
- HTML copy/paste to WeChat editor works correctly
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Type text while video uploads in background instead of waiting
- Fix video ready detection by checking tweet button state instead of
progressbar presence (X always has progressbar elements for video
playback, causing false negatives)
The previous document.execCommand('insertText') caused text to be
duplicated multiple times. Switch to CDP's Input.insertText for
more reliable text input.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add x-quote.ts script to quote existing tweets with comments.
This allows users to share content while giving credit to the original creator.
- New script: scripts/x-quote.ts for quote tweet functionality
- Uses CDP to navigate through X's native quote UI
- Supports preview mode and --submit flag
- Updated SKILL.md with documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add chalkboard style to baoyu-xhs-images and baoyu-comic
- Update chalkboard style for article-illustrator, cover-image, infographic
- Remove tech style from baoyu-xhs-images
- Add style and layout preview screenshots for xhs-images
- Bump version to 1.9.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add x-video.ts script for posting videos to X
- Video is uploaded first, then text is added (fixes text being cleared issue)
- Uses DOM.setFileInputFiles for direct video upload via CDP
- Supports MP4, MOV, WebM formats
- Waits for video processing before allowing submission
- Update SKILL.md with video posting documentation
Add classic shoujo manga style featuring:
- Large sparkling eyes with detailed highlights
- Flowers, sparkles, and soft decorative elements
- Soft pink/lavender color palette
- Best for romance, coming-of-age, friendship, emotional drama
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new flat-doodle style featuring:
- Bold black outlines
- Bright pastel colors (pink, mint, lavender, yellow)
- Simple flat shapes with cute rounded proportions
- White background
- Best for productivity, SaaS, workflow content
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add supported browsers list (Chrome, Chromium, Edge)
- Add proxy configuration section with examples
- Update both English and Chinese READMEs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract hardcoded UI selectors into I18N_SELECTORS constant.
Now supports English, Chinese, Japanese, and Korean X interfaces.
Selectors added:
- titleInput: Add a title / 添加标题 / タイトルを追加 / 제목 추가
- addPhotosButton: Add photos or video / 添加照片或视频 / 写真や動画を追加 / 사진 또는 동영상 추가
- previewButton: preview / 预览 / プレビュー / 미리보기
- publishButton: publish / 发布 / 公開 / 게시
To add more languages, simply append to the I18N_SELECTORS arrays.
- Implemented `paste-from-clipboard.ts` script to send real paste keystrokes across macOS, Linux, and Windows.
- Created detailed guides for publishing articles to X Articles and posting regular content, including usage examples and troubleshooting tips.
- Added support for Markdown formatting and image handling in X Articles.
- Documented manual workflows for image pasting and browser interactions using Playwright MCP.
- Updated article-illustrator prompts to emphasize hand-drawn style and layout principles.
- Enhanced xhs-images skill with multiple style options and auto-selection based on content signals.
- Created README in Chinese for better accessibility.
- Introduced cover-image skill for generating hand-drawn style cover images with various styles.
- Developed slide-deck skill to generate professional slide outlines with detailed structure and style instructions.
- Added prompts for cover-image and slide-deck skills to guide content generation.