core: Instructions file for GitHub Copilot

.github/copilot-instructions.md

core copilot-instructions.md is an instructions file for GitHub Copilot from home-assistant/core. It costs 2,719 tokens per session, scanned C, original, Apache-2.0.

Repository instructions for working on Home Assistant Core, including code reviews, pull requests, commits, tests, setup, and Python style.

In plain words
What is it for?
Use them when changing, reviewing, testing, committing, or opening pull requests in the Home Assistant Core repository.
Why use it?
They explain the project’s rules in one place so an agent is less likely to remove required pull-request content, alter published history, or use the wrong development commands.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions Claude Code.

This is home-assistant/core's own configuration. It tells GitHub Copilot how to work on core itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything core configures →

About the project

Home Assistant is open-source home automation software that lets people control devices and actions locally through a modular system. It is used by home-automation enthusiasts and DIY users, often on a Raspberry Pi or local server; the catalogue entries support operating or developing its integrations and codebase.

home-assistant/core · 91,801 stars · on GitHub · home-assistant.io

Reuse

Borrowing it

Nothing to install: this file belongs to home-assistant/core. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/home-assistant/core/dev/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/home-assistant/core

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for core copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/home-assistant/core/copilot-instructions/github.svg)](https://agentmods.dev/instructions/home-assistant/core/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/home-assistant/core/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/home-assistant/core/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for core copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/home-assistant/core/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/home-assistant/core/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,719 This file is loaded in full into every session.
When invoked 2,719 The same file — it is already loaded in full.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02719 $0.02719
Opus 5.5 $0.01088 $0.01088
Sonnet 5.5 $0.00544 $0.00544
Haiku 4.5 $0.00272 $0.00272

Measured 4d ago against content hash 0c9a76aac3c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

core copilot-instructions.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- When entering a new environment or worktree, run `script/setup` to set up the virtual environment with all development dependencies (pylint, pre-commit hooks, etc.). This is required before committing. If uv reports th

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- When entering a new environment or worktree, run `script/setup` to set up the virtual environment with all development dependencies (pylint, pre-commit hooks, etc.). This is required before committing. If uv reports th
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.github/copilot-instructions.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Copilot code review instructions

  • Start review comments with a short, one-sentence summary of the suggested fix.
  • Do not comment on code style, formatting or linting issues.
  • When reviewing changes under homeassistant/components/ or tests/components/, use the ha-integration-knowledge skill as the primary reference.
  • Flag comments that over-explain straightforward code, narrate the obvious, or read like AI commentary (multi-sentence justifications for a single line).
  • A Pull Request with a dependency version bump should only contain changes required for the version bump. If the PR includes other changes, request that they are removed from the PR.
  • Do not ask to mark a Pull Request as a breaking change when it removes a YAML import whose deprecation period has ended; the deprecation already announced the removal.
  • Check that the PR description is complete and filled in according to the PR template included below. Every section and checklist item from the template must be present, except the ## Breaking change section which is optional. No content from the template should be missing, except for HTML comments and Markdown link reference definitions (lines of the form [name]: url), which do not render and cannot be verified from the description. Even unchecked checkboxes or empty sections must be present. This is a hard requirement.
  • Skip the PR template check for pull requests generated by automated dependency bots. These are identifiable by their description: Renovate PRs contain "This PR was generated by [Mend Renovate]" and Dependabot PRs contain "Dependabot commands and options". All other review instructions still apply to these PRs.

Pull Request template

The PR description must follow this template (from .github/PULL_REQUEST_TEMPLATE.md):

<!--
  You are amazing! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
  If your PR contains a breaking change for existing users, it is important
  to tell them what breaks, how to make it work again and why we did this.
  This piece of text is published with the release notes, so it helps if you
  write it towards our users, not us.
  Note: Remove this section if this PR is NOT a breaking change.
-->


## Proposed change
<!--
  Describe the big picture of your changes here to communicate to the
  maintainers why we should accept this pull request. If it fixes a bug
  or resolves a feature request, be sure to link to that issue in the
  additional information section.
-->


## Type of change
<!--
  What type of change does your PR introduce to Home Assistant?
  NOTE: Please, check only 1! box!
  If your PR requires multiple boxes to be checked, you'll most likely need to
  split it into multiple PRs. This makes things easier and faster to code review.
-->

- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests

## Additional information
<!--
  Details are important, and help maintainers processing your PR.
  Please be sure to fill out additional details, if applicable.
-->

- This PR fixes or closes issue: fixes #
- This PR is related to issue: 
- Link to documentation pull request: 
- Link to contributors documentation pull request: 
- Link to frontend pull request: 

## Checklist
<!--
  Put an `x` in the boxes that apply. You can also fill these out after
  creating the PR. If you're unsure about any of them, don't hesitate to ask.
  We're here to help! This is simply a reminder of what we are going to look
  for before merging your code.

  AI tools are welcome, but contributors are responsible for *fully*
  understanding the code before submitting a PR. Please follow our AI policy:
  https://contributors.home-assistant.io/start/ai-policy/
-->

- [ ] I understand the code I am submitting and can explain how it works.
- [ ] The code change is tested and works locally.
- [ ] Local tests pass. **Your PR cannot be merged unless tests pass**
- [ ] There is no commented out code in this PR.
- [ ] I have followed the [development checklist][dev-checklist]
- [ ] I have followed the [perfect PR recommendations][perfect-pr]
- [ ] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
- [ ] Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]

If the code communicates with devices, web services, or third-party tools:

- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.  
      Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.  
      Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

<!--
  This project is very active and we have a high turnover of pull requests.

  Unfortunately, the number of incoming pull requests is higher than what our
  reviewers can review and merge so there is a long backlog of pull requests
  waiting for review. You can help here!
  
  By reviewing another pull request, you will help raise the code quality of
  that pull request and the final review will be faster. This way the general
  pace of pull request reviews will go up and your wait time will go down.
  
  When picking a pull request to review, try to choose one that hasn't yet
  been reviewed.

  Thanks for helping out!
-->

To help with the load of incoming pull requests:

- [ ] I have reviewed two other [open pull requests][prs] in this repository.

[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure

<!--
  Thank you for contributing <3

  Below, some useful links you could explore:
-->
[dev-checklist]: https://contributors.home-assistant.io/core/development/checklist/
[manifest-docs]: https://contributors.home-assistant.io/core/integrations/manifest/
[quality-scale]: https://contributors.home-assistant.io/core/quality-scale/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://contributors.home-assistant.io/start/pull-requests/#before-you-open-it

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +1 lines · +34 tokens per session 0c9a76aac3c6
  2. 12d ago Changed · -1 tokens per session 3f6251d8e032
  3. 28d ago Changed · +1 lines · +34 tokens per session b00ed36b9f42
  4. 1mo ago Changed · +1 lines · +63 tokens per session 113fa353083e
  5. 1mo ago Changed · +1 lines · +32 tokens per session e519263f9753
  6. 1mo ago First seen · 194 lines · 2,557 tokens per session scan C 288b26df9d09

Subscribe to this mod's changes

core copilot-instructions.md is an instructions file published in the GitHub repository home-assistant/core (91,801 stars, last pushed today), licensed Apache-2.0. It adds 2,719 tokens to every session, about $0.0109 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens