readme-updater

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

README Updater

README更新器

This skill helps maintain a consistent and up-to-date
README.md
file for your repository. It automates the process of extracting information from the project's codebase to ensure documentation is always in sync with implementation.
该Skill可帮助你为代码库维护一份一致且最新的
README.md
文件。它会自动从项目代码库中提取信息,确保文档始终与实现保持同步。

Features

功能特性

  1. Project Overview Synchronization: Updates the project description and features list based on the latest implementation.
  2. Installation & Setup Tracking: Automatically detects project type (Node.js, Python, Rust, etc.) and updates setup/installation commands.
  3. Usage Examples Generator: Scrapes code examples from test suites or
    examples/
    directory and integrates them into the README.
  4. Version and Changelog Linking: Keeps the current version and links to the
    CHANGELOG.md
    updated.
  5. Dependency Visualization: Optionally generates or updates a list of main dependencies or a simple architecture overview.
  1. 项目概览同步:根据最新实现更新项目描述和功能列表。
  2. 安装与设置跟踪:自动检测项目类型(Node.js、Python、Rust等)并更新设置/安装命令。
  3. 使用示例生成:从测试套件或
    examples/
    目录中提取代码示例,并将其整合到README中。
  4. 版本与变更日志关联:保持当前版本信息以及指向
    CHANGELOG.md
    的链接为最新状态。
  5. 依赖关系可视化:可选择生成或更新主要依赖列表,或简单的架构概览。

Workflow

工作流程

1. Analyze the Workspace

1. 分析工作区

Before updating, the agent must gather context about the project's current state.
  • Check root files: Look for
    package.json
    ,
    requirements.txt
    ,
    Cargo.toml
    ,
    go.mod
    , etc.
  • Determine project type: Identify the primary language and frameworks used.
  • Locate entry points: Find the main script or binary that users will interact with.
在更新之前,Agent需要收集项目当前状态的相关信息。
  • 检查根目录文件:查找
    package.json
    requirements.txt
    Cargo.toml
    go.mod
    等文件。
  • 确定项目类型:识别所使用的主要语言和框架。
  • 定位入口点:找到用户将与之交互的主脚本或二进制文件。

2. Update the README.md

2. 更新README.md

A. If
README.md
does not exist:

A. 若
README.md
不存在:

Create a new
README.md
using the Standard Template.
使用标准模板创建新的
README.md

B. If
README.md
exists:

B. 若
README.md
已存在:

Analyze the current contents and identify sections that need updates.
  1. Use search tools to find markers or specific headers (e.g.,
    # Installation
    ,
    # Usage
    ).
  2. Propose changes that reflect the latest version or new features.
  3. Maintain existing information that isn't automatically derivable.
分析当前内容,确定需要更新的部分。
  1. 使用搜索工具查找标记或特定标题(例如
    # Installation
    # Usage
    )。
  2. 提出反映最新版本或新功能的变更建议。
  3. 保留无法自动推导的现有信息。

3. Verification

3. 验证

Always verify the README's correctness after an update:
  • Check that links are valid and pointing to the correct files.
  • Ensure commands are correct and up-to-date.
  • Validate that the tone remains consistent with the rest of the documentation.
更新完成后,务必验证README的正确性:
  • 检查链接是否有效且指向正确的文件。
  • 确保命令正确且为最新版本。
  • 验证语气是否与其他文档保持一致。

Output Format Example

输出格式示例

When the skill completes an update, it should provide a summary of changes:
当该Skill完成更新后,应提供变更摘要:

README Update Summary

README更新摘要

  • Installation: Updated
    npm install
    to include new peer dependencies.
  • Usage: Added example for the new
    --blame-only
    flag.
  • ℹ️ Version: Incremented to
    v1.2.3
    to match
    package.json
    .
  • 安装:更新
    npm install
    命令以包含新的peer依赖。
  • 使用:添加了新
    --blame-only
    参数的示例。
  • ℹ️ 版本:已升级至
    v1.2.3
    ,与
    package.json
    保持一致。

References

参考资料

  • README Template - Standard layout for project documentation.
  • Project Discovery Patterns - How to find project info across different languages.
  • README模板 - 项目文档的标准布局。
  • 项目发现模式 - 如何跨不同语言查找项目信息。