create-llms

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create LLMs.txt File from Repository Structure

根据仓库结构创建 LLMs.txt 文件

Create a new
llms.txt
file from scratch in the root of the repository following the official llms.txt specification at https://llmstxt.org/. This file provides high-level guidance to large language models (LLMs) on where to find relevant content for understanding the repository's purpose and specifications.
在仓库根目录从头创建一个新的
llms.txt
文件,并遵循 https://llmstxt.org/ 上的官方 llms.txt 规范。该文件为大型语言模型(LLM)提供高层指导,帮助其定位理解仓库用途和规范所需的相关内容。

Primary Directive

主要指令

Create a comprehensive
llms.txt
file that serves as an entry point for LLMs to understand and navigate the repository effectively. The file must comply with the llms.txt specification and be optimized for LLM consumption while remaining human-readable.
创建一个 comprehensive 的
llms.txt
文件,作为 LLM 理解和有效浏览仓库的入口。该文件必须符合 llms.txt 规范,并针对 LLM 消费进行优化,同时保持对人类可读。

Analysis and Planning Phase

分析与规划阶段

Before creating the
llms.txt
file, you must complete a thorough analysis:
在创建
llms.txt
文件之前,必须完成全面分析:

Step 1: Review llms.txt Specification

第 1 步:审阅 llms.txt 规范

  • Review the official specification at https://llmstxt.org/ to ensure full compliance
  • Understand the required format structure and guidelines
  • Note the specific markdown structure requirements
  • 审阅 https://llmstxt.org/ 上的官方规范,确保完全符合要求
  • 了解必需的格式结构和指南
  • 记录具体的 markdown 结构要求

Step 2: Repository Structure Analysis

第 2 步:分析仓库结构

  • Examine the complete repository structure using appropriate tools
  • Identify the primary purpose and scope of the repository
  • Catalog all important directories and their purposes
  • List key files that would be valuable for LLM understanding
  • 使用适当的工具检查完整的仓库结构
  • 确定仓库的主要用途和范围
  • 归类所有重要目录及其用途
  • 列出有助于 LLM 理解的关键文件

Step 3: Content Discovery

第 3 步:发现内容

  • Identify README files and their locations
  • Find documentation files (
    .md
    files in
    /docs/
    ,
    /spec/
    , etc.)
  • Locate specification files and their purposes
  • Discover configuration files and their relevance
  • Find example files and code samples
  • Identify any existing documentation structure
  • 查找 README 文件及其所在位置
  • 查找文档文件(
    /docs/
    、
    /spec/
    等目录中的
    .md
    文件)
  • 定位规范文件及其用途
  • 发现配置文件及其相关性
  • 查找示例文件和代码示例
  • 识别现有的文档结构

Step 4: Create Implementation Plan

第 4 步:制定实施计划

Based on your analysis, create a structured plan that includes:
  • Repository purpose and scope summary
  • Priority-ordered list of essential files for LLM understanding
  • Secondary files that provide additional context
  • Organizational structure for the llms.txt file
基于分析结果,制定结构化计划,其中包括:
  • 仓库用途和范围摘要
  • 按优先级排序的 LLM 理解所需重要文件列表
  • 提供补充上下文的次要文件
  • llms.txt
    文件的组织结构

Implementation Requirements

实施要求

Format Compliance

格式合规性

The
llms.txt
file must follow this exact structure per the specification:
  1. H1 Header: Single line with repository/project name (required)
  2. Blockquote Summary: Brief description in blockquote format (optional but recommended)
  3. Additional Details: Zero or more markdown sections without headings for context
  4. File List Sections: Zero or more H2 sections containing markdown lists of links
llms.txt
文件必须严格按照规范采用以下结构:
  1. H1 标题:单行显示仓库或项目名称(必需)
  2. 引用块摘要:以引用块格式呈现的简要说明(可选,但推荐使用)
  3. 其他详情:可包含零个或多个不带标题的 markdown 章节,用于补充上下文
  4. 文件列表章节:可包含零个或多个 H2 章节,其中使用 markdown 链接列表

Content Requirements

内容要求

Required Elements

必需元素

  • Project Name: Clear, descriptive title as H1
  • Summary: Concise blockquote explaining the repository's purpose
  • Key Files: Essential files organized by category (H2 sections)
  • 项目名称:使用清晰、具有描述性的 H1 标题
  • 摘要:使用简洁的引用块说明仓库用途
  • 关键文件:按类别组织重要文件(H2 章节)

File Link Format

文件链接格式

Each file link must follow:
[descriptive-name](relative-url): optional description
每个文件链接必须采用以下格式:
[descriptive-name](relative-url): optional description

Section Organization

章节组织

Organize files into logical H2 sections such as:
  • Documentation: Core documentation files
  • Specifications: Technical specifications and requirements
  • Examples: Sample code and usage examples
  • Configuration: Setup and configuration files
  • Optional: Secondary files (special meaning - can be skipped for shorter context)
将文件组织到逻辑清晰的 H2 章节中,例如:
  • Documentation:核心文档文件
  • Specifications:技术规范和需求
  • Examples:示例代码和使用示例
  • Configuration:设置和配置文件
  • Optional:次要文件(具有特殊含义,可为缩短上下文而跳过)

Content Guidelines

内容指南

Language and Style

语言和风格

  • Use concise, clear, unambiguous language
  • Avoid jargon without explanation
  • Write for both human and LLM readers
  • Be specific and informative in descriptions
  • 使用简洁、清晰、无歧义的语言
  • 避免使用未经解释的术语
  • 同时面向人类和 LLM 读者编写
  • 描述应具体且信息充分

File Selection Criteria

文件选择标准

Include files that:
  • Explain the repository's purpose and scope
  • Provide essential technical documentation
  • Show usage examples and patterns
  • Define interfaces and specifications
  • Contain configuration and setup instructions
Exclude files that:
  • Are purely implementation details
  • Contain redundant information
  • Are build artifacts or generated content
  • Are not relevant to understanding the project
应包含以下文件:
  • 解释仓库用途和范围
  • 提供关键的技术文档
  • 展示使用示例和模式
  • 定义接口和规范
  • 包含配置和安装说明
应排除以下文件:
  • 纯粹的实现细节
  • 包含冗余信息
  • 属于构建产物或生成内容
  • 与理解项目无关

Execution Steps

执行步骤

Step 1: Repository Analysis

第 1 步:分析仓库

  1. Examine the repository structure completely
  2. Read the main README.md to understand the project
  3. Identify all documentation directories and files
  4. Catalog specification files and their purposes
  5. Find example files and configuration files
  1. 完整检查仓库结构
  2. 阅读主 README.md,了解项目
  3. 识别所有文档目录和文件
  4. 归类规范文件及其用途
  5. 查找示例文件和配置文件

Step 2: Content Planning

第 2 步:规划内容

  1. Determine the primary purpose statement
  2. Write a concise summary for the blockquote
  3. Group identified files into logical categories
  4. Prioritize files by importance for LLM understanding
  5. Create descriptions for each file link
  1. 确定主要用途说明
  2. 为引用块编写简洁摘要
  3. 将识别出的文件归入逻辑类别
  4. 按对 LLM 理解的重要性确定优先级
  5. 为每个文件链接编写描述

Step 3: File Creation

第 3 步:创建文件

  1. Create the
    llms.txt
    file in the repository root
  2. Follow the exact format specification
  3. Include all required sections
  4. Use proper markdown formatting
  5. Ensure all links are valid relative paths
  1. 在仓库根目录创建
    llms.txt
    文件
  2. 遵循精确的格式规范
  3. 包含所有必需章节
  4. 使用正确的 markdown 格式
  5. 确保所有链接均为有效的相对路径

Step 4: Validation

第 4 步:验证

  1. Verify compliance with https://llmstxt.org/ specification
  2. Check that all links are valid and accessible
  3. Ensure the file serves as an effective LLM navigation tool
  4. Confirm the file is both human and machine readable
  1. 验证是否符合 https://llmstxt.org/ 规范
  2. 检查所有链接是否有效且可访问
  3. 确保该文件能够作为有效的 LLM 导航工具
  4. 确认该文件对人类和机器均可读

Quality Assurance

质量保证

Format Validation

格式验证

  • ✅ H1 header with project name
  • ✅ Blockquote summary (if included)
  • ✅ H2 sections for file lists
  • ✅ Proper markdown link format
  • ✅ No broken or invalid links
  • ✅ Consistent formatting throughout
  • ✅ 包含带项目名称的 H1 标题
  • ✅ 包含引用块摘要(如有)
  • ✅ 文件列表使用 H2 章节
  • ✅ 使用正确的 markdown 链接格式
  • ✅ 不包含损坏或无效的链接
  • ✅ 全文格式保持一致

Content Validation

内容验证

  • ✅ Clear, unambiguous language
  • ✅ Comprehensive coverage of essential files
  • ✅ Logical organization of content
  • ✅ Appropriate file descriptions
  • ✅ Serves as effective LLM navigation tool
  • ✅ 语言清晰、无歧义
  • ✅ 全面涵盖重要文件
  • ✅ 内容组织逻辑清晰
  • ✅ 文件描述恰当
  • ✅ 作为有效的 LLM 导航工具发挥作用

Specification Compliance

规范合规性

  • ✅ Follows https://llmstxt.org/ format exactly
  • ✅ Uses required markdown structure
  • ✅ Implements optional sections appropriately
  • ✅ File located at repository root (
    /llms.txt
    )
  • ✅ 严格遵循 https://llmstxt.org/ 格式
  • ✅ 使用必需的 markdown 结构
  • ✅ 正确使用可选章节
  • ✅ 文件位于仓库根目录(
    /llms.txt
    )

Example Structure Template

示例结构模板

txt
undefined
txt
undefined

[Repository Name]

[Repository Name]

[Concise description of the repository's purpose and scope]
[Optional additional context paragraphs without headings]
[Concise description of the repository's purpose and scope]
[Optional additional context paragraphs without headings]

Documentation

Documentation

  • Main README: Primary project documentation and getting started guide
  • Contributing Guide: Guidelines for contributing to the project
  • Code of Conduct: Community guidelines and expectations
  • Main README: Primary project documentation and getting started guide
  • Contributing Guide: Guidelines for contributing to the project
  • Code of Conduct: Community guidelines and expectations

Specifications

Specifications

  • Technical Specification: Detailed technical requirements and constraints
  • API Specification: Interface definitions and data contracts
  • Technical Specification: Detailed technical requirements and constraints
  • API Specification: Interface definitions and data contracts

Examples

Examples

  • Basic Example: Simple usage demonstration
  • Advanced Example: Complex implementation patterns
  • Basic Example: Simple usage demonstration
  • Advanced Example: Complex implementation patterns

Configuration

Configuration

  • Setup Guide: Installation and configuration instructions
  • Deployment Guide: Production deployment guidelines
  • Setup Guide: Installation and configuration instructions
  • Deployment Guide: Production deployment guidelines

Optional

Optional

  • Architecture Documentation: Detailed system architecture
  • Design Decisions: Historical design decision records
undefined
  • Architecture Documentation: Detailed system architecture
  • Design Decisions: Historical design decision records
undefined

Success Criteria

成功标准

The created
llms.txt
file should:
  1. Enable LLMs to quickly understand the repository's purpose
  2. Provide clear navigation to essential documentation
  3. Follow the official llms.txt specification exactly
  4. Be comprehensive yet concise
  5. Serve both human and machine readers effectively
  6. Include all critical files for project understanding
  7. Use clear, unambiguous language throughout
  8. Organize content logically for easy consumption
创建完成的
llms.txt
文件应:
  1. 帮助 LLM 快速理解仓库用途
  2. 为重要文档提供清晰导航
  3. 严格遵循官方 llms.txt 规范
  4. 内容全面但简洁
  5. 同时对人类和机器读者有效
  6. 包含理解项目所需的所有关键文件
  7. 全文使用清晰、无歧义的语言
  8. 组织结构合理,便于快速消费