# sweety-skills
English | [中文](./README.zh.md)
Skills shared by Sweety for improving daily work efficiency with Codex.
## Prerequisites
- Node.js environment installed
- Ability to run `npx bun` commands
## Installation
### Install as a Codex Plugin
Codex discovers plugins through a local marketplace file. Clone this repo into your user plugin directory:
```bash
mkdir -p ~/plugins ~/.agents/plugins
git clone https://github.com/threerocks/sweety-skills.git ~/plugins/sweety-skills
```
Then add this entry to `~/.agents/plugins/marketplace.json`:
```json
{
"name": "local",
"interface": {
"displayName": "Local Plugins"
},
"plugins": [
{
"name": "sweety-skills",
"source": {
"source": "local",
"path": "./plugins/sweety-skills"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
]
}
```
Restart Codex after updating the marketplace file. If you already have a marketplace file, append the `sweety-skills` plugin entry instead of replacing your existing list.
### Install Individual Skills
If you only need a few skills rather than the full plugin, install them with the Codex skills installer:
> Install the `sweety-image-gen` skill from github.com/threerocks/sweety-skills
### Publish to ClawHub / OpenClaw
This repository also supports publishing each `skills/sweety-*` directory as an individual ClawHub skill.
```bash
# Preview what would be published
./scripts/sync-clawhub.sh --dry-run
# Publish all changed skills from ./skills
./scripts/sync-clawhub.sh --all
```
ClawHub installs skills individually, not as one Codex plugin bundle. After publishing, users can install specific skills such as:
```bash
clawhub install sweety-image-gen
clawhub install sweety-markdown-to-html
```
Publishing to ClawHub releases the published skill under `MIT-0`, per ClawHub's registry rules.
### Available Plugin
The Codex plugin exposes the repo-level `skills/` directory so each skill is registered exactly once.
| Plugin | Description | Includes |
|--------|-------------|----------|
| **sweety-skills** | Content generation, AI backends, and utility tools for daily work efficiency | All skills in this repository, organized below as Content Skills, AI Generation Skills, and Utility Skills |
## Update Skills
To update skills to the latest version:
```bash
cd ~/plugins/sweety-skills
git pull
```
Restart Codex if the plugin list does not refresh automatically.

## Available Skills
Skills are organized into three categories:
### Content Skills
Content generation and publishing skills.
#### sweety-xhs-images
Xiaohongshu (RedNote) infographic series generator. Breaks down content into 1-10 cartoon-style infographics with **Style × Layout** two-dimensional system.
```bash
# Auto-select style and layout
/sweety-xhs-images posts/ai-future/article.md
# Specify style
/sweety-xhs-images posts/ai-future/article.md --style notion
# Specify layout
/sweety-xhs-images posts/ai-future/article.md --layout dense
# Combine style and layout
/sweety-xhs-images posts/ai-future/article.md --style tech --layout list
# Direct content input
/sweety-xhs-images 今日星座运势
```
**Styles** (visual aesthetics): `cute` (default), `fresh`, `warm`, `bold`, `minimal`, `retro`, `pop`, `notion`, `chalkboard`
**Style Previews**:
| | | |
|:---:|:---:|:---:|
|  |  |  |
| cute | fresh | warm |
|  |  |  |
| bold | minimal | retro |
|  |  |  |
| pop | notion | chalkboard |
**Layouts** (information density):
| Layout | Density | Best for |
|--------|---------|----------|
| `sparse` | 1-2 pts | Covers, quotes |
| `balanced` | 3-4 pts | Regular content |
| `dense` | 5-8 pts | Knowledge cards, cheat sheets |
| `list` | 4-7 items | Checklists, rankings |
| `comparison` | 2 sides | Before/after, pros/cons |
| `flow` | 3-6 steps | Processes, timelines |
**Layout Previews**:
| | | |
|:---:|:---:|:---:|
|  |  |  |
| sparse | balanced | dense |
|  |  |  |
| list | comparison | flow |
#### sweety-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
/sweety-infographic path/to/content.md
# Specify layout
/sweety-infographic path/to/content.md --layout pyramid
# Specify style (default: craft-handmade)
/sweety-infographic path/to/content.md --style technical-schematic
# Specify both
/sweety-infographic path/to/content.md --layout funnel --style corporate-memphis
# With aspect ratio (named preset or custom W:H)
/sweety-infographic path/to/content.md --aspect portrait
/sweety-infographic path/to/content.md --aspect 3:4
```
**Options**:
| Option | Description |
|--------|-------------|
| `--layout <name>` | Information layout (20 options) |
| `--style <name>` | Visual style (17 options, default: craft-handmade) |
| `--aspect <ratio>` | Named: landscape (16:9), portrait (9:16), square (1:1). Custom: any W:H ratio (e.g., 3:4, 4:3, 2.35:1) |
| `--lang <code>` | 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 | 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 | |
**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 | claymation | kawaii |
|  |  |  |
| storybook-watercolor | chalkboard | cyberpunk-neon |
|  |  |  |
| bold-graphic | aged-academia | corporate-memphis |
|  |  |  |
| technical-schematic | origami | pixel-art |
|  |  |  |
| ui-wireframe | subway-map | ikea-manual |
|  |  | |
| knolling | lego-brick | |
#### sweety-cover-image
Generate cover images for articles with 5 dimensions: Type × Palette × Rendering × Text × Mood. Combines 9 color palettes with 6 rendering styles for 54 unique combinations.
```bash
# Auto-select all dimensions based on content
/sweety-cover-image path/to/article.md
# Quick mode: skip confirmation, use auto-selection
/sweety-cover-image path/to/article.md --quick
# Specify dimensions (5D system)
/sweety-cover-image path/to/article.md --type conceptual --palette cool --rendering digital
/sweety-cover-image path/to/article.md --text title-subtitle --mood bold
# Style presets (backward-compatible shorthand)
/sweety-cover-image path/to/article.md --style blueprint
# Specify aspect ratio (default: 16:9)
/sweety-cover-image path/to/article.md --aspect 2.35:1
# Visual only (no title text)
/sweety-cover-image path/to/article.md --no-title
```
**Five Dimensions**:
- **Type**: `hero`, `conceptual`, `typography`, `metaphor`, `scene`, `minimal`
- **Palette**: `warm`, `elegant`, `cool`, `dark`, `earth`, `vivid`, `pastel`, `mono`, `retro`
- **Rendering**: `flat-vector`, `hand-drawn`, `painterly`, `digital`, `pixel`, `chalk`
- **Text**: `none`, `title-only` (default), `title-subtitle`, `text-rich`
- **Mood**: `subtle`, `balanced` (default), `bold`
#### sweety-slide-deck
Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images.
```bash
# From markdown file
/sweety-slide-deck path/to/article.md
# With style and audience
/sweety-slide-deck path/to/article.md --style corporate
/sweety-slide-deck path/to/article.md --audience executives
# Target slide count
/sweety-slide-deck path/to/article.md --slides 15
# Outline only (no image generation)
/sweety-slide-deck path/to/article.md --outline-only
# With language
/sweety-slide-deck path/to/article.md --lang zh
```
**Options**:
| Option | Description |
|--------|-------------|
| `--style <name>` | Visual style: preset name or `custom` |
| `--audience <type>` | Target: beginners, intermediate, experts, executives, general |
| `--lang <code>` | Output language (en, zh, ja, etc.) |
| `--slides <number>` | Target slide count (8-25 recommended, max 30) |
| `--outline-only` | Generate outline only, skip images |
| `--prompts-only` | Generate outline + prompts, skip images |
| `--images-only` | Generate images from existing prompts |
| `--regenerate <N>` | Regenerate specific slide(s): `3` or `2,5,8` |
**Style System**:
Styles are built from 4 dimensions: **Texture** × **Mood** × **Typography** × **Density**
| Dimension | Options |
|-----------|---------|
| Texture | clean, grid, organic, pixel, paper |
| Mood | professional, warm, cool, vibrant, dark, neutral |
| Typography | geometric, humanist, handwritten, editorial, technical |
| Density | minimal, balanced, dense |
**Presets** (pre-configured dimension combinations):
| Preset | Dimensions | Best For |
|--------|------------|----------|
| `blueprint` (default) | grid + cool + technical + balanced | Architecture, system design |
| `chalkboard` | organic + warm + handwritten + balanced | Education, tutorials |
| `corporate` | clean + professional + geometric + balanced | Investor decks, proposals |
| `minimal` | clean + neutral + geometric + minimal | Executive briefings |
| `sketch-notes` | organic + warm + handwritten + balanced | Educational, tutorials |
| `watercolor` | organic + warm + humanist + minimal | Lifestyle, wellness |
| `dark-atmospheric` | clean + dark + editorial + balanced | Entertainment, gaming |
| `notion` | clean + neutral + geometric + dense | Product demos, SaaS |
| `bold-editorial` | clean + vibrant + editorial + balanced | Product launches, keynotes |
| `editorial-infographic` | clean + cool + editorial + dense | Tech explainers, research |
| `fantasy-animation` | organic + vibrant + handwritten + minimal | Educational storytelling |
| `intuition-machine` | clean + cool + technical + dense | Technical docs, academic |
| `pixel-art` | pixel + vibrant + technical + balanced | Gaming, developer talks |
| `scientific` | clean + cool + technical + dense | Biology, chemistry, medical |
| `vector-illustration` | clean + vibrant + humanist + balanced | Creative, children's content |
| `vintage` | paper + warm + editorial + balanced | Historical, heritage |
**Style Previews**:
| | | |
|:---:|:---:|:---:|
|  |  |  |
| blueprint | chalkboard | 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 `.pptx` and `.pdf` files for easy sharing.
#### sweety-comic
Knowledge comic creator with flexible art style × tone combinations. Creates original educational comics with detailed panel layouts and sequential image generation.
```bash
# From source material (auto-selects art + tone)
/sweety-comic posts/turing-story/source.md
# Specify art style and tone
/sweety-comic posts/turing-story/source.md --art manga --tone warm
/sweety-comic posts/turing-story/source.md --art ink-brush --tone dramatic
# Use preset (includes special rules)
/sweety-comic posts/turing-story/source.md --style ohmsha
/sweety-comic posts/turing-story/source.md --style wuxia
# Specify layout and aspect ratio
/sweety-comic posts/turing-story/source.md --layout cinematic
/sweety-comic posts/turing-story/source.md --aspect 16:9
# Specify language
/sweety-comic posts/turing-story/source.md --lang zh
# Direct content input
/sweety-comic "The story of Alan Turing and the birth of computer science"
```
**Options**:
| Option | Values |
|--------|--------|
| `--art` | `ligne-claire` (default), `manga`, `realistic`, `ink-brush`, `chalk` |
| `--tone` | `neutral` (default), `warm`, `dramatic`, `romantic`, `energetic`, `vintage`, `action` |
| `--style` | `ohmsha`, `wuxia`, `shoujo` (presets with special rules) |
| `--layout` | `standard` (default), `cinematic`, `dense`, `splash`, `mixed`, `webtoon` |
| `--aspect` | `3:4` (default, portrait), `4:3` (landscape), `16:9` (widescreen) |
| `--lang` | `auto` (default), `zh`, `en`, `ja`, etc. |
**Art Styles** (rendering technique):
| Art Style | Description |
|-----------|-------------|
| `ligne-claire` | Uniform lines, flat colors, European comic tradition (Tintin, Logicomix) |
| `manga` | Large eyes, manga conventions, expressive emotions |
| `realistic` | Digital painting, realistic proportions, sophisticated |
| `ink-brush` | Chinese brush strokes, ink wash effects |
| `chalk` | Chalkboard aesthetic, hand-drawn warmth |
**Tones** (mood/atmosphere):
| Tone | Description |
|------|-------------|
| `neutral` | Balanced, rational, educational |
| `warm` | Nostalgic, personal, comforting |
| `dramatic` | High contrast, intense, powerful |
| `romantic` | Soft, beautiful, decorative elements |
| `energetic` | Bright, dynamic, exciting |
| `vintage` | Historical, aged, period authenticity |
| `action` | Speed lines, impact effects, combat |
**Presets** (art + tone + special rules):
| Preset | Equivalent | Special Rules |
|--------|-----------|---------------|
| `ohmsha` | manga + neutral | Visual metaphors, NO talking heads, gadget reveals |
| `wuxia` | ink-brush + action | Qi effects, combat visuals, atmospheric elements |
| `shoujo` | manga + romantic | Decorative elements, eye details, romantic beats |
**Layouts** (panel arrangement):
| Layout | Panels/Page | Best for |
|--------|-------------|----------|
| `standard` | 4-6 | Dialogue, narrative flow |
| `cinematic` | 2-4 | Dramatic moments, establishing shots |
| `dense` | 6-9 | Technical explanations, timelines |
| `splash` | 1-2 large | Key moments, revelations |
| `mixed` | 3-7 varies | Complex narratives, emotional arcs |
| `webtoon` | 3-5 vertical | Ohmsha tutorials, mobile reading |
**Layout Previews**:
| | | |
|:---:|:---:|:---:|
|  |  |  |
| standard | cinematic | dense |
|  |  |  |
| splash | mixed | webtoon |
#### sweety-article-illustrator
Smart article illustration skill with Type × Style two-dimension approach. Analyzes article structure, identifies positions requiring visual aids, and generates illustrations.
```bash
# Auto-select type and style based on content
/sweety-article-illustrator path/to/article.md
# Specify type
/sweety-article-illustrator path/to/article.md --type infographic
# Specify style
/sweety-article-illustrator path/to/article.md --style blueprint
# Combine type and style
/sweety-article-illustrator path/to/article.md --type flowchart --style notion
```
**Types** (information structure):
| Type | Description | Best For |
|------|-------------|----------|
| `infographic` | Data visualization, charts, metrics | Technical articles, data analysis |
| `scene` | Atmospheric illustration, mood rendering | Narrative, personal stories |
| `flowchart` | Process diagrams, step visualization | Tutorials, workflows |
| `comparison` | Side-by-side, before/after contrast | Product comparisons |
| `framework` | Concept maps, relationship diagrams | Methodologies, architecture |
| `timeline` | Chronological progression | History, project progress |
**Styles** (visual aesthetics):
| Style | Description | Best For |
|-------|-------------|----------|
| `notion` (default) | Minimalist hand-drawn line art | Knowledge sharing, SaaS, productivity |
| `elegant` | Refined, sophisticated | Business, thought leadership |
| `warm` | Friendly, approachable | Personal growth, lifestyle |
| `minimal` | Ultra-clean, zen-like | Philosophy, minimalism |
| `blueprint` | Technical schematics | Architecture, system design |
| `watercolor` | Soft artistic with natural warmth | Lifestyle, travel, creative |
| `editorial` | Magazine-style infographic | Tech explainers, journalism |
| `scientific` | Academic precise diagrams | Biology, chemistry, technical |
**Style Previews**:
| | | |
|:---:|:---:|:---:|
|  |  |  |
| notion | elegant | warm |
|  |  |  |
| minimal | blueprint | watercolor |
|  |  | |
| editorial | scientific | |
#### sweety-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.
Plain text input is treated as a regular post. Markdown files are treated as X Articles. Scripts fill content into the browser, and the user reviews and publishes manually.
```bash
# Post with text
/sweety-post-to-x "Hello from Codex!"
# Post with images
/sweety-post-to-x "Check this out" --image photo.png
# Post X Article
/sweety-post-to-x --article path/to/article.md
```
#### sweety-negative-short-tweet
Generate Chinese negative-energy short tweet candidates. It combines persona, user input, date/weather/trends/memory, selects 3 suitable anti-motivational directions, drafts cold-humor/self-deprecating/realistic short posts, and filters appearance shaming, group attacks, rumors, and self-harm risk.
```bash
/sweety-negative-short-tweet "It's Monday. Give me a negative-energy post about going to work."
/sweety-negative-short-tweet "Use my persona and recent trends to give me 3 directions."
```
#### sweety-post-to-wechat
Post content to WeChat Official Account (微信公众号). Two modes available:
**Image-Text (贴图)** - Multiple images with short title/content:
```bash
/sweety-post-to-wechat 贴图 --markdown article.md --images ./photos/
/sweety-post-to-wechat 贴图 --markdown article.md --image img1.png --image img2.png --image img3.png
/sweety-post-to-wechat 贴图 --title "标题" --content "内容" --image img1.png --submit
```
**Article (文章)** - Full markdown/HTML with rich formatting. Markdown rendering is delegated to `sweety-markdown-to-html`, so article mode supports the shared WeChat themes, inline styles, image placeholders, and preview/gallery output contract.
```bash
/sweety-post-to-wechat 文章 --markdown article.md
/sweety-post-to-wechat 文章 --markdown article.md --theme newspaper
/sweety-post-to-wechat 文章 --html article.html
```
**Publishing Methods**:
| Method | Speed | Requirements |
|--------|-------|--------------|
| API (Recommended) | Fast | API credentials |
| Browser | Slow | Chrome, login session |
**API Configuration** (for faster publishing):
```bash
# Add to .sweety-skills/.env (project-level) or ~/.sweety-skills/.env (user-level)
WECHAT_APP_ID=your_app_id
WECHAT_APP_SECRET=your_app_secret
```
To obtain credentials:
1. Visit https://developers.weixin.qq.com/platform/
2. Go to: 我的业务 → 公众号 → 开发密钥
3. Create development key and copy AppID/AppSecret
4. Add your machine's IP to the whitelist
**Browser Method** (no API setup needed): Requires Google Chrome. First run opens browser for QR code login (session preserved).
**Multi-Account Support**: Manage multiple WeChat Official Accounts via `EXTEND.md`:
```bash
mkdir -p .sweety-skills/sweety-post-to-wechat
```
Create `.sweety-skills/sweety-post-to-wechat/EXTEND.md`:
```yaml
# Global settings (shared across all accounts)
default_theme: newspaper
default_color: blue
# Account list
accounts:
- name: My Tech Blog
alias: tech-blog
default: false
default_publish_method: api
default_author: Author Name
need_open_comment: 1
only_fans_can_comment: 0
app_id: your_wechat_app_id
app_secret: your_wechat_app_secret
- name: AI Newsletter
alias: ai-news
default_publish_method: browser
default_author: AI Newsletter
need_open_comment: 1
only_fans_can_comment: 0
```
| Accounts configured | Behavior |
|---------------------|----------|
| No `accounts` block | Single-account mode (backward compatible) |
| 1 account | Auto-select, no prompt |
| 2+ accounts | Prompt to select, or use `--account <alias>` |
| 1 account has `default: true` | Pre-selected as default |
Each account gets an isolated Chrome profile for independent login sessions (browser method). API credentials can be set inline in EXTEND.md or via `.env` with alias-prefixed keys (e.g., `WECHAT_TECH_BLOG_APP_ID`).
#### sweety-post-to-weibo
Post content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input. Uses real Chrome with CDP to bypass anti-automation.
**Regular Posts** - Text + images/videos (max 18 files):
```bash
# Post with text
/sweety-post-to-weibo "Hello Weibo!"
# Post with images
/sweety-post-to-weibo "Check this out" --image photo.png
# Post with video
/sweety-post-to-weibo "Watch this" --video clip.mp4
```
**Headline Articles (头条文章)** - Long-form Markdown:
```bash
# Publish article
/sweety-post-to-weibo --article article.md
# With cover image
/sweety-post-to-weibo --article article.md --cover cover.jpg
```
**Article Options**:
| Option | Description |
|--------|-------------|
| `--cover <path>` | Cover image |
| `--title <text>` | Override title (max 32 chars) |
| `--summary <text>` | Override summary (max 44 chars) |
**Note**: Scripts fill content into the browser. User reviews and publishes manually. First run requires manual Weibo login (session persists).
### AI Generation Skills
AI-powered generation backends.
#### sweety-image-gen
AI SDK-based image generation using OpenAI, Google, OpenRouter, DashScope (Aliyun Tongyi Wanxiang), Jimeng (即梦), Seedream (豆包), and Replicate APIs. Supports text-to-image, reference images, aspect ratios, and quality presets.
```bash
# Basic generation (auto-detect provider)
/sweety-image-gen --prompt "A cute cat" --image cat.png
# With aspect ratio
/sweety-image-gen --prompt "A landscape" --image landscape.png --ar 16:9
# High quality (2k)
/sweety-image-gen --prompt "A banner" --image banner.png --quality 2k
# Specific provider
/sweety-image-gen --prompt "A cat" --image cat.png --provider openai
# OpenRouter
/sweety-image-gen --prompt "A cat" --image cat.png --provider openrouter
# DashScope (Aliyun Tongyi Wanxiang)
/sweety-image-gen --prompt "一只可爱的猫" --image cat.png --provider dashscope
# Replicate
/sweety-image-gen --prompt "A cat" --image cat.png --provider replicate
# Jimeng (即梦)
/sweety-image-gen --prompt "一只可爱的猫" --image cat.png --provider jimeng
# Seedream (豆包)
/sweety-image-gen --prompt "一只可爱的猫" --image cat.png --provider seedream
# With reference images (Google, OpenAI, OpenRouter, Replicate, or Seedream 5.0/4.5/4.0)
/sweety-image-gen --prompt "Make it blue" --image out.png --ref source.png
```
**Options**:
| Option | Description |
|--------|-------------|
| `--prompt`, `-p` | Prompt text |
| `--promptfiles` | Read prompt from files (concatenated) |
| `--image` | Output image path (required) |
| `--provider` | `google`, `openai`, `openrouter`, `dashscope`, `jimeng`, `seedream` or `replicate` (default: auto-detect; prefers google) |
| `--model`, `-m` | Model ID |
| `--ar` | Aspect ratio (e.g., `16:9`, `1:1`, `4:3`) |
| `--size` | Size (e.g., `1024x1024`) |
| `--quality` | `normal` or `2k` (default: `2k`) |
| `--ref` | Reference images (Google, OpenAI, OpenRouter, Replicate, or Seedream 5.0/4.5/4.0) |
**Environment Variables** (see [Environment Configuration](#environment-configuration) for setup):
| Variable | Description | Default |
|----------|-------------|---------|
| `OPENAI_API_KEY` | OpenAI API key | - |
| `OPENROUTER_API_KEY` | OpenRouter API key | - |
| `GOOGLE_API_KEY` | Google API key | - |
| `DASHSCOPE_API_KEY` | DashScope API key (Aliyun) | - |
| `REPLICATE_API_TOKEN` | Replicate API token | - |
| `JIMENG_ACCESS_KEY_ID` | Jimeng Volcengine access key | - |
| `JIMENG_SECRET_ACCESS_KEY` | Jimeng Volcengine secret key | - |
| `ARK_API_KEY` | Seedream Volcengine ARK API key | - |
| `OPENAI_IMAGE_MODEL` | OpenAI model | `gpt-image-1.5` |
| `OPENROUTER_IMAGE_MODEL` | OpenRouter model | `google/gemini-3.1-flash-image-preview` |
| `GOOGLE_IMAGE_MODEL` | Google model | `gemini-3-pro-image-preview` |
| `DASHSCOPE_IMAGE_MODEL` | DashScope model | `qwen-image-2.0-pro` |
| `REPLICATE_IMAGE_MODEL` | Replicate model | `google/nano-banana-pro` |
| `JIMENG_IMAGE_MODEL` | Jimeng model | `jimeng_t2i_v40` |
| `SEEDREAM_IMAGE_MODEL` | Seedream model | `doubao-seedream-5-0-260128` |
| `OPENAI_BASE_URL` | Custom OpenAI endpoint | - |
| `OPENROUTER_BASE_URL` | Custom OpenRouter endpoint | `https://openrouter.ai/api/v1` |
| `GOOGLE_BASE_URL` | Custom Google endpoint | - |
| `DASHSCOPE_BASE_URL` | Custom DashScope endpoint | - |
| `REPLICATE_BASE_URL` | Custom Replicate endpoint | - |
| `JIMENG_BASE_URL` | Custom Jimeng endpoint | `https://visual.volcengineapi.com` |
| `JIMENG_REGION` | Jimeng region | `cn-north-1` |
| `SEEDREAM_BASE_URL` | Custom Seedream endpoint | `https://ark.cn-beijing.volces.com/api/v3` |
**Provider Auto-Selection**:
1. If `--provider` specified → use it
2. If only one API key available → use that provider
3. If multiple available → default to Google
#### sweety-video-gen
Generic AI video generation for services implementing the `/v1/media` open protocol (current source: Seedance 2.0 fast relay). Configure host + API key in `~/.sweety-skills/.env` (`VIDEO_GEN_BASE_URL` / `VIDEO_GEN_API_KEY`); switching providers only requires changing the base URL.
```bash
# Text-to-video (5s, downloads on completion)
/sweety-video-gen --prompt "A cat on a windowsill" --duration 5 --output out.mp4
# Image-to-video with local reference images (auto-uploaded)
/sweety-video-gen --prompt "Animate this scene" --ref 1.jpg --output out.mp4
# Query / wait / retry a task, list models, cost summary
/sweety-video-gen --status 123
/sweety-video-gen --usage
```
Each finished task is appended to a cost ledger (`~/.sweety-skills/sweety-video-gen/usage.jsonl`).
#### sweety-danger-gemini-web
Interacts with Gemini Web to generate text and images.
**Text Generation:**
```bash
/sweety-danger-gemini-web "Hello, Gemini"
/sweety-danger-gemini-web --prompt "Explain quantum computing"
```
**Image Generation:**
```bash
/sweety-danger-gemini-web --prompt "A cute cat" --image cat.png
/sweety-danger-gemini-web --promptfiles system.md content.md --image out.png
```
### Utility Skills
Utility tools for content processing.
#### sweety-karpathy-writing-style
Karpathy-inspired English technical writing guide for AI essays, year-in-review posts, industry analysis, and opinion pieces. Can learn reusable rules from `original` vs `final` drafts and update its `SKILL.md`.
#### sweety-image-naturalizer
Chinese visual brief guide for removing the AI look from image generation tasks. Turns image requests into grounded creative briefs and prompts with Pinterest-style visual discovery, VHTC-style educational diagram structure, and artifact checks for anatomy, physics, function, text, and scene plausibility.
#### sweety-image-art-direction
Moved to the standalone repository [sweety-image-art-direction](https://github.com/threerocks/sweety-image-art-direction). Install it separately; it is no longer bundled with this plugin. The skill name, rules, and explicit invocation via `$sweety-image-art-direction` are unchanged. See the [migration note](skills/sweety-image-art-direction/README.md).
#### sweety-image-reprocess
Pixel-layer reprocessing for generated images (real Gaussian noise, non-uniform sharpening, non-integer resampling, JPEG re-encode, metadata strip) with a 1-10 strength level. Disrupts diffusion/GAN frequency-domain fingerprints to reduce false positives from AI detectors on hybrid-real content.
#### sweety-liulei-writer
Writing skill for drafting articles in Liu Lei's voice (hands-on engineer, cost-aware, anti-marketing, boundary-honest). Provides a persona anchor, value baseline, a signature lexicon and paired examples extracted from real authorized corpus, an AI-cliché red-line list, and a persona self-check. It is the single entrypoint for the writing pipeline and orchestrates external `shuorenhua` + `humanizer-zh` review before `sweety-four-layer-review`. For WeChat publishing it outputs a scaffold/rough draft or cleanup plan for the author to finish in their own words, since reliably passing AI detectors requires genuinely human text.
#### sweety-four-layer-review
Pre-publish four-layer review (facts/logic → residual AI-flavor → rhythm → does-it-sound-like-the-author), final stage of the pipeline. Only judges and routes issues back upstream (boundary/voice cleanup to external `shuorenhua` / `humanizer-zh`, voice to `sweety-liulei-writer`); it does not rewrite or invent new rules. Outputs a structured QC report with a verdict and fix priorities.
#### sweety-youtube-transcript
Download YouTube video transcripts/subtitles and cover images. Supports multiple languages, translation, chapters, and speaker identification. Caches raw data for fast re-formatting.
```bash
# Default: markdown with timestamps
/sweety-youtube-transcript https://www.youtube.com/watch?v=VIDEO_ID
# Specify languages (priority order)
/sweety-youtube-transcript https://youtu.be/VIDEO_ID --languages zh,en,ja
# With chapters and speaker identification
/sweety-youtube-transcript https://youtu.be/VIDEO_ID --chapters --speakers
# SRT subtitle format
/sweety-youtube-transcript https://youtu.be/VIDEO_ID --format srt
# List available transcripts
/sweety-youtube-transcript https://youtu.be/VIDEO_ID --list
```
**Options**:
| Option | Description | Default |
|--------|-------------|---------|
| `<url-or-id>` | YouTube URL or video ID | Required |
| `--languages <codes>` | Language codes, comma-separated | `en` |
| `--format <fmt>` | Output format: `text`, `srt` | `text` |
| `--translate <code>` | Translate to specified language | |
| `--chapters` | Chapter segmentation from video description | |
| `--speakers` | Speaker identification (requires AI post-processing) | |
| `--no-timestamps` | Disable timestamps | |
| `--list` | List available transcripts | |
| `--refresh` | Force re-fetch, ignore cache | |
#### sweety-url-to-markdown
Fetch any URL via Chrome CDP and convert to clean markdown. Saves rendered HTML snapshot alongside the markdown, and automatically falls back to a legacy extractor when Defuddle fails.
```bash
# Auto mode (default) - capture when page loads
/sweety-url-to-markdown https://example.com/article
# Wait mode - for login-required pages
/sweety-url-to-markdown https://example.com/private --wait
# Save to specific file
/sweety-url-to-markdown https://example.com/article -o output.md
```
**Capture Modes**:
| Mode | Description | Best For |
|------|-------------|----------|
| Auto (default) | Captures immediately after page load | Public pages, static content |
| Wait (`--wait`) | Waits for user signal before capture | Login-required, dynamic content |
**Options**:
| Option | Description |
|--------|-------------|
| `<url>` | URL to fetch |
| `-o <path>` | Output file path |
| `--wait` | Wait for user signal before capturing |
| `--timeout <ms>` | Page load timeout (default: 30000) |
#### sweety-danger-x-to-markdown
Converts X (Twitter) content to markdown format. Supports tweet threads and X Articles.
```bash
# Convert tweet to markdown
/sweety-danger-x-to-markdown https://x.com/username/status/123456
# Save to specific file
/sweety-danger-x-to-markdown https://x.com/username/status/123456 -o output.md
# JSON output
/sweety-danger-x-to-markdown https://x.com/username/status/123456 --json
# Download media (images/videos) to local files
/sweety-danger-x-to-markdown https://x.com/username/status/123456 --download-media
```
**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.
#### sweety-compress-image
Compress images to reduce file size while maintaining quality.
```bash
/sweety-compress-image path/to/image.png
/sweety-compress-image path/to/images/ --quality 80
```
#### sweety-format-markdown
Format plain text or markdown files with proper frontmatter, titles, summaries, headings, bold, lists, and code blocks.
```bash
# Format a markdown file
/sweety-format-markdown path/to/article.md
# Format with specific output
/sweety-format-markdown path/to/draft.md
```
**Workflow**:
1. Read source file and analyze content structure
2. Check/create YAML frontmatter (title, slug, summary, coverImage)
3. Handle title: use existing, extract from H1, or generate candidates
4. Apply formatting: headings, bold, lists, code blocks, quotes
5. Save to `{filename}-formatted.md`
6. Run typography script: ASCII→fullwidth quotes, CJK spacing, autocorrect
**Frontmatter Fields**:
| Field | Processing |
|-------|------------|
| `title` | Use existing, extract H1, or generate candidates |
| `slug` | Infer from file path or generate from title |
| `summary` | Generate engaging summary (100-150 chars) |
| `coverImage` | Check for `imgs/cover.png` in same directory |
**Formatting Rules**:
| Element | Format |
|---------|--------|
| Titles | `#`, `##`, `###` hierarchy |
| Key points | `**bold**` |
| Parallel items | `-` unordered or `1.` ordered lists |
| Code/commands | `` `inline` `` or ` ```block``` ` |
| Quotes | `>` blockquote |
#### sweety-markdown-to-html
Pure WeChat Official Account layout skill. Converts Markdown, plain text notes, and Obsidian-style articles into WeChat-compatible inline-styled HTML with 30 themes, gallery previews, AI layout cleanup, CJK fixes, footnotes, image handling, and container syntax. It also provides the Markdown rendering contract used by `sweety-post-to-wechat`.
```bash
# Basic conversion
/sweety-markdown-to-html article.md --theme newspaper --no-open
# Generate a theme gallery
/sweety-markdown-to-html article.md --gallery --recommend newspaper magazine ink --no-open
# Legacy theme aliases still work
/sweety-markdown-to-html article.md --theme grace --color #A93226 --no-open
```
#### sweety-translate
Translate articles and documents between languages with three modes: quick (direct), normal (analysis-informed), and refined (full publication-quality workflow with review and polish).
```bash
# Normal mode (default) - analyze then translate
/translate article.md --to zh-CN
# Quick mode - direct translation
/translate article.md --mode quick --to ja
# Refined mode - full workflow with review and polish
/translate article.md --mode refined --to zh-CN
# Translate a URL
/translate https://example.com/article --to zh-CN
# Specify audience
/translate article.md --to zh-CN --audience technical
# Specify style
/translate article.md --to zh-CN --style humorous
# With additional glossary
/translate article.md --to zh-CN --glossary my-terms.md
```
**Options**:
| Option | Description |
|--------|-------------|
| `<source>` | File path, URL, or inline text |
| `--mode <mode>` | `quick`, `normal` (default), `refined` |
| `--from <lang>` | Source language (auto-detect if omitted) |
| `--to <lang>` | Target language (default: `zh-CN`) |
| `--audience <type>` | Target reader profile (default: `general`) |
| `--style <style>` | Translation style (default: `storytelling`) |
| `--glossary <file>` | Additional glossary file |
**Modes**:
| Mode | Steps | Use Case |
|------|-------|----------|
| Quick | Translate | Short texts, informal content |
| Normal | Analyze → Translate | Articles, blog posts |
| Refined | Analyze → Translate → Review → Polish | Publication-quality documents |
After normal mode completes, you can reply "继续润色" or "refine" to continue with review and polish steps.
**Audience Presets**:
| Value | Description |
|-------|-------------|
| `general` | General readers (default) — plain language, more translator's notes |
| `technical` | Developers / engineers — less annotation on common tech terms |
| `academic` | Researchers / scholars — formal register, precise terminology |
| `business` | Business professionals — business-friendly tone |
Custom audience descriptions are also accepted, e.g., `--audience "AI-interested general readers"`.
**Style Presets**:
| Value | Description |
|-------|-------------|
| `storytelling` | Engaging narrative flow (default) — smooth transitions, vivid phrasing |
| `formal` | Professional, structured — neutral tone, no colloquialisms |
| `technical` | Precise, documentation-style — concise, terminology-heavy |
| `literal` | Close to original structure — minimal restructuring |
| `academic` | Scholarly, rigorous — formal register, complex clauses OK |
| `business` | Concise, results-focused — action-oriented, executive-friendly |
| `humorous` | Preserves and adapts humor — witty, recreates comedic effect |
| `conversational` | Casual, spoken-like — friendly, as if explaining to a friend |
| `elegant` | Literary, polished prose — aesthetically refined, carefully crafted |
Custom style descriptions are also accepted, e.g., `--style "poetic and lyrical"`.
**Features**:
- Custom glossaries via EXTEND.md with built-in EN→ZH glossary
- Audience-aware translation with adjustable annotation depth
- Automatic chunking for long documents (4000+ words) with parallel subagent translation
- Figurative language interpreted by meaning, not word-for-word
- Translator's notes for cultural/domain-specific references
- Output directory with all intermediate files preserved
## Environment Configuration
Some skills require API keys or custom configuration. Environment variables can be set in `.env` files:
**Load Priority** (higher priority overrides lower):
1. CLI environment variables (e.g., `OPENAI_API_KEY=xxx /sweety-image-gen ...`)
2. `process.env` (system environment)
3. `<cwd>/.sweety-skills/.env` (project-level)
4. `~/.sweety-skills/.env` (user-level)
**Setup**:
```bash
# Create user-level config directory
mkdir -p ~/.sweety-skills
# Create .env file
cat > ~/.sweety-skills/.env << 'EOF'
# OpenAI
OPENAI_API_KEY=sk-xxx
OPENAI_IMAGE_MODEL=gpt-image-1.5
# OPENAI_BASE_URL=https://api.openai.com/v1
# OpenRouter
OPENROUTER_API_KEY=sk-or-xxx
OPENROUTER_IMAGE_MODEL=google/gemini-3.1-flash-image-preview
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Google
GOOGLE_API_KEY=xxx
GOOGLE_IMAGE_MODEL=gemini-3-pro-image-preview
# GOOGLE_BASE_URL=https://generativelanguage.googleapis.com/v1beta
# DashScope (Aliyun Tongyi Wanxiang)
DASHSCOPE_API_KEY=sk-xxx
DASHSCOPE_IMAGE_MODEL=qwen-image-2.0-pro
# DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/api/v1
# Replicate
REPLICATE_API_TOKEN=r8_xxx
REPLICATE_IMAGE_MODEL=google/nano-banana-pro
# REPLICATE_BASE_URL=https://api.replicate.com
# Jimeng (即梦)
JIMENG_ACCESS_KEY_ID=xxx
JIMENG_SECRET_ACCESS_KEY=xxx
JIMENG_IMAGE_MODEL=jimeng_t2i_v40
# JIMENG_BASE_URL=https://visual.volcengineapi.com
# JIMENG_REGION=cn-north-1
# Seedream (豆包)
ARK_API_KEY=xxx
SEEDREAM_IMAGE_MODEL=doubao-seedream-5-0-260128
# SEEDREAM_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
EOF
```
**Project-level config** (for team sharing):
```bash
mkdir -p .sweety-skills
# Add .sweety-skills/.env to .gitignore to avoid committing secrets
echo ".sweety-skills/.env" >> .gitignore
```
## 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.
**Extension paths** (checked in priority order):
1. `.sweety-skills/<skill-name>/EXTEND.md` - Project-level (for team/project-specific settings)
2. `~/.sweety-skills/<skill-name>/EXTEND.md` - User-level (for personal preferences)
**Example**: To customize `sweety-cover-image` with your brand colors:
```bash
mkdir -p .sweety-skills/sweety-cover-image
```
Then create `.sweety-skills/sweety-cover-image/EXTEND.md`:
```markdown
## Custom Palettes
### corporate-tech
- Primary colors: #1a73e8, #4A90D9
- Background: #F5F7FA
- Accent colors: #00B4D8, #48CAE4
- Decorative hints: Clean lines, subtle gradients
- Best for: SaaS, enterprise, technical
```
The extension content will be loaded before skill execution and override defaults.
## Disclaimer
### sweety-danger-gemini-web
This skill uses the Gemini Web API (reverse-engineered).
**Warning:** This project uses unofficial API access via browser cookies. Use at your own risk.
- First run opens a browser to authenticate with Google
- Cookies are cached for subsequent runs
- No guarantees on API stability or availability
**Supported browsers** (auto-detected): Google Chrome, Chrome Canary/Beta, Chromium, Microsoft Edge
**Proxy configuration**: If you need a proxy to access Google services (e.g., in China), set environment variables inline:
```bash
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 /sweety-danger-gemini-web "Hello"
```
### sweety-danger-x-to-markdown
This skill uses a reverse-engineered X (Twitter) API.
**Warning:** This is NOT an official API. Use at your own risk.
- May break without notice if X changes their API
- Account restrictions possible if API usage detected
- First use requires consent acknowledgment
- Authentication via environment variables or Chrome login
## Credits
This project was inspired by and builds upon the following open source projects:
- [x-article-publisher-skill](https://github.com/wshuyi/x-article-publisher-skill) by [@wshuyi](https://github.com/wshuyi) — Inspiration for the X article publishing skill
- [doocs/md](https://github.com/doocs/md) by [@doocs](https://github.com/doocs) — Core implementation logic for Markdown to HTML conversion
- [High-density Infographic Prompt](https://waytoagi.feishu.cn/wiki/YG0zwalijihRREkgmPzcWRInnUg) by AJ@WaytoAGI — Inspiration for the infographic skill
- [qiaomu-mondo-poster-design](https://github.com/joeseesun/qiaomu-mondo-poster-design) by [@joeseesun](https://github.com/joeseesun)(乔木) — Inspiration for the Mondo style
## License
MIT
## Star History
[](https://www.star-history.com/#sweety/sweety-skills&Date)
Lire le README source