← MCP server and skill grades

skills

JimLiu/baoyu-skills/skills

D
Type
Skill
Scanned
Nov 13, 2026
Version
ca703c2d7c2c
Files read
476

This project is a collection of AI agent skills and scripts for generating illustrations, comics, infographics, diagrams, and slide decks, converting web pages, tweets, and YouTube videos to Markdown, summarizing WeChat chats, and publishing posts to WeChat, Weibo, and X. Its biggest risks are that the Gemini Web client can leak your Google account cookies to third-party image servers, the Codex image wrapper runs an unsandboxed AI shell agent over untrusted article text, and browser-based social publishing injects unsanitized content into your logged-in sessions.

What it can reach

Files
Reads and writes Markdown, HTML, images, PDFs, PowerPoint decks, configuration files, and chat digests across project folders, user app-data directories, Downloads, installed Electron .asar bundles, and local WeChat data via wx-cli.
Network
Connects to multiple AI image APIs, X/Twitter, Google Gemini Web, YouTube, Hacker News, WeChat Official Account APIs (directly or via SSH SOCKS5 tunnels), defuddle.md, Telegram Bot API, and arbitrary web and media URLs.
Shell commands
Executes local CLI programs and subprocesses including bun, npx, codex exec, ssh, curl, yt-dlp, uvx, wx, sips, cwebp, ImageMagick, osascript, swift, powershell.exe, xdotool, and ydotool.
Secrets
Reads API keys and tokens from environment variables and .baoyu-skills/.env files, SSH private keys for remote WeChat publishing, and Google, X/Twitter, WeChat, and Weibo authentication cookies.
Browser
Launches or attaches to Chrome, Chromium, or Edge via Chrome DevTools Protocol (CDP), reads and writes session cookies, controls tabs, uploads local files, and edits pages in logged-in accounts.
System
Writes images and rich HTML to the system clipboard and sends OS-level paste and app-activation keystrokes via macOS System Events, Windows SendKeys, or Linux xdotool/ydotool.

Findings

4 high3 medium1 low
  1. HighGoogle account session cookies sent to third-party image servers

    skills/baoyu-danger-gemini-web/scripts/main.ts:484

    When baoyu-danger-gemini-web saves an image with --image, it picks the first item in out.images, where external web search images (WebImage) are listed ahead of AI-generated images (GeneratedImage). For a WebImage, main.ts passes c.cookies—which contains all cookies captured from google.com, accounts.google.com, and gemini.google.com—into Image.save(), and Image.save() attaches those cookies in a Cookie header to any URL and across up to 10 cross-domain HTTP redirects. If Gemini returns or is steered into returning an external web image, the user's live Google authentication cookies are sent directly to that third-party server.

    Fix: Never pass Google session cookies when downloading WebImage URLs, and in Image.save() only attach Cookie headers when the request and any redirect target match trusted Google domains over HTTPS.

  2. HighCodex image wrapper runs an unsandboxed autonomous shell agent on untrusted prompt text

    skills/baoyu-image-gen/scripts/codex-imagegen/spawn.ts:94

    Six illustration, infographic, comic, cover, card, and slide skills auto-select codex-imagegen whenever the codex CLI is available on PATH in non-Codex runtimes, copying titles, data, and verbatim quotes from the source article into the image prompt. The wrapper interpolates that prompt text raw into instructions piped to codex exec --sandbox danger-full-access, which runs an autonomous Codex agent non-interactively with unrestricted shell access and no OS sandbox. Prompt injection inside an article or reference image being illustrated can trick that inner agent into running arbitrary shell commands on the user's machine, bypassing any sandbox or approval prompts enforced by the outer agent.

    Fix: Run codex exec with --sandbox read-only instead of danger-full-access, and have the host TypeScript wrapper copy the generated PNG out of CODEX_HOME/generated_images/<threadId>/ rather than asking the inner agent to run shell commands.

  3. HighUnsanitized content injected via innerHTML into logged-in WeChat, Weibo, and X browser sessions

    skills/baoyu-post-to-wechat/scripts/wechat-browser.ts:525

    When composing an image-text post from a Markdown file or text string, wechat-browser.ts wraps lines in <p> tags without escaping HTML characters and assigns the string directly to pm.innerHTML inside the logged-in mp.weixin.qq.com page. Similarly, wechat-article.ts, weibo-article.ts, and x-article.ts inject unsanitized HTML converted from Markdown into live authenticated editor tabs via innerHTML or document.execCommand('insertHTML'). Even in preview mode without --submit, opening or translating an untrusted article containing an HTML payload like <img src=x onerror=...> can run JavaScript inside the user's logged-in Official Account or social media session to steal tokens or publish without confirmation.

    Fix: Escape HTML entities (or assign textContent / use Input.insertText) for plain text in wechat-browser.ts, and sanitize rendered HTML to strip executable tags and event-handler attributes before inserting into browser editors.

  4. HighWeChat summary skill interpolates stranger chat content into double-quoted shell commands while disabling sandbox

    skills/baoyu-wechat-summary/SKILL.md:314

    The WeChat group summary skill instructs the agent to run every wx command with dangerouslyDisableSandbox: true from the start, and gives double-quoted bash templates that interpolate group members' nicknames (wx contacts --query "<nick>") and verbatim chat quotes (grep "原话片段" "$TMPDIR/wx-messages.json"). Because double quotes in bash and zsh still execute $(...) and backtick command substitutions, a stranger in a group chat who places shell substitutions in their nickname or in a quotable message can trigger arbitrary unsandboxed command execution when the agent follows the audit or nickname-lookup steps.

    Fix: Use single-quoted arguments or jq --arg / Node scripts instead of double-quoted bash strings for untrusted nicknames and quotes, and guide users to allowlist ~/.wx-cli in /sandbox rather than setting dangerouslyDisableSandbox: true.

  5. MediumChrome remote debugging launched with --remote-allow-origins=* on persistent logged-in profile

    skills/baoyu-url-to-markdown/scripts/lib/browser/chrome-launcher.ts:94

    baoyu-fetch launches Chrome using a shared persistent profile (which stores login cookies for X, Google, WeChat, and other sites) with --remote-allow-origins=*. This flag disables Chrome's Origin header check on the local DevTools WebSocket port, weakening protection against malicious websites (including the target page opened during a 10-minute --wait-for interaction window) connecting to the debugging session if a WebSocket path is known or leaked. Because the Node/Bun ws client sends no Origin header, this flag is unnecessary.

    Fix: Remove --remote-allow-origins=* from chromeFlags when launching Chrome.

  6. MediumFetched URLs silently sent to external defuddle.md service during Markdown conversion

    skills/baoyu-url-to-markdown/scripts/lib/extract/html-to-markdown.ts:206

    Although baoyu-url-to-markdown documents local extraction via Chrome CDP and the bundled defuddle package, markdown mode enables a remote fallback by default that triggers whenever a page has fewer than six paragraphs or even contains the word 'Comments'. When triggered, it sends the full post-redirect URL to https://defuddle.md/<encoded-url>, leaking private URLs, query parameters, magic links, or access tokens to an undocumented third-party server without asking the user.

    Fix: Disable the remote defuddle.md API call by default and only contact external conversion services when the user explicitly opts in via a CLI flag or preference.

  7. MediumUnpinned third-party code downloaded and executed at runtime without user confirmation

    skills/baoyu-youtube-transcript/scripts/youtube.ts:428

    Multiple skills download and execute unpinned remote code at runtime: baoyu-youtube-transcript invokes yt-dlp with --remote-components ejs:github and --js-runtimes bun (fetching and executing remote solver JavaScript from GitHub), falls back to uvx --from yt-dlp, and in SKILL.md instructs the agent to install missing yt-dlp tooling without asking the user; baoyu-format-markdown runs unpinned npx autocorrect-node; and baoyu-electron-extract runs unpinned npx -y @electron/asar and prettier. A compromised upstream release would execute arbitrary code on the user's machine.

    Fix: Pin exact package versions in local package.json lockfiles instead of running unpinned npx/uvx commands or --remote-components ejs:github, and always ask the user before installing missing system tools.

  8. LowPlaintext browser session cookies written to disk without restrictive file permissions

    skills/baoyu-danger-gemini-web/scripts/gemini-webapi/utils/cookie-file.ts:78

    baoyu-danger-gemini-web, baoyu-danger-x-to-markdown, and baoyu-url-to-markdown save live authentication cookies (including full Google account cookies and X auth_token/ct0 cookies) as plaintext JSON files using writeFile without setting mode 0o600 or directory mode 0o700. On multi-user systems or when a custom cookie or profile path is used in a world-readable directory, other local users or processes can read these session credentials.

    Fix: Create cookie directories with mode 0o700, write cookie files with mode 0o600, and filter Gemini cookies to only the required session cookies before saving.