medium severitymulti-agent

    .github/copilot-instructions.md Ignored by GitHub Copilot — Path, Frontmatter & Settings Fix

    Symptom: GitHub Copilot Chat and Coding Agent ignore instructions committed to your repository.

    Direct-Answer Fix Summary

    GitHub Copilot looks strictly at .github/copilot-instructions.md for repo-wide guidance and .github/instructions/*.instructions.md with YAML applyTo: globs for scoped files. Common failures include misspelling the filename (copilot-instruction.md singular), placing it in the repo root instead of .github/, or using globs: instead of applyTo: in scoped instruction files.

    Broken vs. Fixed Configuration

    Broken: Wrong filename & Cursor globs: key
    # .github/instructions/api.md (wrong suffix + wrong frontmatter key!)
    ---
    globs: ["src/api/**/*.ts"]
    ---
    Validate all payloads with Zod.
    Fixed: *.instructions.md with applyTo: frontmatter
    # .github/instructions/api.instructions.md
    ---
    applyTo: "src/api/**/*.ts"
    ---
    - Validate all incoming request bodies with Zod schemas in src/api/schemas/.

    Why This Happens

    Each AI coding tool uses a different frontmatter key: Cursor uses globs:, Claude Code uses paths:, and GitHub Copilot scoped files require applyTo:.

    Step-by-Step Fix

    1. 01
      Check the exact path .github/copilot-instructions.md

      Verify plural instructions and placement inside .github/ at the repository root.

    2. 02
      Use applyTo: in scoped .github/instructions/*.instructions.md files

      Scoped Copilot files require frontmatter with applyTo: "**/*.ts" (not globs: or paths:).

    3. 03
      Confirm VS Code github.copilot.chat.codeGeneration.useInstructionFiles is enabled

      Check workspace settings to ensure custom instruction files are not turned off locally.

    Automated AgentLint Checks That Catch This

    Frequently Asked Questions

    Does GitHub Copilot Coding Agent also read AGENTS.md?

    Yes, GitHub Copilot Coding Agent added support for AGENTS.md, while VS Code Copilot Chat relies primarily on .github/copilot-instructions.md and *.instructions.md.

    How can I avoid maintaining Copilot and CLAUDE.md separately?

    Keep canonical rules in AGENTS.md and use AgentLint's converter to keep .github/copilot-instructions.md synced without manual copy-paste drift.

    Related Troubleshooting Guides