agentleFS
dainchdainch/my-skills/readme-generator/SKILL.md

readme-generator

Skill1 starsChanged 12 days agoMITView on GitHub

从零分析项目并生成中文 README.md。当用户说「生成 README」「写 README」「创建 README」「帮我写项目文档」「给项目加个 readme」「项目说明文档」时使用此 skill。 也适用于用户说「这个项目还没有 README」「帮我补一个项目说明」等场景。

  • Reads credentials
  • Installs packages

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use book-chapter-generator, concept-classifier and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vishalsachdevSkill

    book-chapter-generator

    This skill generates a structured chapter outline for intelligent textbooks by analyzing course descriptions, learning graphs, and concept dependencies. Use this skill after the learning graph has been created and before generating chapter content, to design an optimal chapter structure that respects concept dependencies and distributes content evenly across 6-20 chapters.

    Also in 3 projects that use this

  • vishalsachdevSkill

    concept-classifier

    Create an interactive classification quiz MicroSim using p5.js where students read scenarios and classify them into the correct category from multiple choice options. Uses a data.json file for easy question editing. Ideal for teaching students to recognize patterns, identify types, or categorize examples across any subject domain.

    Also in 3 projects that use this

  • JayRHaSkill

    changelog-keeper

    Maintains a CHANGELOG.md in the Keep a Changelog format with Semantic Versioning, grouping user-facing entries under Added/Changed/Deprecated/Removed/Fixed/Security and cutting dated releases from an Unreleased section. Use this skill when the user asks to "update the changelog", "add a changelog entry", "cut a release", "bump the version", "what changed since the last release", or to create/clean up a CHANGELOG.md or release notes.

    Also in 3 projects that use this

  • ATOM00blueSkill

    error-message-explainer

    Explains errors, stack traces, exceptions, and cryptic build/runtime messages in plain language, identifies the root cause, and gives a concrete fix. Use when the user pastes an error, stack trace, traceback, panic, compiler error, or failing log and asks what it means, why it happens, or how to fix it.

    Also in 3 projects that use this

  • peopleforresterSkill

    refactoring-guide

    Safe refactoring patterns and techniques. Use when the user wants to improve code structure, reduce duplication, or make code more maintainable without changing behavior. Emphasizes incremental changes with test coverage.

    Also in 3 projects that use this

  • +7 more from vishalsachdev

The file

Files
SKILL.md

README 生成器

概述

分析项目代码、配置和文件结构,生成一份结构清晰、信息准确的中文 README.md。

核心原则:README 中的每一条信息都必须能在项目文件中找到依据。不编造功能、不推测用法、不添加项目中没有的东西。

工作流

第一步:项目侦查

在写任何内容之前,先系统性地搜集以下信息:

  1. 项目元信息
    • package.json / pyproject.toml / Cargo.toml / go.mod 等 → 项目名称、版本、描述、作者、许可证
    • README.md 如果已存在 → 提取可复用的准确信息
    • .git/config → 仓库地址
    • LICENSE → 许可证类型
  2. 技术栈识别
    • 语言和框架(从依赖和配置文件推断)
    • 构建工具(package.json scripts、Makefile、justfile 等)
    • 运行时要求(engines 字段、.nvmrc、.python-version、rust-toolchain 等)
  3. 项目结构
    • 顶层目录和关键子目录
    • 入口文件(index.js、main.py、src/main.rs、app/ 等)
    • 配置文件位置
  4. 启动与构建命令
    • package.json 的 scripts 字段
    • Makefile / justfile 中的 target
    • docker-compose.yml 或 Dockerfile
    • 环境变量文件(.env.example、.env.template)
  5. 常见问题线索(为 FAQ 部分做准备)
    • .env.example 是否存在 → 是否需要配置环境变量
    • 是否有数据库迁移脚本
    • 是否有特殊的系统依赖(从 docker 文件、文档等)
    • 常见错误处理方式(try-catch 模式、错误码等)

第二步:生成 README

使用以下结构。以下五个章节为必需,此外根据项目实际情况可酌情增加:API 文档、贡献指南、许可证、技术栈说明、部署文档、变更日志等。如果某个必需章节确实无内容可写,写"暂无"而不是编造。


# [项目名称]

> [一句话简介 — 从 package.json description 或代码推断,不超过 30 字]

## 项目介绍

[2-4 句话说明这个项目是什么、解决什么问题、主要功能。必须来源于代码/配置,不可编造。]

## 安装步骤

[基于实际发现的依赖管理工具和配置,写出可执行的安装步骤。]

### 环境要求

- [运行时和版本 — 从 engines/.nvmrc/.python-version 等获取]
- [关键系统依赖 — 从 Dockerfile/文档获取]

### 安装依赖

[具体的包管理器安装命令,如 `npm install`、`pip install -r requirements.txt`、`cargo build` 等。必须是从项目中实际找到的命令。]

### 配置

[如果存在 .env.example 或类似配置模板,说明需要配置的环境变量及其用途。不要列出项目中不存在于任何示例文件中的变量。]

## 启动命令

[列出实际可用的启动命令,按场景分组:]

### 开发模式

[从 scripts/Makefile 中找到的开发/热重载命令]

### 生产构建

[构建命令]

### Docker 启动(如适用)

[如果项目包含 docker-compose.yml 或 Dockerfile]

## 文件结构

```
[项目根]/
├── [目录或文件名]    # [根据实际文件用途写注释]
├── [目录或文件名]    # [注释]
└── ...
```

结构图必须如实反映项目的顶层文件和关键子目录。省略 `node_modules`、`.git`、`dist`、`target` 等构建产物和依赖目录。标注不超过 15 个条目,聚焦关键文件和目录。

## 常见问题

```
[基于项目实际情况,列出 3-5 个用户可能遇到的问题和解决方案。每个问题必须有真实依据(如配置缺失、特定依赖要求、常见错误模式等)。如果没有足够信息,列出 1-2 个从项目结构能推断的通用问题(如"如何配置环境变量"、"如何切换数据源"等),而不是编造不存在的场景。]

第三步:质量检查

生成后自查:

  • 五个必需章节是否齐全(可按需增加,但不可减少)
  • 安装命令是否可以实际执行(复制自项目的真实配置)
  • 文件结构图是否与实际目录一致
  • 是否有任何编造的功能描述或虚假命令
  • 项目名称是否与 package.json / 配置文件一致
  • 一句话简介是否准确且不过度承诺

特殊场景处理

已有 README 的情况

  • 如果用户说「生成 README」但已存在 README.md,先确认是覆盖还是重写
  • 如果用户说「改进 README」或「重写 README」,保留原文件中的准确信息,重新组织结构

多语言/多模块项目

  • monorepo 根目录只写整体说明,每个子包的 README 单独处理
  • 如果子包有独立的 package.json 等配置文件,说明子包结构

极小项目(单个脚本)

  • 结构图可以省略
  • 安装步骤简化
  • 但仍需包含全部五个章节

项目信息不足

  • 如果连 package.json 等元信息文件都不存在:
    • 项目名称从目录名推断,并标注「未找到项目配置文件,名称来自目录名」
    • 安装步骤写最通用的方式(如 npm install 或 pip install -r requirements.txt),并标注「请根据实际依赖管理工具调整」
    • 在输出中明确告知用户哪些信息是推断的

最小输出

生成 README 后,向用户报告:

  • 从哪些文件获取了项目信息
  • 五个章节对应的信息来源
  • 哪些内容是推断的(如有)
  • 建议:如果需要补充的内容(如缺少 .env.example、缺少许可证等)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.