Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/apache/airflow/code-reviewgit clone --depth 1 https://github.com/apache/airflowWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01515 | $0.01515 |
| Opus 5 | $0.00758 | $0.00758 |
| Sonnet 5 | $0.00303 | $0.00303 |
| Haiku 4.5 | $0.00152 | $0.00152 |
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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 75 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 (
/executionendpoints). - 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_COMMSor 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()orselectinload()— this is an N+1 query. - Flag any query on
run_idwithoutdag_id.run_idis only unique per Dag. Queries that filter, group, partition, or join onrun_idalone will silently collide across Dags. - Flag any
session.commit()call inairflow-corecode that receives asessionparameter. Session lifecycle is managed by the caller, not the callee. - Flag any
sessionparameter that is not keyword-only (*, session) inairflow-core. - Flag any database-specific SQL (e.g.,
LATERALjoins, PostgreSQL-only functions, MySQL-only syntax) without cross-DB handling. SQL must work on PostgreSQL, MySQL, and SQLite.
Code Quality Rules
- Flag any
assertin non-test code.assertis stripped in optimized Python (python -O), making it a silent no-op in production. - Flag any
time.time()used for measuring durations. Usetime.monotonic()instead —time.time()is affected by system clock adjustments. - Flag any
fromorimportstatement 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_CHECKINGblocks. 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 tomaxsize=128and is fine. - Flag any heavy import (e.g.,
kubernetes.client) in multi-process code paths that is not behind aTYPE_CHECKINGguard. - Flag any file, connection, or session opened without a context manager or
try/finally. - Flag any new
raise AirflowExceptionusage. The community is reducing directAirflowExceptionusage, not increasing it; new ones are not allowed (enforced by thecheck-no-new-airflow-exceptionsprek hook) — prefer Python's standard exceptions (ValueError,TypeError,OSError), or a dedicated class in the appropriateexceptions.py. The one exception is a pure relocation: an already-existingAirflowExceptionmoved 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 toAirflowException.
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.
- yesterday First seen · 75 lines · 1,515 tokens per session scan A 3bf7f31a0f22
airflow code-review.instructions.md is an instructions file published in the GitHub repository apache/airflow (46,647 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,515 tokens to every session, about $0.0076 per session on Opus 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.
Other instructions, from other repositories
dagster CLAUDE.md
Instructions for dagster-io/dagster, covering dagster development guide, quick references, environment setup, essential commands and code quality - run after every python edit.
apache-airflow-mcp-server AGENTS.md
Instructions for madamak/apache-airflow-mcp-server, covering agents.md, project layout, development workflow, core design principles and tooling contracts and annotations.
redhat-ai-workflow AGENTS.md
Instructions for dmzoneill/redhat-ai-workflow, covering ai workflow assistant, your role, how this system works, key principles and critical: skill-first behavior.
airflow-mcp-server AGENTS.md
Instructions for abhishekbhakat/airflow-mcp-server, covering airflow mcp — agent ramp-up guide, mission, high-level architecture, airflow-mcp-server (cli app) and airflow-mcp-plugin (airflow webserver mount).
astro-airflow-mcp AGENTS.md
Instructions for astronomer/astro-airflow-mcp, covering agent guidelines for astro-airflow-mcp, architecture, code conventions, http client and good.
astro-airflow-mcp CLAUDE.md
Instructions for astronomer/astro-airflow-mcp, a project described as: MCP server for Apache Airflow instances. Runs standalone or as an Airflow plugin.