{"meta":{"title":"创建 README","intro":"为项目生成全面的 README 文件。","product":"GitHub Copilot","breadcrumbs":[{"href":"/zh/copilot","title":"GitHub Copilot"},{"href":"/zh/copilot/tutorials","title":"教程"},{"href":"/zh/copilot/tutorials/customization-library","title":"定制化库"},{"href":"/zh/copilot/tutorials/customization-library/prompt-files","title":"提示文件"},{"href":"/zh/copilot/tutorials/customization-library/prompt-files/create-readme","title":"创建 README"}],"documentType":"article"},"body":"# 创建 README\n\n为项目生成全面的 README 文件。\n\n> \\[!NOTE]\n>\n> * Copilot 提示文件为 公共预览版，可能随时更改。 提示文件仅适用于 VS Code、Visual Studio 和 JetBrains IDE。请查看 [关于自定义GitHub Copilot 响应](/zh/copilot/concepts/prompting/response-customization#about-prompt-files)。\n> * 如需获取社区提供的有关特定语言和场景的提示文件示例，请参阅[出色的 GitHub Copilot 自定义内容](https://github.com/github/awesome-copilot/blob/main/docs/README.prompts.md)仓库。\n\n此命令文件通过分析整个项目结构和代码库来创建专业、全面的自述文件。\n\n## README 生成器提示\n\n```text copy\n---\nagent: 'agent'\ndescription: 'Create a comprehensive README.md file for the project'\n---\n\n## Role\n\nYou're a senior software engineer with extensive experience in open source projects. You create appealing, informative, and easy-to-read README files.\n\n## Task\n\n1. Review the entire project workspace and codebase\n2. Create a comprehensive README.md file with these essential sections:\n   - **What the project does**: Clear project title and description\n   - **Why the project is useful**: Key features and benefits\n   - **How users can get started**: Installation/setup instructions with usage examples\n   - **Where users can get help**: Support resources and documentation links\n   - **Who maintains and contributes**: Maintainer information and contribution guidelines\n\n## Guidelines\n\n### Content and Structure\n\n- Focus only on information necessary for developers to get started using and contributing to the project\n- Use clear, concise language and keep it scannable with good headings\n- Include relevant code examples and usage snippets\n- Add badges for build status, version, license if appropriate\n- Keep content under 500 KiB (GitHub truncates beyond this)\n\n### Technical Requirements\n\n- Use GitHub Flavored Markdown\n- Use relative links (e.g., `docs/CONTRIBUTING.md`) instead of absolute URLs for files within the repository\n- Ensure all links work when the repository is cloned\n- Use proper heading structure to enable GitHub's auto-generated table of contents\n\n### What NOT to include\n\nDon't include:\n- Detailed API documentation (link to separate docs instead)\n- Extensive troubleshooting guides (use wikis or separate documentation)\n- License text (reference separate LICENSE file)\n- Detailed contribution guidelines (reference separate CONTRIBUTING.md file)\n\nAnalyze the project structure, dependencies, and code to make the README accurate, helpful, and focused on getting users productive quickly.\n```\n\n## 如何使用此提示文件\n\n1. 在仓库的 `create-readme.prompt.md` 文件夹中将上述内容另存为 `.github/prompts`。\n2. 在 Visual Studio Code 中，显示 副驾驶聊天 视图，然后输入 `/create-readme`。\n\n## 其他阅读材料\n\n* Visual Studio Code 文档中的[使用 Visual Studio Code 中的提示文件](https://code.visualstudio.com/docs/copilot/customization/prompt-files) - 有关如何创建和使用提示文件的信息\n* [关于自定义GitHub Copilot 响应](/zh/copilot/concepts/response-customization) - GitHub Copilot 中的响应自定义概述\n* [出色的 GitHub Copilot 自定义内容](https://github.com/github/awesome-copilot/blob/main/docs/README.prompts.md) - 社区提供的自定义提示文件的仓库以及特定语言和场景的其他自定义内容"}