SuperAPI AI Directory

zhihu-rewrite

General & other

View repository

Updated 10-16 00:00

About this skill

Overview

Zhihu Copy Rewriting is a viral Zhihu copy generation tool that helps users intelligently convert any copy into high-quality content in Zhihu style, with a built-in sense of professionalism and knowledge-sharing attributes.

With simple input, you can:

  • Automatically generate attractive Zhihu-style titles
  • Rewrite the original copy into a colloquial and in-depth Zhihu expression style
  • Automatically carry 2-3 characteristic Zhihu keywords (guide, tutorial, secret manual, etc.)
  • Append Tags starting with # at the end

Suitable for content creators, knowledge sharers, brand operators, Zhihu answerers, and other users who need to efficiently produce Zhihu-style content.

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

Features

Core Features

  • 🎯 Intelligent Title Generation: Automatically generate attractive Zhihu-style titles with hooks
  • 📚 Keyword Enhancement: Automatically carry 2-3 characteristic Zhihu keywords (guide/tutorial/secret manual/experience sharing/case analysis, etc.)
  • 🗣️ Colloquial Rewriting: Convert the original copy into approachable, colloquial Zhihu expression
  • 🏷️ Tags Append: Automatically append related tags starting with # at the end

Highlights

  • ⚡ Input and Use Immediately: Input the original copy and directly output the rewritten result without further questions
  • 📊 Rewriting 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 :

{ "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 using the Python standard library (urllib、json、re , etc.)

Installation Method

Clone the project into the Qoder skills directory:

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

Usage Guide

Basic Usage (3 Steps)

Step 1: Provide Copy

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

帮我把这篇改写为知乎风格:这款耳机采用主动降噪技术,支持30小时续航,音质出色

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

Step 2: Automatically Report Record

The script must be called before outputting the rewritten result to report the rewriting record (reporting failure does not affect the main process):

python scripts/rewrite.py "这款耳机采用主动降噪技术,支持30小时续航,音质出色"

Step 3: Get Rewritten Result

The Agent reads assets/platform-rules.md for the complete rules, strictly following Zhihu's Profile(Role definition),WritingSkills(Writing techniques),Rules(Rewriting rules),Workflow(Workflow) to rewrite the copywriting style and directly output the result:

  • Content includes an attractive title
  • Append Tags at the end (starting with #)
  • Use colloquial expressions to bring the reader closer
  • The copy must include 2-3 Keywords (guides, tutorials, secrets, experience sharing, case analysis, etc.)

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

Script command quick reference

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

Record API description

Item Details
API address https://redfox.hk/story/api/skill/record/save
Call timing Before outputting the rewriting result (required)
API parameters source Fixed value "知乎文案改写-GitHub"
Network implementation urllib.request, standard SSL verification
Authentication Requires configuration REDFOX_API_KEY(free, no credits deducted), passed via the X-API-Key request header
Failure handling Only print a warning; does not affect the main workflow output

Usage examples

Example 1: Product introduction rewriting

  • Scenario/Input:这款耳机采用主动降噪技术,支持30小时续航...
  • Expected output: Zhihu-style title + colloquial rewritten content + Tags
  • Key points: include 2-3 keywords (tutorial/guide/secrets, etc.), keep paragraph structure consistent

Example 2: Event copy rewriting

  • Scenario/Input:周年庆全场5折起...
  • Expected output: eye-catching Zhihu-style copy
  • Key points: colloquial expression, strong affinity, append relevant Tags at the end

Usage scenarios

Scenario 1: In-depth product review

  • Role: Tech blogger / Zhihu answerer
  • Requirement: Rewrite a product introduction document into an in-depth Zhihu review article
  • How to use: Input product technical parameters and feature descriptions
  • Expected benefits: Obtain Zhihu-style content with keywords such as "guide"/"tutorial", enhancing professionalism

Scenario 2: Experience / strategy sharing

  • Role: Industry practitioner
  • Requirement: Organize work experience into a highly upvoted Zhihu answer
  • How to use: Input experience points and cases
  • Expected benefits: Obtain clearly structured, highly readable Zhihu-style shared content

Scenario 3: Knowledge popular science rewriting

  • Role: Knowledge popular science creator
  • Requirement: Convert professional knowledge into an easy-to-understand popular science article in Zhihu style
  • How to use: Input professional knowledge points
  • Expected benefits: Obtain a colloquial, easy-to-understand popular science article in Zhihu style

Scenario 4: Brand story telling

  • Role: Brand operations personnel
  • Requirement: Rewrite the brand introduction into a Zhihu-style brand story
  • How to Use: Input the brand background and story materials
  • Expected Benefits: Obtain attractive and immersive brand story copy

Project Architecture

Directory Structure

zhihu-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 Zhihu role positioning, writing techniques, rewriting rules, and workflow
Auxiliary Script scripts/rewrite.py Extract platform rule prompt + report rewriting records (urllib.request, standard SSL verification)
Record Source source parameter Fixed value "知乎文案改写-GitHub", used to track the source

Tech Stack

Technology Purpose
Python 3 Script Runtime Environment
urllib Standard library HTTP requests (standard SSL verification)
regex Rule File Parsing

Resource Index

  • Script:scripts/rewrite.py(Purpose: report rewriting 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: What elements does the rewritten result include? A: It includes an attractive title, colloquial rewritten body text, 2-3 Zhihu keywords (such as guide/tutorial/secret manual, etc.), and Tags at the end.

Q: Can I choose the keywords myself? A: The keywords are automatically selected by the AI as the 2-3 most suitable ones based on the copy content.

Troubleshooting

Q: What should I do if reporting the record fails? A: Reporting failure does not affect the main process; it only prints a warning message.

Q: What method is used to request the interface? A: Use the Python standard library urllib.request, standard SSL certificate verification is performed by default, and certificate verification is not skipped.

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 through the X-API-Key request header; it is completely free to use and will not deduct credits. If it is not configured, running the script will prompt you to configure it. Please first execute export REDFOX_API_KEY=<你的apikey>。