airflow: Instructions file for GitHub Copilot

.github/instructions/code-review.instructions.md

airflow code-review.instructions.md is an instructions file for GitHub Copilot from apache/airflow. It costs 1,558 tokens per session, scanned A, original, Apache-2.0.

A rulebook for reviewing code changes in Apache Airflow, a platform for scheduling and monitoring data workflows. It covers architecture boundaries, database queries, code quality, and tests.

In plain words
What is it for?
Use it when reviewing Airflow pull requests, especially changes involving the Scheduler, task execution, providers, database queries, or architecture.
Why use it?
It helps reviewers catch unsafe process boundaries, inefficient database access, provider code that uses private internals, and missing tests.

Instructions file for GitHub Copilot ✓ vendor

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions AGENTS.md.

This is apache/airflow's own configuration. It tells GitHub Copilot how to work on airflow 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 airflow configures →

About the project

Apache Airflow is a platform for defining, scheduling, and monitoring workflows as code, with a scheduler assigning dependent tasks to workers. Teams use it to orchestrate automated data and software pipelines and inspect their progress through a user interface. Its catalogue skills and instructions help agents work with Airflow.

apache/airflow · 47,377 stars · on GitHub · airflow.apache.org

Reuse

Borrowing it

Nothing to install: this file belongs to apache/airflow. 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/apache/airflow/main/.github/instructions/code-review.instructions.md
Clone the repo
git clone --depth 1 https://github.com/apache/airflow

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 airflow code-review.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/apache/airflow/code-review/github.svg)](https://agentmods.dev/instructions/apache/airflow/code-review)
Your own site
<a href="https://agentmods.dev/instructions/apache/airflow/code-review"><img src="https://agentmods.dev/badge/instructions/apache/airflow/code-review/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 airflow code-review.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/apache/airflow/code-review"><img src="https://agentmods.dev/badge/instructions/apache/airflow/code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,558 This file is loaded in full into every session.
When invoked 1,558 The same file — it is already loaded in full.
Security scan A 0 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.01558 $0.01558
Opus 5.5 $0.00623 $0.00623
Sonnet 5.5 $0.00312 $0.00312
Haiku 4.5 $0.00156 $0.00156

Measured 1mo ago against content hash 6846e51128b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

airflow code-review.instructions.md scanned grade A with 0 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/code-review.instructions.md · 81 lines

How it starts

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

Airflow Code Review Instructions

Use these rules when reviewing pull requests to the Apache Airflow repository.

Architecture Boundaries

  • Scheduler must never run user code. It only processes serialized Dags. Flag any scheduler-path code that deserializes or executes Dag/task code.
  • Flag any task execution code that accesses the metadata DB directly instead of through the Execution API (/execution endpoints).
  • Flag any code in Dag Processor or Triggerer that breaks process isolation — these components run user code in separate processes from the Scheduler and API Server, but note that they potentially have direct metadata database access and potentially bypass JWT authentication via in-process Execution API transport. This is an intentional design choice documented in the security model, not a security vulnerability.
  • Flag any provider importing core internals like SUPERVISOR_COMMS or task-runner plumbing. Providers interact through the public SDK and execution API only.

Database and Query Correctness

  • Flag any SQLAlchemy relationship access inside a loop without joinedload() or selectinload() — this is an N+1 query.
  • Flag any query on run_id without dag_id. run_id is only unique per Dag. Queries that filter, group, partition, or join on run_id alone will silently collide across Dags.
  • Flag any session.commit() call in airflow-core code that receives a session parameter. Session lifecycle is managed by the caller, not the callee.
  • Flag any session parameter that is not keyword-only (*, session) in airflow-core.
  • Flag any database-specific SQL (e.g., LATERAL joins, PostgreSQL-only functions, MySQL-only syntax) without cross-DB handling. SQL must work on PostgreSQL, MySQL, and SQLite.

Code Quality Rules

  • Flag any assert in non-test code. assert is stripped in optimized Python (python -O), making it a silent no-op in production.
  • Flag any time.time() used for measuring durations. Use time.monotonic() instead — time.time() is affected by system clock adjustments.
  • Flag any from or import statement inside a function or method body. Imports must be at the top of the file. The only valid exceptions are: (1) circular import avoidance, (2) lazy loading for worker isolation, (3) TYPE_CHECKING blocks. If the import is inside a function, ask the author to justify why it cannot be at module level.
  • Flag any @lru_cache(maxsize=None). This creates an unbounded cache — every unique argument set is cached forever. Note: @lru_cache() without arguments defaults to maxsize=128 and is fine.
  • Flag any heavy import (e.g., kubernetes.client) in multi-process code paths that is not behind a TYPE_CHECKING guard.
  • Flag any file, connection, or session opened without a context manager or try/finally.
  • Flag any new raise AirflowException usage. The community is reducing direct AirflowException usage, not increasing it; new ones are not allowed (enforced by the check-no-new-airflow-exceptions prek hook) — prefer Python's standard exceptions (ValueError, TypeError, OSError), or a dedicated class in the appropriate exceptions.py. The one exception is a pure relocation: an already-existing AirflowException moved verbatim during a refactor (e.g. code moved between files) is not a new usage — do not flag it, but confirm the diff removes the identical raise elsewhere and leaves it otherwise unchanged. Do not suggest changing specific exceptions back to AirflowException.

Read the full file on GitHub · 81 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. 1mo ago Changed · +6 lines · +43 tokens per session 6846e51128b5
  2. 2mo ago First seen · 75 lines · 1,515 tokens per session scan A 3bf7f31a0f22

Subscribe to this mod's changes

airflow code-review.instructions.md is an instructions file published in the GitHub repository apache/airflow (47,377 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,558 tokens to every session, about $0.0062 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

airflow code-review.instructions.md compared with instructions from other repositories

airflow code-review.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
airflow code-review.instructions.mdapache/airflowInstructions file47kyesterdayApache-2.0A1,558GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode