SuperAPI AI Directory

README-writer

Writing & research

View repository

Updated 10-15 23:59

About this skill

README Writer - Project Documentation Generator

📝 Generate professional README.md documentation for local projects or GitHub projects

Uses an interactive workflow: automatically collect information → user confirmation → generate table of contents → user confirmation → generate README → iterative optimization


🎯 When to Use (Trigger Scenarios)

✅ Use this skill when the user says:

Scenario Example
Local project "Write a README for this project: ~/.openclaw/skills/my-project"
GitHub project "Write a README for https://github.com/user/repo "
Skill project "Write a README for easy-image-generate"
Optimize existing "Optimize this project's README"
Specify style "Write a README in the style of skill-rembg"

❌ Do not use this skill for:

  • Code review → use code analysis tools
  • Project deployment → use deployment/CI/CD tools
  • Troubleshooting → use debugging tools

🔄 Interactive Workflow

Complete workflow (11 steps)

  1. User input (local path or URL)
  2. Automatically collect project information
  3. Display information, user confirms/modifies
  4. Ask about README purpose and style preferences
  5. Generate suggested table of contents structure
  6. User confirms/adjusts table of contents
  7. 💬 Optional section inquiry (acknowledgments/contributing/changelog)
  8. Generate README draft
  9. Quality check + user feedback
  10. Iterative optimization (can be multiple times)
  11. Final version + backup

📊 Step 1: Project Information Collection

Local project

Automatically read:

  • package.json → project name, description, version, scripts
  • requirements.txt → Python dependencies
  • pyproject.toml → Python project configuration
  • Cargo.toml → Rust project
  • Main language files (.py/.js/.ts/.rs, etc.)
  • Directory structure (scripts/ docs/ tests/)
  • Existing README (if any)

Display for user confirmation:

📊 Detected project information:

Basic information:

  • Project name: [automatically extracted]
  • Version: [automatically extracted]
  • Description: [automatically extracted]
  • Main language: [automatically extracted]

Project type: [automatically identified]

Core features: [automatically analyzed]

Is the above information correct? Does anything need to be added or modified?


🎯 Step 2: Ask About README Purpose

Inquiry template:

🎯 Who is the main audience for this README?

A. Potential users - Quickly understand the project's purpose B. Developers - Want to contribute code C. Both(Recommended)

📝 What content do you want to highlight?

A. Quick start - Installation + usage examples B. Features - Detailed feature list C. API documentation - Technical details D. Project background - Why this project was created

🎨 Documentation style preference?

A. Concise and professional - Like the requests library B. Lively and friendly - Like skill-rembg (emoji + bilingual) C. Detailed and complete - Like a large framework


📑 Step 3: Generate directory structure

Generate a suggested directory structure based on the project type and preferences, and continue after the user confirms.


💬 Step 3.5: Optional section inquiry

Sections that must be asked about:

📝 Do you need to add the following sections?

1️⃣ Acknowledgements section (🙏 Acknowledgements)

Thank contributors, tools, or platforms used

Please reply:

  • "Yes, acknowledgements: OpenClaw, ClawHub"
  • "No, not needed"

2️⃣ Contributing guide (🤝 Contributing)

How to contribute code to the project

Please reply:

  • "Yes, it is an open source project"
  • "No, it is a personal project"

3️⃣ Changelog (📝 Changelog)

Project version history

Please reply:

  • "Yes, there are multiple versions"
  • "No, it is the initial version"

Rules:

  • ✅ Must ask first, then generate
  • ✅ If the user says "no", do not generate that section
  • ✅ If the user says "yes", list the specific content

✍️ Step 4: Generate README draft

Generation rules

0. Badge area (after the project introduction)

🎨 Use a multi-line professional layout (rich and complete; users can manually simplify it):

<!-- Badge Row 1: Core Info - 项目身份 -->
[![ClawHub](https://img.shields.io/badge/ClawHub-skill--name-E75C46?logo=clawhub)](https://clawhub.ai/author/skill)
[![GitHub](https://img.shields.io/badge/GitHub-author-181717?logo=github)](https://github.com/author/repo)
[![Version](https://img.shields.io/badge/version-0.0.1-orange)](https://github.com/author/repo)

<!-- Badge Row 2: Package Registry - 包管理器(如已发布) -->
[![npm](https://img.shields.io/npm/v/package-name?color=CB3837&logo=npm)](https://npmjs.com/package/package-name)
[![PyPI](https://img.shields.io/pypi/v/package-name?color=3776AB&logo=pypi)](https://pypi.org/project/package-name)

<!-- Badge Row 3: Tech Stack - 技术栈/语言版本 -->
[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-339D35?logo=node.js)](https://nodejs.org)
[![Python](https://img.shields.io/badge/Python-3.8%2B-3776AB?logo=python)](https://python.org)
[![Rust](https://img.shields.io/badge/Rust-2021%20Edition-DEA584?logo=rust)](https://rust-lang.org)

<!-- Badge Row 4: Platforms - 平台支持 -->
[![macOS](https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=white)](https://openclaw.ai) 
[![Windows](https://img.shields.io/badge/Windows-0078D6?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4OCA4OCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGgzOXYzOUgweiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik00OSAwaDM5djM5SDQ5eiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDQ5aDM5djM5SDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTQ5IDQ5aDM5djM5SDQ5eiIvPjwvc3ZnPg==)](https://openclaw.ai) 
[![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black)](https://openclaw.ai)
[![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white)](https://openclaw.ai)
[![iOS](https://img.shields.io/badge/iOS-000000?logo=apple&logoColor=white)](https://openclaw.ai)
[![Web](https://img.shields.io/badge/Web-4285F4?logo=google-chrome&logoColor=white)](https://openclaw.ai)

<!-- Badge Row 5: License - 许可证 -->
[![License](https://img.shields.io/badge/License-MIT-BD2D2D)](LICENSE)

💡 Design philosophy:

  • ✅ Rich and complete badges - Generate all possible badges; users can manually delete unwanted ones
  • ✅ Flexible URL handling - Use actual links when they can be determined, and Demo placeholders when they cannot
  • ✅ No personal information - All Demos use generic placeholders (author、repo、skill-name)
  • ✅ Use Base64 on Windows - Avoid image link failures

📋 Dynamic badge generation rules

Row 1: Core information badges (project identity)

1. ClawHub Badge

  • Condition: Detected as an OpenClaw Skill (has SKILL.md)
  • Format:[![ClawHub](https://img.shields.io/badge/ClawHub-{skill-name}-E75C46?logo=clawhub)](https://clawhub.ai/author/skill)
  • skill-name: Read from the name field in SKILL.md, converted to kebab-case
  • Link: Use the Demo placeholder https://clawhub.ai/author/skill

2. GitHub Badge

  • Condition: The user provided a GitHub URL or a .git directory was detected
  • Format:[![GitHub](https://img.shields.io/badge/GitHub-{author}-181717?logo=github)](https://github.com/author/repo)
  • author/repo: Extract from the Git remote repository or package.json
  • Link: If it cannot be extracted, use the Demo placeholder https://github.com/author/repo

3. Version Badge (must be generated)

  • Read priority:
    1. package.json → version
    2. pyproject.toml → version
    3. Cargo.toml → version
    4. pom.xml → version
    5. composer.json → version
    6. Default:0.0.1
  • Format:[![Version](https://img.shields.io/badge/version-{version}-orange)](链接)
  • Link: Use the project homepage or a Demo placeholder

Row 2: Package Manager Badge (if published)

Generate the corresponding package manager Badge based on the project type:

Project Type Badge Link
npm package [![npm](https://img.shields.io/npm/v/package-name?color=CB3837&logo=npm)](https://npmjs.com/package/package-name) npmjs.com
Python package [![PyPI](https://img.shields.io/pypi/v/package-name?color=3776AB&logo=pypi)](https://pypi.org/project/package-name) pypi.org
Ruby Gem [![Gem](https://img.shields.io/gem/v/gem-name?color=E9563D&logo=ruby)](https://rubygems.org/gems/gem-name) rubygems.org
Go Module [![Go](https://img.shields.io/badge/go.mod-v1.20-00ADD8?logo=go)](https://pkg.go.dev/module/path) pkg.go.dev
Maven [![Maven](https://img.shields.io/maven-central/v/group/artifact?color=E43C3C&logo=apache-maven)](https://search.maven.org) search.maven.org

Link handling: If the actual package name cannot be obtained, use a Demo placeholder


Row 3: Tech Stack/Language Version Badge

Automatically read the project configuration to generate:

Node.js project(read package.json → engines.node):

[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-339D35?logo=node.js)](https://nodejs.org)

Python project(read pyproject.toml or setup.py → python_requires):

[![Python](https://img.shields.io/badge/Python-3.8%2B-3776AB?logo=python)](https://python.org)

Rust project(read Cargo.toml → edition):

[![Rust](https://img.shields.io/badge/Rust-2021%20Edition-DEA584?logo=rust)](https://rust-lang.org)

Go project(read go.mod → go version):

[![Go](https://img.shields.io/badge/Go-1.20-00ADD8?logo=go)](https://go.dev)

PHP project(read composer.json → require.php):

[![PHP](https://img.shields.io/badge/PHP-%3E%3D8.0-777BB4?logo=php)](https://php.net)

Link handling: Use official documentation links or Demo placeholders


Row 4: Platform Badge (generate all, users can trim)

Generate all platform Badges by default, users can manually delete them according to the actual situation:

[![macOS](https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=white)](https://openclaw.ai) 
[![Windows](https://img.shields.io/badge/Windows-0078D6?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4OCA4OCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGgzOXYzOUgweiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik00OSAwaDM5djM5SDQ5eiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDQ5aDM5djM5SDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTQ5IDQ5aDM5djM5SDQ5eiIvPjwvc3ZnPg==)](https://openclaw.ai) 
[![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black)](https://openclaw.ai)
[![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white)](https://openclaw.ai)
[![iOS](https://img.shields.io/badge/iOS-000000?logo=apple&logoColor=white)](https://openclaw.ai)
[![Web](https://img.shields.io/badge/Web-4285F4?logo=google-chrome&logoColor=white)](https://openclaw.ai)

Color specification:

  • macOS: #000000(black)
  • Windows: #0078D6(blue) + Base64 SVG Logo
  • Linux: #FCC624(yellow)
  • Android: #3DDC84(green)
  • iOS: #000000(black)
  • Web: #4285F4(blue)

Link handling: Use Demo placeholder https://openclaw.ai


Row 5: License Badge

Read priority:

  1. package.json → license
  2. pyproject.toml → license
  3. Cargo.toml → license
  4. LICENSE / LICENSE.md / LICENSE.txt filename
  5. Default:MIT

License color mapping:

  • MIT: #BD2D2D(red)
  • Apache-2.0: #D54D2D(orange-red)
  • GPL-3.0: #FF7A00(orange)
  • BSD-3-Clause: #3B82F6(blue)
  • ISC: #10B981(green)
  • Unlicense: #6B7280(gray)
  • Other:#6B7280(gray)

Format:[![License](https://img.shields.io/badge/License-{LICENSE}-{COLOR})](LICENSE)

Link handling: Point to the LICENSE file (if it does not exist, users can modify it manually)


✅ Badge generation example (complete version)

Example: Node.js project (complete Badge display)

<!-- Badge Row 1: Core Info -->
[![ClawHub](https://img.shields.io/badge/ClawHub-project--name-E75C46?logo=clawhub)](https://clawhub.ai/author/project)
[![GitHub](https://img.shields.io/badge/GitHub-author-181717?logo=github)](https://github.com/author/repo)
[![Version](https://img.shields.io/badge/version-1.0.0-orange)](https://github.com/author/repo)

<!-- Badge Row 2: Package Registry -->
[![npm](https://img.shields.io/npm/v/package-name?color=CB3837&logo=npm)](https://npmjs.com/package/package-name)

<!-- Badge Row 3: Tech Stack -->
[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-339D35?logo=node.js)](https://nodejs.org)

<!-- Badge Row 4: Platforms -->
[![macOS](https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=white)](https://openclaw.ai) 
[![Windows](https://img.shields.io/badge/Windows-0078D6?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4OCA4OCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGgzOXYzOUgweiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik00OSAwaDM5djM5SDQ5eiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDQ5aDM5djM5SDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTQ5IDQ5aDM5djM5SDQ5eiIvPjwvc3ZnPg==)](https://openclaw.ai) 
[![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black)](https://openclaw.ai)
[![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white)](https://openclaw.ai)
[![iOS](https://img.shields.io/badge/iOS-000000?logo=apple&logoColor=white)](https://openclaw.ai)
[![Web](https://img.shields.io/badge/Web-4285F4?logo=google-chrome&logoColor=white)](https://openclaw.ai)

<!-- Badge Row 5: License -->
[![License](https://img.shields.io/badge/License-MIT-BD2D2D)](LICENSE)

💡 Prompt the user: Add a note at the end of the README:

> 💡 **Badge 说明**:以上 Badge 为自动生成,如与实际不符可手动删除或修改。

⚠️ Badge generation rule summary

  • ✅ Must use HTML comments for line breaks(<!-- Badge Row X: ... -->)
  • ✅ Badges rich and complete - Generate all possible Badges, users can manually trim
  • ✅ Version Badge must be generated(use 0.0.1 when there is no version number)
  • ✅ Generate all platform Badges(macOS/Windows/Linux/Android/iOS/Web)
  • ✅ Windows uses Base64 SVG Logo(to avoid image link failure)
  • ✅ Generate License Badge based on the actual License(defaults to MIT when none)
  • ✅ Flexible URL handling - Use the actual link when it can be determined, otherwise use a Demo placeholder
  • ✅ No personal information - All Demos use generic placeholders (author、repo、skill-name)
  • ✅ Unified colors(use shields.io standard colors)
  • ✅ Placement: After the project description, before the table of contents

1. Chinese-English bilingual rules

Chinese part:

  • Complete project introduction
  • All section content
  • All code examples

English Version:

  • ✅ Must be fully translatedAll sections
  • ✅ Comments and output in code examples must be in English
  • ✅ Table of contents links must correspond to English anchors
  • ✅ Content length and information volume must match the Chinese
  • ✅ The English part must have an independent Table of Contents
  • ✅ The number of English TOC entries must match the Chinese

Section correspondence rules:

  • Chinese uses ## to mark main sections
  • English uses ### to mark main sections
  • English TOC uses ### Table of Contents
  • Chinese code blocks use ``` markers
  • English code blocks use ``` markers

2. Code block format

All code blocks use ``` markers

Format:

代码内容

Rules:

  • ✅ Code blocks must specify a language
  • ✅ Do not use ~~~ markers
  • ✅ Do not have extra ```

3. Optional sections

Generate according to the user confirmation result in step 3.5:

  • Acknowledgements section (if the user confirms it is needed)
  • Contribution guide (if the user confirms it is needed)
  • Changelog (if the user confirms it is needed)

4. Other rules

  • Emoji markers - Use moderately to enhance readability
  • Code examples - At least 3 practical examples
  • Table presentation - Use tables for parameters, configuration, etc.
  • Quality check - Automatically check after generation

🔄 Step 5: Iterative optimization

Support multiple iterations and modify the README based on user feedback.


📋 Special scenario handling

Scenario 1: Existing README

⚠️ Existing README.md detected

Options: A. Completely rewrite (overwrite existing) B. Optimize based on existing (keep structure, improve content) C. Generate a new version (README.new.md)

Scenario 2: Multilingual project

🌍 Multilingual project detected

Suggestions: A. Generate separate README_CN.md and README_EN.md B. Split into sections in the main README (中文 | English)

Scenario 3: Large project

📊 Large project detected (>50 files)

Suggestions:

  • README.md (introduction + quick start)
  • docs/ directory (detailed documentation)

🎨 README style guide

Core principles

  1. Clear structure - Mark sections with emoji, with distinct hierarchy
  2. Bilingual Chinese-English - Default Chinese + English version,complete and consistent content
  3. Practicality first - Adjust according to project type
  4. Flexible expression - Organize freely according to project characteristics

Project type-specific content

Project type Unique sections Description
Python Dependency installation, virtual environment, PyPI publishing requirements.txt, setup.py
Frontend Tech stack, build commands, deployment guide package.json, npm scripts
API service Endpoint list, request examples, authentication method REST/GraphQL, curl examples
CLI tools Command-line arguments, subcommands, configuration options Parameter descriptions, usage examples
Libraries/SDKs API reference, type definitions, version compatibility Function/class descriptions, type hints
OpenClaw Skill Trigger words, use cases, configuration SKILL.md content extraction

✅ Quality Checklist

Automatically check after generating the README:

Basic checks

  • Project introduction is clear (1-2 sentences)
  • Installation steps are complete and executable
  • At least 3 usage examples
  • Feature list (3-5 items)
  • Table of contents navigation is correct (if >100 lines)
  • Code blocks specify the language
  • Links are valid
  • License is clear

Chinese-English bilingual check

  • Chinese content is complete
  • English version fully translates all sections
  • English table of contents links are correct (anchors use English)
  • Comments in English code examples are translated
  • English content length matches the Chinese
  • The English part has its own Table of Contents
  • Number of English TOC entries matches the Chinese table of contents

Optional section checks

  • Acknowledgements section has been asked about with the user(yes/no)
  • Contribution guidelines have been asked about (needed/not needed)
  • Changelog has been asked about (needed/not needed)

Badge check (new)

  • Badge area after the project description
  • Use a 3-line layout(core information + platform + license)
  • Use HTML comments for line breaks(<!-- Badge Row X: ... -->)
  • Version Badge is generated(0.0.1 when there is no version number)
  • Platform Badge is correct(default macOS+Windows+Linux, or as specified by the user)
  • License Badge is correct(based on the actual License or default MIT)
  • Every Badge has a link
  • Colors conform to the standard(use standard shields.io colors)

Code block checks

  • Code blocks use ``` markers (no ~~~)
  • No extra ```

Prohibited items

  • ❌ Do not automatically generate the acknowledgements section(must ask first)
  • ❌ Do not omit content from the English version
  • ❌ Do not use Chinese anchors to generate the English table of contents
  • ❌ The English part must not lack a Table of Contents
  • ❌ English TOC entries must not be inconsistent with the Chinese
  • ❌ Do not use ~~~ to mark code blocks
  • ❌ Do not generate extra ```
  • ❌ Badges must not lack Version(must use 0.0.1 when there is no version number)
  • ❌ Platform Badge must not be wrong(must be macOS+Windows+Linux when the user has not specified)
  • ❌ License must not be wrong(must read the actual License or default to MIT)
  • ❌ Badges must not lack links
  • ❌ Do not omit HTML comment line breaks

📝 Version management

Backup strategy

Back up the existing README before generating: cp README.md README.md.bak.日期

Version History

Add a changelog section at the end of the README.


🔧 Configuration Options

Language Settings

Parameter Description Default
--lang bilingual Bilingual Chinese-English ✅
--lang chinese Chinese only -
--lang english English only -

Level of Detail

Parameter Sections Suitable for
--detail minimal Introduction, Installation, Usage Small projects
--detail standard + Features, API, Contributing Medium projects (default)
--detail complete + FAQ, Benchmarks, Architecture Large projects

Style Options

Parameter Description
--style professional Concise and professional
--style friendly Lively and friendly (emoji + bilingual)
--style complete Detailed and complete

🚀 Quick Start

Basic Usage

为这个项目写 README:~/.openclaw/skills/my-project

Specify Style

为 https://github.com/user/repo 写 README,参考 skill-rembg 风格

Specify Type

为 Python 项目写 README,突出 API 文档

📄 License

MIT License


Happy Documenting! 📝✨

Top / Back to top