SuperAPI AI Directory

xiaohongshu-rewrite

Writing & research

View repository

Updated 10-15 23:41

About this skill

Overview

Xiaohongshu Copy Rewriting is a viral Xiaohongshu copy generation tool that helps users intelligently convert any copy into high-engagement content that matches the tone of the Xiaohongshu platform.

With simple input, you can:

  • Automatically generate attractive Xiaohongshu-style titles
  • Add at least 5 non-repeating emoji symbols to the copy
  • Automatically append Tags starting with #

Suitable for content creators, brand operators, MCN agencies, Xiaohongshu bloggers, and other users who need to efficiently produce Xiaohongshu-style content.

Technical foundation: implemented based on the Python standard library, rewriting copy through AI models according to Xiaohongshu platform rules.

Features

Core Features

  • 🎯 Smart Title Generation: Automatically generate attractive Xiaohongshu-style titles with hooks
  • 😊 Emoji Polishing: Automatically add at least 5 non-repeating emoji symbols to the copy
  • 🏷️ Tags Appending: Automatically append related tags starting with # at the end
  • 📝 Style Conversion: Convert any copy into a colloquial, friendly, and natural Xiaohongshu expression style

Highlights

  • ⚡ Instant Input and Use: Input the original copy and directly output the rewritten result without asking
  • 📊 Rewrite Record Reporting: Call the RedFox API to automatically record the number of rewrites
  • 🔧 Customizable Rules: Customize rewriting rules through assets/platform-rules.md custom rewriting rules

🔑 Authentication

Get API Key

Please go to RedFox hub to get the API KEY

Configure API Key

Option 1: Taking Qoder as an example, add REDFOX_API_KEY to ~/.openclaw/openclaw.json in:

{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }

Option 2: Terminal configuration

export REDFOX_API_KEY="ak_xxxx..."

💡 Note: This skill only requires you to provide an API Key for identity recognition. It is completely free to use and will not deduct any points. If REDFOX_API_KEYhas not been configured yet, running the script will prompt you to configure it. Follow the steps above to use it normally.

One-click Installation

Prerequisites

  • Python 3 (path:/usr/bin/python3)
  • No additional dependencies, only uses the Python standard library (urllib、json、re etc.)

Installation Method

Just clone the project into the Qoder skills directory:

git clone <repo-url> ~/.qoder/skills/xiaohongshu-rewrite

Usage Guide

Basic Usage (3 Steps)

Step 1: Provide Copy

Provide the Agent with the copy content that needs to be rewritten into Xiaohongshu style:

帮我改写这篇小红书文案:这款面霜保湿效果很好,用了一周皮肤明显变水润了

The copy can include various types of content such as product introductions, usage experiences, and guide sharing.

Step 2: Automatically Report Record

The script automatically reports the rewrite record to the recording interface (the rewrite output is performed only after successful reporting; reporting failure does not affect the main process):

python scripts/rewrite.py "这款面霜保湿效果很好,用了一周皮肤明显变水润了"

Step 3: Get the Rewritten Result

The Agent reads assets/platform-rules.md the complete rules in, strictly following Xiaohongshu's Profile(role positioning),WritingSkills(writing techniques),Rules(rewriting rules),Workflow(workflow) to rewrite the copy style, and directly outputs the result:

  • The content includes an attractive title
  • Use emoji in the text (at least 5 non-repeating emoji)
  • Append Tags at the end (starting with #)
  • Use colloquial expressions to shorten the distance from readers

After output is complete, do not ask the user whether adjustments are needed.

Script Command Quick Reference

Command Description
python scripts/rewrite.py prompt Output the Xiaohongshu rewriting rules prompt
python scripts/rewrite.py "<文案内容>" Report rewriting records

Record API Description

Item Details
API URL https://redfox.hk/story/api/skill/record/save
Call Timing Before outputting the rewriting result
API Parameters source Fixed value "小红书文案改写-GitHub"
Network Implementation Native urllib, default SSL certificate verification
Authentication Requires configuring REDFOX_API_KEY(free, no points deducted), passed via the X-API-Key request header
Failure Handling Only prints a warning, does not affect the main process output

Use Cases

Scenario 1: Product marketing copy rewriting

  • Role: E-commerce operations
  • Need: Convert boring product manuals into Xiaohongshu recommendation posts
  • How to Use: Input product selling points and feature introduction copy
  • Expected Benefits: Get a recommendation note with emoji and tags, improving content exposure and conversion

Scenario 2: Personal experience sharing

  • Role: Xiaohongshu blogger
  • Need: Organize daily usage experiences into attractive Xiaohongshu notes
  • How to Use: Input a description of personal usage experience
  • Expected Benefits: Get clearly structured, hook-driven Xiaohongshu-style copy

Scenario 3: Event promotion copy

  • Role: Brand marketing staff
  • Need: Rewrite promotional event information into viral Xiaohongshu copy
  • How to Use: Input event content, discount information, etc.
  • Expected Benefits: Generate event promotion notes that attract users to click and participate

Scenario 4: Cold start for new bloggers

  • Role: Content creator newly joining Xiaohongshu
  • Need: Quickly master the viral writing style of Xiaohongshu and lower the creation threshold
  • How to Use: Input the topic or key information you want to express
  • Expected Benefits: Get copy references that match the platform's tone and accelerate account growth

Project Architecture

Directory Structure

xiaohongshu-rewrite/
├── SKILL.md                   # 本文件
├── README.md                  # 用户文档(中文)
├── README.en.md               # 用户文档(英文)
├── assets/
│   └── platform-rules.md      # 小红书改写规则(Profile、WritingSkills、Rules、Workflow)
└── scripts/
    └── rewrite.py             # 辅助脚本(规则提取 + 记录上报)

Core Module Description

Module File Description
Rewriting Rules assets/platform-rules.md Define the Xiaohongshu role positioning, writing techniques, rewriting rules, and workflow
Auxiliary Script scripts/rewrite.py Extract platform rules prompt + report rewriting records to the RedFox API (native urllib, default SSL verification)
Record Source source parameter Fixed value "小红书文案改写-GitHub", used for statistical sources

Tech Stack

Technology Purpose
Python 3 Script Runtime Environment
urllib Native HTTP Requests (record reporting)
regex Rule File Parsing

Resource Index

  • Script:scripts/rewrite.py(Purpose: report rewrite records; Parameters:prompt / <文案内容>)
  • Reference:assets/platform-rules.md(When to read: when performing copy rewriting)

FAQ

Installation Related

Q: What dependencies need to be installed? A: No additional installation is required; only the Python standard library is used.

Q: What is the Python version requirement? A: Python 3.x, the script uses by default /usr/bin/python3。

Usage Related

Q: Can the rewritten result be adjusted? A: After rewriting is completed, the result is output directly; no secondary adjustments are provided. If you are not satisfied, you can resubmit the copy.

Q: Must the output include emoji? A: Yes, Xiaohongshu copy must include at least 5 unique emoji symbols.

Troubleshooting

Q: What should I do if reporting records fails? A: Reporting failure does not affect the main process; it only prints a warning message, and the rewritten result is output as usual.

Q: What should I do if the rule file cannot be found? A: Confirm that the assets/platform-rules.md file exists and the path is correct.

Security and License

Q: Does the reporting interface require an API Key? A: Yes. The script reads the Key from the environment variable REDFOX_API_KEY and passes it to the interface via the X-API-Key request header; usage is completely free and will not deduct points. If it is not configured, running the script will prompt you to configure it; please first execute export REDFOX_API_KEY=<你的apikey>。