SuperAPI AI Directory

README-writer

Writing & research

View repository

Updated 11-02 01:29

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 refinement


🎯 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 following the skill-rembg style"

❌ 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

Full 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 refinement (multiple rounds possible)
  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 to user for confirmation:

📊 Detected project information:

Basic information:

  • Project name: [auto-extracted]
  • Version: [auto-extracted]
  • Description: [auto-extracted]
  • Main language: [auto-extracted]

Project type: [auto-identified]

Core features: [auto-analyzed]

Is the above information correct? Anything to add or modify?


🎯 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 would you like 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 only after the user confirms.


💬 Step 3.5: Optional section inquiry

Sections that must be asked about:

📝 Would you like 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's an open source project"
  • "No, it's a personal project"

3️⃣ Changelog (📝 Changelog)

Project version history

Please reply:

  • "Yes, there are multiple versions"
  • "No, it's 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 where they can be determined; use Demo placeholders where they cannot
  • ✅ No personal information - All Demos use generic placeholders (author、repo、skill-name)
  • ✅ Windows uses Base64 - Avoid broken image links

📋 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 SKILL.md's name field, converted to kebab-case
  • Link: Use Demo placeholder https://clawhub.ai/author/skill

2. GitHub Badge

  • Condition: The user provided a GitHub URL or .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 or package.json
  • Link: If it cannot be extracted, use 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 project homepage or 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 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 Badges (generate all, user can trim)

Generate all platform Badges by default, users can manually delete as needed:

[![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 LICENSE file (if it does not exist, users can modify manually)


✅ Badge generation example (full version)

Example: Node.js project (full 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)

💡 Tip for users: Add a note at the end of the README:

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

⚠️ Badge generation rules 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)
  • ✅ License Badge generated based on the actual License(default 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
  • Content of all sections
  • All code examples

English Version:

  • ✅ Must be fully translatedAll chapters
  • ✅ Comments and output in code examples must be in English
  • ✅ TOC links must correspond to English anchors
  • ✅ Content length and information volume must be consistent with the Chinese version
  • ✅ The English section must have its own independent Table of Contents
  • ✅ The number of English TOC entries must match the Chinese version

Chapter correspondence rules:

  • Chinese uses ## to mark main chapters
  • English uses ### to mark main chapters
  • 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 chapters

Generate based on the user confirmation results from step 3.5:

  • Acknowledgements section (if the user confirms it is needed)
  • Contributing 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 - Automatic 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. Complete 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 (Chinese | 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 - Emoji-marked chapters, clear hierarchy
  2. Bilingual Chinese and English - Chinese by default + English version,complete and consistent content
  3. Practicality first - Adjust according to project type
  4. Flexible and creative - Organize freely according to project characteristics

Project type-specific content

Project type Specific chapters 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 methods REST/GraphQL, curl examples
CLI tools Command-line arguments, subcommands, configuration options Parameter descriptions, usage examples
Library/SDK 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 README:

Basic Checks

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

Chinese-English Bilingual Checks

  • 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 Chinese
  • English section has an independent Table of Contents
  • Number of English TOC entries matches Chinese table of contents

Optional Section Checks

  • Asked the user about the acknowledgments section(Yes/No)
  • Asked about contribution guidelines (needed/not needed)
  • Asked about changelog (needed/not needed)

Badge Checks (New)

  • Badge area follows the project description
  • Uses 3-line layout(core info + platforms + license)
  • Uses HTML comments for line breaks(<!-- Badge Row X: ... -->)
  • Version Badge is generated(0.0.1 when no version number)
  • Platform Badge is correct(default macOS+Windows+Linux or user-specified)
  • License Badge is correct(based on actual License or default MIT)
  • Each Badge has a link
  • Colors conform to standards(use shields.io standard colors)

Code Block Checks

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

Prohibitions

  • ❌ Do not automatically generate the acknowledgments section(must ask first)
  • ❌ Do not omit content from the English version
  • ❌ Do not use Chinese anchors to generate the English table of contents
  • ❌ Do not omit the Table of Contents in the English section
  • ❌ Do not let English TOC entries differ from Chinese
  • ❌ Do not use ~~~ to mark code blocks
  • ❌ Do not generate extra ```
  • ❌ Badges must not lack Version(must use 0.0.1 when no version number)
  • ❌ Platform Badge must not be wrong(must be macOS+Windows+Linux when not specified by the user)
  • ❌ 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 generation: 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 and 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