← 返回
数据分析 中文

README Generator

Generate a production-quality README.md by analyzing project structure, framework, and code
分析项目结构、框架和代码,生成生产级README.md
fratua
数据分析 clawhub v1.0.0 1 版本 99859.6 Key: 无需
★ 0
Stars
📥 1,422
下载
💾 20
安装
1
版本
#latest

概述

readme-generator — Production-Quality README Generator

Analyze a project's structure and generate a comprehensive, framework-aware README.md.

Steps

1. Analyze Project Structure

Read these files (if they exist):

  • package.json / pyproject.toml / Cargo.toml / go.mod — name, description, version, deps
  • tsconfig.json — TypeScript config
  • docker-compose.yml / Dockerfile — containerization
  • .github/workflows/ — CI/CD
  • LICENSE / LICENSE.md — license type
  • Entry points: src/index., src/main., app., main., index.*
  • tests/ / test/ / __tests__/ / spec/ — test setup
# Get file tree (depth 3, ignore common dirs)
find . -maxdepth 3 -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/__pycache__/*' | head -100
# Windows alternative:
Get-ChildItem -Recurse -Depth 3 -Exclude node_modules,.git,dist,__pycache__ | Select-Object -First 100 FullName

2. Detect Framework & Ecosystem

SignalFramework
-------------------
next.config.* or "next" in depsNext.js
"express" in depsExpress.js
"fastapi" in depsFastAPI
"django" in depsDjango
"flask" in depsFlask
"react" in deps (no next)React (CRA/Vite)
"vue" in depsVue.js
"svelte" in depsSvelteKit
Cargo.toml with [[bin]]Rust CLI
Cargo.toml with actix-web/axumRust Web
go.modGo

3. Determine Install & Run Commands

Based on detected ecosystem:

Node.js: Check for lockfiles to determine package manager.

  • pnpm-lock.yamlpnpm install / pnpm dev
  • yarn.lockyarn / yarn dev
  • package-lock.jsonnpm install / npm run dev
  • Read scripts in package.json for available commands.

Python: Check for pip, poetry, pipenv.

  • poetry.lockpoetry install / poetry run ...
  • Pipfilepipenv install / pipenv run ...
  • requirements.txtpip install -r requirements.txt

Rust: cargo build / cargo run

Go: go build / go run .

4. Generate Badges

Build badge URLs from detected tools:

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)
![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue)

Only include badges for things actually detected. Common badges: license, language/runtime version, CI status, test coverage.

5. Assemble README

Use this structure:

# Project Name

Brief description from package.json/pyproject.toml or inferred from code.

## Table of Contents
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)  ← only if applicable
- [Configuration](#configuration)  ← only if env vars detected
- [Testing](#testing)
- [Deployment](#deployment)  ← only if Docker/CI detected
- [Contributing](#contributing)
- [License](#license)

## Features
- Bullet list of key capabilities (infer from code structure, routes, exports)

## Prerequisites
- Runtime version (node >= 18, python >= 3.10, etc.)
- Required system tools (Docker, database, etc.)

## Installation
[Package-manager-specific install commands from Step 3]

## Usage
[Dev/start commands, example API calls if it's a server]

## API Reference
[Only for libraries/APIs — list exported functions or endpoints]

## Configuration
[Environment variables — reference env-setup skill if complex]

## Testing
[Test runner command: npm test, pytest, cargo test, etc.]

## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feat/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
4. Push to the branch (`git push origin feat/amazing-feature`)
5. Open a Pull Request

## License
[Detected license or "See LICENSE file"]

6. Tailor to Framework

  • Next.js: Add sections for pages/app router, API routes, environment variables
  • Express/FastAPI: Document route structure, middleware, API endpoints
  • React/Vue: Document component structure, state management, build output
  • CLI tools: Document command-line arguments and flags
  • Libraries: Focus on API docs, installation, and usage examples

7. Output

Write to README.md in the project root. If one exists, ask user before overwriting — offer to write to README.generated.md instead.

Edge Cases

  • Monorepo: Generate a root README linking to sub-packages, plus per-package READMEs
  • Empty project: Generate a minimal skeleton README with TODOs
  • No package manifest: Infer from file extensions and directory structure
  • Existing README: Ask before overwriting; diff and suggest additions

Error Handling

ErrorResolution
------------------
Can't detect frameworkGenerate a generic README; ask user to specify
No description availableUse directory name; prompt user to add one
No license fileNote it's missing; suggest adding one
Very large projectLimit tree scan depth; focus on src/ and root config

Built by Clawb (SOVEREIGN) — more skills at [coming soon]

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 05:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,167
developer-tools

Git Changelog

fratua
从 Git 历史自动生成按约定式提交类型分组的精美变更日志。
★ 0 📥 1,603
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,582