agentleFS
Robotti-ioRobotti-io/copilot-security-instructions/.github/copilot-instructions.md

copilot-security-instructions

Copilot instructions42 starsChanged 10 months agoApache-2.0View on GitHub

These instructions apply when you create or edit any of the following files:

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

19 rules. About 0 are common, 10 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ATX headings (#, ##, ###) and keep a clean hierarchy (one # at top).

    line 12
  2. Distinctive:

    Prefer short paragraphs and bullet lists.

    line 13
  3. Very specific:

    Use fenced code blocks for any code or config.

    line 14
  4. Distinctive:

    Never place YAML frontmatter anywhere except the very top of the file.

    line 15
  5. Very specific:

    Always separate YAML frontmatter from body with a blank line after the closing ---.

    line 16
  6. Distinctive:

    Keep instructions unambiguous, testable, and scoped:

    line 17
  7. Distinctive:

    Use “MUST / SHOULD / MAY” for requirements.

    line 18
  8. Distinctive:

    Add acceptance criteria when helpful.

    line 19
  9. Distinctive:

    Avoid contradictions across files.

    line 20
  10. Very specific:

    Use --- on the first line and --- to close the frontmatter block.

    line 24
  11. Very specific:

    Prefer quoted strings when values contain special characters (:, *, {}, #, @, etc.).

    line 25
  12. Very specific:

    Use lower-kebab-case for identifiers (e.g., name: markdown-authoring).

    line 26
  13. Distinctive:

    Keep the agent prompt focused on a single domain (e.g., “authoring Copilot customization files”).

    line 43
  14. Distinctive:

    Start with the goal in one sentence.

    line 51
  15. Very specific:

    Use ${input:<name>:<prompt>} placeholders for required parameters.

    line 52
  16. Very specific:

    Ensure the prompt can be invoked as /<filename-without-.prompt.md>.

    line 54
  17. Very specific:

    When proposing changes, output the full file contents in a single fenced md code block.

    line 78
  18. Distinctive:

    If editing an existing file, describe the minimal set of changes before showing the updated file.

    line 79
  19. Distinctive:

    Never invent tool names, file paths, or capabilities—use what exists in the repo.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot authoring guidelines for customization Markdown files

These instructions apply when you create or edit any of the following files:

  • agents/*.agent.md
  • prompts/*.prompt.md
  • instructions/*.instructions.md
  • skills/**/SKILL.md

General Markdown rules

  • Use ATX headings (#, ##, ###) and keep a clean hierarchy (one # at top).
  • Prefer short paragraphs and bullet lists; avoid overly long blocks of text.
  • Use fenced code blocks for any code or config. Label the fence language (yaml, bash, json, md, etc.).
  • Never place YAML frontmatter anywhere except the very top of the file.
  • Always separate YAML frontmatter from body with a blank line after the closing ---.
  • Keep instructions unambiguous, testable, and scoped:
    • Use “MUST / SHOULD / MAY” for requirements.
    • Add acceptance criteria when helpful.
  • Avoid contradictions across files. If two instruction files could both apply, ensure they agree.

YAML frontmatter conventions

  • Use --- on the first line and --- to close the frontmatter block.
  • Prefer quoted strings when values contain special characters (:, *, {}, #, @, etc.).
  • Use lower-kebab-case for identifiers (e.g., name: markdown-authoring).

Authoring standards per file type

A) Custom agent profiles: agents/*.agent.md

  • Frontmatter MUST include:
    • description (required)
    • name (recommended; otherwise filename is used)
  • Frontmatter MAY include:
    • tools (list of tool names/aliases)
    • model (IDE-supported)
    • target (vscode or github-copilot), if you want environment-specific availability
  • Body MUST:
    • Define the agent’s role, boundaries, and output format expectations.
    • State what the agent should do when missing info (ask concise questions or propose safe defaults).
    • Include formatting rules for produced Markdown (headings, lists, code fences, links).
  • Keep the agent prompt focused on a single domain (e.g., “authoring Copilot customization files”).

B) Prompt files: prompts/*.prompt.md

  • Frontmatter SHOULD include:
    • description (short, action-oriented)
    • agent (when you want agent mode behavior)
  • Body MUST:
    • Start with the goal in one sentence.
    • Use ${input:<name>:<prompt>} placeholders for required parameters.
    • Specify a deterministic output structure (headings + bullet lists).
  • Ensure the prompt can be invoked as /<filename-without-.prompt.md>.

C) Path-specific instructions: instructions/*.instructions.md

  • Frontmatter MUST include:
    • applyTo: "<glob pattern(s)>"
  • Frontmatter MAY include:
    • excludeAgent: "code-review" or "coding-agent" if only one should read it
  • Body MUST:
    • Describe exactly what to do for files matching applyTo.
    • Contain rules that are compatible with repo-wide instructions.

D) Skills: skills/<skill-dir>/SKILL.md

  • File MUST be named SKILL.md.
  • Frontmatter MUST include:
    • name (lowercase, hyphenated)
    • description (when to use this skill)
  • Body MUST:
    • Provide step-by-step guidance, examples, and “do/don’t” lists.
    • Include any scripts/resources in the same directory by relative path.

Output requirements when generating/editing these files

  • When proposing changes, output the full file contents in a single fenced md code block.
  • If editing an existing file, describe the minimal set of changes before showing the updated file.
  • Never invent tool names, file paths, or capabilities—use what exists in the repo.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.