authoring-task-sdk
Write, migrate, debug, and review Airflow 3 Dag authoring code using airflow.sdk and Task SDK public interfaces.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- authoring-task-sdk
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Write, migrate, debug, and review Airflow 3 Dag authoring code using airflow.sdk and Task SDK public interfaces.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md10.2 KB
- 参考文档references/troubleshooting.md8.3 KB
- 参考文档references/workflows.md10.5 KB
- 脚本scripts/validate_dag_file.py4.6 KB
03 SKILL.md 正文
<!-- SPDX-License-Identifier: Apache-2.0 -->
Authoring Task SDK
Use this sub-skill when the task is about author-facing Airflow 3 Dag code: creating Dags, migrating Airflow 2 imports, reviewing TaskFlow or standard provider operators, diagnosing Dag discovery/import issues, and validating that a Dag file is parseable and discoverable.
Read First
references/api-reference.mdfor verified imports, signatures, public-interface boundaries, and standard provider operator signatures.references/workflows.mdfor task-oriented recipes: new Dag, import migration, dependencies, task groups, dynamic task mapping, assets, timetables, Params, XCom/context, TaskFlow, and standard operators/sensors.references/troubleshooting.mdfor parse/import failures, discovery heuristics, schedule/Param/template mistakes, metadata DB access restrictions, async/deferrable confusion, and optional Graphviz issues.scripts/validate_dag_file.pyfor a bundled safe parse/import helper that validates one Dag file without depending on the original repository checkout.
Scope
This sub-skill covers author-facing Python APIs used in Dag files:
- Dag declaration with
airflow.sdk.DAGor@dag, includingschedule,start_date,catchup,params,tags,task_group,fail_fast,allowed_run_types,deadline,disable_bundle_versioning, andrerun_with_latest_version. - TaskFlow decorators (
@task,@task.branch, provider decorators exposed under@task.<provider>),@task_group, dependency helpers, dynamic task mapping, and XComArg wiring. - Assets and asset scheduling with
Asset,AssetAlias, inlet/outlet events, asset expressions, and mixed asset/time schedules. - Timetable selection, event schedules, Params, Jinja templates, context access, XComs, Variables, Connections, and standard provider operators/sensors commonly embedded in Dag files.
Boundaries
- For CLI commands, REST API operations, Dag runs, state management, and operational debugging, route to the operations/CLI/API sub-skill.
- For provider package development, provider tests, hooks/operators implementation, or packaging conventions, route to the provider/extension sub-skill.
- For Helm, Docker images, executor deployment, triggerer/scheduler operations, or production configuration, route to the deployment sub-skill.
- For contributor tooling, Breeze, static checks, PR workflow, or repository development tasks, route to the contribution tooling sub-skill.
Validation
Prefer validating changed Dag files with the bundled helper before recommending broader operational commands:
python skills/apache-airflow/sub-skills/authoring-task-sdk/scripts/validate_dag_file.py path/to/dag_file.py --list-dags
python skills/apache-airflow/sub-skills/authoring-task-sdk/scripts/validate_dag_file.py path/to/dag_file.py --expect-dag-id example_dag
Use --repo-root only when the user explicitly wants the helper to import packages from a current checkout. Do not bake local checkout paths into Dag code or skill documentation.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).