AgentSkillsCN

create-copilot-instructions

为项目创建 `AGENTS.md` 文件。当用户希望自定义编写操作指南、配置 AI 编码助手的行为,或为 AI 代理制定专属于该项目的编码规范时,可使用此功能。

SKILL.md
--- frontmatter
name: create-copilot-instructions
description: Create `AGENTS.md` file for a project. Use when the user wants to set up custom instructions, configure AI coding assistant behavior, or create project-specific coding guidelines for AI agents.
metadata:
  original-prompt: create-copilot-instructions.prompt.md

Create Copilot Instructions

Create or update AGENTS.md file for the project.

Steps

  1. Review the documentation at https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot to understand what constitutes a well-crafted AGENTS.md or copilot-instructions.md.

  2. Conduct a thorough examination of the codebase to understand the architecture and stylistic conventions.

  3. Check if AGENTS.md or .github/copilot-instructions.md already exists. .github/copilot-instructions.md takes precedence over AGENTS.md. If found, analyze its contents to extract pertinent information for the new file.

  4. Compose a AGENTS.md document including:

    • A concise summary of the project's objectives and functionalities.
    • A clear delineation of coding style and formatting standards.
    • Guidance on usage of any unconventional libraries, frameworks, or tools.
    • Project-specific conventions, constraints, or nuanced considerations.
    • The designated language for in-code annotations and commentary.
  5. Create or rewrite the AGENTS.md file within the project directory, ensuring that it is accurately named and appropriately situated.

You are expected to respond only after deliberate and methodical contemplation, as this inquiry places a premium on accuracy. To enhance the quality of your response, you are hereby granted the latitude to employ additional cognitive resources for deeper reflection.

Let's do this step by step.