create-llms
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate LLMs.txt File from Repository Structure
根据仓库结构创建 LLMs.txt 文件
Create a new 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)提供高层指导,帮助其定位理解仓库用途和规范所需的相关内容。
llms.txtPrimary Directive
主要指令
Create a comprehensive 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.
llms.txt创建一个 comprehensive 的 文件,作为 LLM 理解和有效浏览仓库的入口。该文件必须符合 llms.txt 规范,并针对 LLM 消费进行优化,同时保持对人类可读。
llms.txtAnalysis and Planning Phase
分析与规划阶段
Before creating the file, you must complete a thorough analysis:
llms.txt在创建 文件之前,必须完成全面分析:
llms.txtStep 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 (files in
.md,/docs/, etc.)/spec/ - 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 file must follow this exact structure per the specification:
llms.txt- H1 Header: Single line with repository/project name (required)
- Blockquote Summary: Brief description in blockquote format (optional but recommended)
- Additional Details: Zero or more markdown sections without headings for context
- File List Sections: Zero or more H2 sections containing markdown lists of links
llms.txt- H1 标题:单行显示仓库或项目名称(必需)
- 引用块摘要:以引用块格式呈现的简要说明(可选,但推荐使用)
- 其他详情:可包含零个或多个不带标题的 markdown 章节,用于补充上下文
- 文件列表章节:可包含零个或多个 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 descriptionSection 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 步:分析仓库
- Examine the repository structure completely
- Read the main README.md to understand the project
- Identify all documentation directories and files
- Catalog specification files and their purposes
- Find example files and configuration files
- 完整检查仓库结构
- 阅读主 README.md,了解项目
- 识别所有文档目录和文件
- 归类规范文件及其用途
- 查找示例文件和配置文件
Step 2: Content Planning
第 2 步:规划内容
- Determine the primary purpose statement
- Write a concise summary for the blockquote
- Group identified files into logical categories
- Prioritize files by importance for LLM understanding
- Create descriptions for each file link
- 确定主要用途说明
- 为引用块编写简洁摘要
- 将识别出的文件归入逻辑类别
- 按对 LLM 理解的重要性确定优先级
- 为每个文件链接编写描述
Step 3: File Creation
第 3 步:创建文件
- Create the file in the repository root
llms.txt - Follow the exact format specification
- Include all required sections
- Use proper markdown formatting
- Ensure all links are valid relative paths
- 在仓库根目录创建 文件
llms.txt - 遵循精确的格式规范
- 包含所有必需章节
- 使用正确的 markdown 格式
- 确保所有链接均为有效的相对路径
Step 4: Validation
第 4 步:验证
- Verify compliance with https://llmstxt.org/ specification
- Check that all links are valid and accessible
- Ensure the file serves as an effective LLM navigation tool
- Confirm the file is both human and machine readable
- 验证是否符合 https://llmstxt.org/ 规范
- 检查所有链接是否有效且可访问
- 确保该文件能够作为有效的 LLM 导航工具
- 确认该文件对人类和机器均可读
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
undefinedtxt
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
undefinedSuccess Criteria
成功标准
The created file should:
llms.txt- Enable LLMs to quickly understand the repository's purpose
- Provide clear navigation to essential documentation
- Follow the official llms.txt specification exactly
- Be comprehensive yet concise
- Serve both human and machine readers effectively
- Include all critical files for project understanding
- Use clear, unambiguous language throughout
- Organize content logically for easy consumption
创建完成的 文件应:
llms.txt- 帮助 LLM 快速理解仓库用途
- 为重要文档提供清晰导航
- 严格遵循官方 llms.txt 规范
- 内容全面但简洁
- 同时对人类和机器读者有效
- 包含理解项目所需的所有关键文件
- 全文使用清晰、无歧义的语言
- 组织结构合理,便于快速消费