mugpeng/oh-my-skills-diy/archive-peng-post-to-xhs
Claude Code and agent skill by mugpeng/oh-my-skills-diy
- community
Checking that the SKILL.md file is still in the repository.
Generates Xiaohongshu image cards via Google Gemini and publishes them to 小红书. Single Gemini provider with custom GOOGLE_BASE_URL support. Combined image generation + publishing workflow. Use when user asks to create XHS cards, generate 小红书 images, or post to 小红书.
Install
npx vskill@latest install mugpeng/oh-my-skills-diy/archive-peng-post-to-xhsSKILL.md
The same SKILL.md was published earlier as mugpeng/oh-my-skills-diy/archive-peng-post-to-xhs.
Post to Xiaohongshu
Generate Xiaohongshu image cards from prompts using Google Gemini image models, then publish them to 小红书 — all in one workflow.
Script Directory
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: prefer bun; else npx -y bun; else suggest brew install oven-sh/bun/bun.
| Script | Purpose | |
|---|---|---|
scripts/main.ts | Generate image(s) via Gemini — single or batch | |
scripts/publish.ts | Full workflow: generate images + publish to 小红书 |
XHS MCP Scripts (scripts/xhs/)
Wraps xiaohongshu-mcp for 小红书 publish.
| Script | Purpose | |
|---|---|---|
xhs/mcp-call.sh | Universal MCP tool caller | |
xhs/start-mcp.sh | Start MCP service | |
xhs/stop-mcp.sh | Stop MCP service | |
xhs/status.sh | Check login status | |
xhs/install-check.sh | Check dependencies (xiaohongshu-mcp, jq) |
Prerequisites
- xiaohongshu-mcp binary: install from GitHub Releases to
~/.local/bin/ - jq:
brew install jq - GOOGLE_API_KEY env var set for image generation
Preferences (EXTEND.md)
Check these paths in order; first hit wins:
| Path | Scope | |
|---|---|---|
.peng-skills/peng-post-to-xhs/EXTEND.md | Project | |
${XDG_CONFIG_HOME:-$HOME/.config}/peng-skills/peng-post-to-xhs/EXTEND.md | XDG | |
$HOME/.peng-skills/peng-post-to-xhs/EXTEND.md | User home |
Found -> read, parse, apply. Not found -> use defaults.
Supported keys:
| Key | Default | Description | |
|---|---|---|---|
default_model | gemini-3.1-flash-image-preview | Gemini model ID | |
default_quality | 2k | normal or 2k | |
default_aspect_ratio | 9:16 | Aspect ratio (9:16 for XHS portrait cards) | |
google_base_url | (Google default) | Custom base URL for proxy (e.g., https://openclaw.chatgo.best) |
Value priority: CLI args -> EXTEND.md -> env vars -> defaults.
Environment Variables
| Variable | Description | |
|---|---|---|
GOOGLE_API_KEY | Google API key (required for image generation) | |
GEMINI_API_KEY | Alias for GOOGLE_API_KEY | |
GOOGLE_BASE_URL | Override base URL (same as EXTEND.md google_base_url) | |
MCP_URL | MCP endpoint (default http://localhost:18060/mcp) |
Usage
Image Generation Only
Generate + Publish (recommended)
First-time Login
The publish script checks login automatically. If not logged in, it prompts you to scan a QR code:
Batch Mode
Place .md prompt files in a directory. Each file becomes one image card.
Generate images:
Or generate and publish in one step:
Publish Options
| Option | Description | |
|---|---|---|
--title <text> | Post title (max 20 chars) | |
--content <text> | Post body (max 1000 chars) | |
--content-file <path> | Read body from file | |
--images <paths...> | Image file paths | |
--tags <tags...> | Topic tags | |
--batchdir <dir> | Generate images from prompt dir, then publish | |
--images-dir <dir> | Output dir for generated images (with --batchdir) | |
--schedule-at <ISO8601> | Schedule publish (1h~14d) | |
--skip-gen | Skip generation, publish existing images only | |
--json | JSON output |
小红书 Restrictions
- Title: max 20 characters
- Body: max 1000 characters
- Images: at least 1, formats PNG/JPG
- Tags: topic labels, optional
- Daily limit: 50 posts
- Schedule: 1 hour to 14 days in advance (ISO8601 format)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingarchive/archive_peng-post-to-xhs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mugpeng/oh-my-skills-diy/archive-peng-post-to-xhs)