← 返回 Skills 市场
laojun509

GitHub to Xiaohongshu

作者 laojun · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ✓ 安全检测通过
168
总下载
0
收藏
1
当前安装
4
版本数
在 OpenClaw 中安装
/install github-to-xhs
功能描述
Analyze a GitHub repository and generate Xiaohongshu (Little Red Book) infographic posts. Use when the user wants to create social media content about a GitH...
使用说明 (SKILL.md)

GitHub to Xiaohongshu Skill

Transform any GitHub repository into engaging Xiaohongshu (小红书) infographic content.

Usage

# Basic usage - analyze a GitHub repo and generate XHS content
/github-to-xhs https://github.com/user/repo

# With specific focus
/github-to-xhs https://github.com/user/repo --focus "AI features"

# After generation, files are in:
# /root/.openclaw/workspace/xhs-images/{repo-slug}/

Workflow

Step 1: Fetch GitHub Repository

Use web_fetch to get the repository's README and main content.

https://github.com/{owner}/{repo}

Step 2: Content Analysis

Analyze the repository and create analysis.md:

# {repo-name} Analysis

## Project Info
- Name: {name}
- Author: {author}
- Stars: {stars}
- Language: {language}
- Description: {description}

## Core Features
- Feature 1
- Feature 2
...

## Target Audience
- Audience 1
- Audience 2

## XHS Angles
- Hook ideas (max 20 characters for title)
- Visual opportunities

Step 3: Generate Outline Strategies

Create 6 different outline strategies with distinct visual styles:

Strategy A - Story-Driven (outline-strategy-a.md)

  • Personal discovery narrative
  • Problem → Solution → Result flow
  • 4 images, warm/cute style
  • Soft gradients, bookmarks, progress bars

Strategy B - Information-Dense (outline-strategy-b.md)

  • Feature highlights + technical details
  • Comparison tables + code blocks
  • 5 images, notion/minimal style
  • Grid background, geometric shapes

Strategy C - Visual-First (outline-strategy-c.md)

  • Bold visuals, minimal text
  • Showcase/demo focus
  • 3 images, bold/pop style
  • Large icons, big numbers, solid colors

Strategy D - Cyberpunk Tech (outline-strategy-d.md) ⭐ NEW

  • Neon colors, dark background
  • Perfect for developer tools, AI projects
  • 4-5 images, glowing accents
  • Dark theme (#0a0a0a), neon cyan/pink/purple

Strategy E - Warm Hand-drawn (outline-strategy-e.md) ⭐ NEW

  • Sketchy, organic, friendly
  • Great for beginner tutorials, educational content
  • 4-5 images, paper texture background
  • Earth tones, hand-drawn icons, doodles

Strategy F - Dark Professional (outline-strategy-f.md) ⭐ NEW

  • Sleek, premium, enterprise feel
  • Ideal for business tools, SaaS products
  • 5 images, dark navy background
  • Gold/amber accents, glassmorphism effects

Step 4: User Selection

Present all 6 strategies and ask user to choose:

📋 Select your preferred strategy:
- A: Story-Driven (4 images, emotional, warm)
- B: Information-Dense (5 images, technical, notion) ⭐ Default
- C: Visual-First (3 images, bold, minimal)
- D: Cyberpunk Tech (4-5 images, neon dark, dev tools)
- E: Warm Hand-drawn (4-5 images, sketchy, educational)
- F: Dark Professional (5 images, premium, enterprise)

Or specify a style: "Use cyberpunk style" / "Make it warm and friendly"

Step 5: Generate Content

Create final files:

  1. outline.md - Selected strategy
  2. prompts/NN-{type}-{slug}.md - Image generation prompts for each slide
  3. xiaohongshu-post.html - Complete HTML with all 5 slides styled for XHS

Step 6: Package Output

Create tar.gz archive with timestamp and version:

tar -czf {repo-slug}-xhs-{YYYYMMDD}-v{N}.tar.gz {repo-slug}/

Naming Convention: {repo-slug}-xhs-{date}-v{version}.tar.gz

  • Example: hermes-agent-xhs-20250413-v2.tar.gz

Output Structure

xhs-images/{repo-slug}/
├── source-{slug}.md              # Original GitHub content
├── analysis.md                   # Content analysis
├── outline-strategy-a.md         # Story-driven (warm)
├── outline-strategy-b.md         # Information-dense (notion)
├── outline-strategy-c.md         # Visual-first (bold)
├── outline-strategy-d.md         # Cyberpunk tech (NEW)
├── outline-strategy-e.md         # Warm hand-drawn (NEW)
├── outline-strategy-f.md         # Dark professional (NEW)
├── outline.md                    # Final selected outline
├── xiaohongshu-post.html         # Complete visual output
├── xiaohongshu-article.md        # Article content for XHS caption
├── prompts/                      # Image generation prompts
│   ├── 01-cover-{slug}.md
│   ├── 02-features-{slug}.md
│   └── ...
└── {repo-slug}-xhs-{YYYYMMDD}-v{N}.tar.gz  # Final package

HTML Output Features

The generated xiaohongshu-post.html includes multiple visual style templates:

Available Style Themes

Theme Best For Colors Aesthetic
Notion (Default) Technical docs, tools Off-white, gray, subtle accents Clean, minimal, grid background
Cyberpunk AI tools, dev projects Dark bg, neon cyan/pink/purple Glowing, futuristic, high contrast
Warm Tutorials, education Cream, earth tones, warm accents Hand-drawn, friendly, organic
Dark Pro Enterprise, SaaS Navy/black, gold/amber accents Premium, sleek, glassmorphism
Bold Pop Visual products Solid vibrant colors, high contrast Eye-catching, minimal text

CSS Features (All Themes)

  • 5 responsive cards (375×500px each)
  • Custom background patterns per theme
  • Animated accents (where appropriate)
  • Comparison tables with theme-appropriate styling
  • Code blocks with syntax highlighting
  • Mobile-first design

Image Generation Prompts

Each prompt file includes:

  • Canvas specifications (375×500px)
  • Visual style (see Available Style Themes above)
  • Content layout
  • Color palette specific to theme
  • Typography notes

Examples

Example 1: Tool/Library

User: /github-to-xhs https://github.com/mvanhorn/last30days-skill

Output: 5-card XHS post about multi-source research tool
- P1: Cover with 10 platform logos
- P2: 4 core features
- P3: Algorithm pie chart
- P4: Manual vs Auto comparison
- P5: Install commands

Example 2: Framework

User: /github-to-xhs https://github.com/vercel/next.js

Output: Technical introduction with:
- Key features highlight
- Performance metrics
- Code examples
- Getting started guide

File Naming Standards

When delivering files to users, always use the following format:

Archive File: {repo-slug}-xhs-{YYYYMMDD}-v{N}.tar.gz

  • repo-slug: Repository name (e.g., hermes-agent)
  • YYYYMMDD: Current date (e.g., 20250413)
  • v{N}: Version number starting from v1 (e.g., v2 for revisions)

Example: hermes-agent-xhs-20250413-v2.tar.gz

Delivery Message Template

When sending the file, include:

  1. Filename with date and version
  2. Brief description of contents
  3. Usage instructions
文件名: {repo-slug}-xhs-{YYYYMMDD}-v{N}.tar.gz
日期: {YYYY-MM-DD}
版本: v{N}

包含:
- xiaohongshu-post.html - 5页卡片
- xiaohongshu-article.md - 正文文案
- prompts/ - AI绘图提示词

Tips

  • Title limit: Keep titles under 20 characters (XHS display limit)
  • Style selection guide:
    • Use A (Story-Driven) for: personal projects, beginner tutorials, emotional connection
    • Use B (Information-Dense) for: technical tools, libraries, frameworks
    • Use C (Visual-First) for: visual products, demos, screenshot-heavy content
    • Use D (Cyberpunk) for: AI tools, dev tools, futuristic/tech projects
    • Use E (Hand-drawn) for: education, tutorials, friendly/approachable tools
    • Use F (Dark Pro) for: enterprise SaaS, business tools, premium products
  • Always check if user has preferences for style/layout
  • The HTML output can be screenshot for XHS posting
  • Mix and match: You can combine elements from different styles
安全使用建议
This skill is internally consistent and doesn't ask for credentials, but note: (1) the SKILL.md assumes the agent will fetch README content, while the included Python helper mostly generates templates and leaves TODOs — you should verify the implementation if you expect automatic README parsing. (2) The script writes files under /root/.openclaw/workspace — ensure that path is acceptable on your system. (3) Review any generated image prompts or outputs before publishing (they could include repo content you don't want publicly posted). If you plan to run the Python script, inspect it and any further code added to confirm no unexpected network calls or shell executions are introduced.
功能分析
Type: OpenClaw Skill Name: github-to-xhs Version: 1.1.1 The github-to-xhs skill bundle is a legitimate tool designed to automate the creation of Xiaohongshu social media content from GitHub repositories. The Python script (scripts/github-to-xhs.py) functions as a template generator, creating a structured workspace and populating it with markdown and HTML templates for various visual styles (e.g., Cyberpunk, Notion, Professional). The instructions in SKILL.md guide the agent through a logical workflow of fetching repository data, performing analysis, and generating user-selected content without any evidence of malicious intent, data exfiltration, or unauthorized command execution.
能力评估
Purpose & Capability
Name/description match the implementation: the skill generates analysis, multiple outline strategies, prompts, and an HTML output from a GitHub repo. It does not request unrelated credentials or binaries.
Instruction Scope
SKILL.md tells the agent to fetch README via web_fetch and then produce content; the included Python script creates directory structure and template files but contains many TODO placeholders and does not actually fetch or parse remote README/contents (so the runtime behavior described in prose is partially unimplemented). This is a functional mismatch, not a security issue.
Install Mechanism
No install spec is present (instruction-only + a helper script). Nothing is downloaded from external URLs and no archive extraction is declared.
Credentials
No environment variables or secrets are required. The script writes outputs under /root/.openclaw/workspace/xhs-images/{slug} — this is a workspace path but uses /root; users should confirm that writing there is acceptable in their environment.
Persistence & Privilege
always:false and default invocation settings; the skill only writes files into its workspace and (per SKILL.md) packages a tar.gz — it does not request permanent platform-level privileges or modify other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install github-to-xhs
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /github-to-xhs 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
Add file naming convention with timestamp and version
v1.1.0
Add 3 new visual styles: Cyberpunk Tech, Warm Hand-drawn, Dark Professional. Total 6 style options now.
v1.0.1
Add 20 character title limit constraint for XHS compatibility
v1.0.0
Initial release: Analyze GitHub repos and generate XHS infographic content
元数据
Slug github-to-xhs
版本 1.1.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 4
常见问题

GitHub to Xiaohongshu 是什么?

Analyze a GitHub repository and generate Xiaohongshu (Little Red Book) infographic posts. Use when the user wants to create social media content about a GitH... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 168 次。

如何安装 GitHub to Xiaohongshu?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install github-to-xhs」即可一键安装,无需额外配置。

GitHub to Xiaohongshu 是免费的吗?

是的,GitHub to Xiaohongshu 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

GitHub to Xiaohongshu 支持哪些平台?

GitHub to Xiaohongshu 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 GitHub to Xiaohongshu?

由 laojun(@laojun509)开发并维护,当前版本 v1.1.1。

💬 留言讨论