mcpField
X
xiaohongshu-cover-generator

xiaohongshu-cover-generator

github.com/freestyleflyCreative & media971.8k installsUpdated 39w ago
Repository

About xiaohongshu-cover-generator

A skill that generates Xiaohongshu-style cover images from a user-provided topic. It runs a script using a CANGHE_API_KEY and saves a vertical PNG image in the current working directory.

Key features

  1. 01Generates covers from a topic
  2. 02Uses CANGHE_API_KEY for generation
  3. 03Saves timestamped PNG files
  4. 04Produces vertical 3:4 images
  5. 05Removes watermarks and logos

Use cases

  1. 01Creating a Xiaohongshu post cover
  2. 02Generating a mobile-friendly topic image
  3. 03Saving a generated cover in the project directory

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/freestylefly/xiaohongshu-skills --skill xiaohongshu-cover-generator

After installing, type/xiaohongshu-cover-generatorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
.DS_Store
package.json
package-lock.json
scripts/
handler.ts

Details

From the project README

Xiaohongshu Cover Generator

This skill generates Xiaohongshu-style cover images based on user-provided topics.

Usage

When a user requests a Xiaohongshu cover image:

  1. Confirm the topic with the user if not clear
  2. Check for API key (CANGHE_API_KEY environment variable or ask user to provide it)
  3. Run the generation script with the topic
  4. The image will be saved to the current working directory with filename format: xiaohongshu-cover-{timestamp}.png

Running the Script

The script is located at scripts/handler.ts and requires:

  • Topic (required): The subject for the cover image
  • API Key (required): Either via environment variable CANGHE_API_KEY or passed as argument

Execute with:

cd ~/.codebuddy/skills/xiaohongshu-cover-generator
npx tsx scripts/handler.ts "<topic>" "<api-key-optional>"

Or with environment variable:

cd ~/.codebuddy/skills/xiaohongshu-cover-generator
CANGHE_API_KEY="your-api-key" npx tsx scripts/handler.ts "<topic>"

API Key

Users need a valid API key from https://api.canghe.ai/

If the API key is missing or invalid, provide the user with clear instructions to obtain one.

Output

The generated image will be saved to the directory where the skill was invoked (current working directory), not the skill's directory. The filename format is xiaohongshu-cover-{timestamp}.png where timestamp is in milliseconds.

Style Specifications

The generated images follow these specifications:

  • Aspect ratio: 3:4 (vertical, mobile-friendly)
  • Style: Clean, refined, youthful aesthetic
  • Automatic removal of watermarks and logos
  • High-quality output suitable for mobile viewing
  • Text should be clear and readable with appropriate sizing

Comments

Markdown supported