agentleFS
intelintel/torch-xpu-ops/.claude/skills/auto-label/SKILL.md

auto-label

Skill121 starsChanged 5 months agoApache-2.0View on GitHub

Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. About 0 are common, 3 are distinctive, and 25 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 25

    Very specific

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

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

    Condition: ALL changed files match .github/ISSUE_TEMPLATE/, .github/copilot-instructions.md, .claude/, test/agentic/, or other …

    line 35
  2. Very specific:

    If modifying _linux_build.yml or build-related actions/scripts → keep linux-build running, disable others: …

    line 47
  3. Very specific:

    If modifying _linux_ut.yml or UT-related actions/scripts → keep linux-ut running: disable_e2e,disable_distributed,disable_win

    line 48
  4. Very specific:

    If modifying _linux_e2e.yml or e2e-related actions/scripts → keep linux-e2e running: disable_ut,disable_distributed,disable_win

    line 49
  5. Very specific:

    If modifying _windows_*.yml or .github/actions/windows-* → keep windows jobs running, add windows_ci: …

    line 50
  6. Very specific:

    If modifying pull.yml only (trigger/condition/concurrency changes) → disable_all

    line 51
  7. Very specific:

    If modifying only non-functional workflows (auto_label.yml, auto_merge_by_comment.yml, issue_operator.yml, bot.yml) or bot scripts …

    line 52
  8. Very specific:

    If modifying MULTIPLE workflow areas or unclear scope → run full CI: none

    line 53
  9. Very specific:

    Additional: If no src/, cmake/, CMakeLists.txt files changed, add disable_build.

    line 55
  10. Very specific:

    Condition: ALL changed files are test/xpu/skip_list_common.py, test/xpu/expect/, test/xpu/extended/skip_list_*.py, or …

    line 59
  11. Very specific:

    Rationale: Test infrastructure affects all UT suites across platforms, so UT must run and disable_win must NOT be added.

    line 71
  12. Very specific:

    Additional: Always add disable_build (test-only changes don't need source build).

    line 73
  13. Very specific:

    Condition: ALL changed files are under test/ (excluding files handled by Rules 3-4).

    line 77
  14. Very specific:

    If files are ONLY under test/xpu/functorch/ or test/xpu/dynamo/ or test/xpu/higher_order_ops/: add disable_win

    line 82
  15. Very specific:

    If NO files under paths covered by Windows UT (test/xpu/test_ops*.py, test/xpu/core/, test/xpu/test_nn*.py): add disable_win

    line 83
  16. Very specific:

    Do NOT add disable_win — kernel fixes may be platform-specific (e.g.

    line 95
  17. Very specific:

    Add disable_win (xccl is Linux-only)

    line 99
  18. Very specific:

    Note: Do NOT add disable_build — source changes require compilation.

    line 101
  19. Very specific:

    If any src/ file changed: do NOT add disable_build

    line 117
  20. Very specific:

    If any cmake//CMakeLists.txt changed: do NOT add disable_build

    line 118
  21. Distinctive:

    Only disable a job if ALL changed files agree it should be disabled

    line 119
  22. Very specific:

    No files changed in src/ (excluding src//*.py)

    line 124
  23. Very specific:

    No files changed in cmake/

    line 125
  24. Very specific:

    No files changed in tools/ that affect the build

    line 127
  25. Very specific:

    When disable_build is applied, CI uses nightly wheel instead of building from source.

    line 129
  26. Distinctive:

    When used by the auto-label workflow, output ONLY the label names as a comma-separated list:

    line 133
  27. Distinctive:

    If no labels should be applied (full CI needed), output:

    line 139
  28. Very specific:

    PRs with ai_generated label: should still follow these rules (they need CI validation).

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

PR Auto-Labeling Rules

Purpose

Determine which disable_* CI labels to apply to a PR based on the files changed. These labels control which CI jobs run, reducing unnecessary CI load.

Available Labels

LabelEffect
disable_allSkip all CI test jobs, only run lint
disable_utSkip non-distributed UT jobs
disable_e2eSkip e2e (inductor benchmark) jobs
disable_distributedSkip distributed UT jobs
disable_winSkip Windows CI jobs
disable_buildSkip source build, use nightly wheel

Note: Only labels consumed by pull.yml are in scope. Other labels (disable_accelerate, disable_transformers) are used by separate workflows and not managed here.

Decision Rules

Evaluate the file paths changed in the PR and apply labels using the following logic. Rules are evaluated top-to-bottom; use the FIRST matching rule set.

Rule 1: Pure CI metadata (no functional logic change)

Condition: ALL changed files match .github/ISSUE_TEMPLATE/, .github/copilot-instructions.md, .claude/, test/agentic/, or other non-functional metadata files. No .github/workflows/, .github/actions/, or .github/scripts/ changes.

Labels: disable_all

Examples: Updating issue templates, adding skills docs, agentic test fixtures.

Rule 2: CI workflow / action / script changes

Condition: Changed files include .github/workflows/, .github/actions/, or .github/scripts/.

Labels: Determined by WHICH workflows/actions/scripts are modified:

  • If modifying _linux_build.yml or build-related actions/scripts → keep linux-build running, disable others: disable_ut,disable_e2e,disable_distributed,disable_win
  • If modifying _linux_ut.yml or UT-related actions/scripts → keep linux-ut running: disable_e2e,disable_distributed,disable_win
  • If modifying _linux_e2e.yml or e2e-related actions/scripts → keep linux-e2e running: disable_ut,disable_distributed,disable_win
  • If modifying _windows_*.yml or .github/actions/windows-* → keep windows jobs running, add windows_ci: disable_ut,disable_e2e,disable_distributed
  • If modifying pull.yml only (trigger/condition/concurrency changes) → disable_all
  • If modifying only non-functional workflows (auto_label.yml, auto_merge_by_comment.yml, issue_operator.yml, bot.yml) or bot scripts (.github/scripts/bot_*.py) → disable_all
  • If modifying MULTIPLE workflow areas or unclear scope → run full CI: none

Additional: If no src/, cmake/, CMakeLists.txt files changed, add disable_build.

Rule 3: Only skip/expect list changes

Condition: ALL changed files are test/xpu/skip_list_common.py, test/xpu/expect/, test/xpu/extended/skip_list_*.py, or test/xpu/test_decomp_xpu.py (pure skip list / expect file updates with no test logic change).

Labels: disable_all

Rationale: Skip list changes don't need functional validation beyond lint.

Rule 4: Test infrastructure changes

Condition: Changed files include test/xpu/xpu_test_utils.py or test/xpu/run_test_with_skip.py (test infrastructure used by all test suites).

Labels: disable_e2e, disable_distributed

Rationale: Test infrastructure affects all UT suites across platforms, so UT must run and disable_win must NOT be added. E2E and distributed use separate infrastructure.

Additional: Always add disable_build (test-only changes don't need source build).

Rule 5: Test-only changes

Condition: ALL changed files are under test/ (excluding files handled by Rules 3-4).

Labels (base): disable_e2e, disable_distributed

Additional modifiers:

  • If files are ONLY under test/xpu/functorch/ or test/xpu/dynamo/ or test/xpu/higher_order_ops/: add disable_win
  • If NO files under paths covered by Windows UT (test/xpu/test_ops*.py, test/xpu/core/, test/xpu/test_nn*.py): add disable_win

Additional: Always add disable_build (test-only changes don't need source build).

Rule 6: Kernel/operator source changes (src/)

Condition: Changed files include src/ATen/ or src/xccl/ (but NOT src/*.cmake, src/CMakeLists.txt, or src/Build*.cmake — those are build system files, see Rule 7).

Labels: Depends on which subdirectory:

  • src/ATen/ only (kernel/operator code, no xccl):
    • Base: disable_e2e, disable_distributed
    • Do NOT add disable_win — kernel fixes may be platform-specific (e.g. a fix specifically for Windows)
  • src/xccl/ involved (distributed communication backend):
    • Base: disable_e2e only — do NOT add disable_distributed (xccl changes must run distributed tests)
    • Add disable_win (xccl is Linux-only)

Note: Do NOT add disable_build — source changes require compilation.

Rule 7: Build system changes

Condition: Changed files include cmake/, CMakeLists.txt, src/**/*.cmake, src/Build*.cmake, or tools/.

Labels: None (or minimal). Build system changes need full CI validation.

If ONLY build system files changed (no test, no kernel): disable_e2e, disable_distributed

Rule 8: Mixed changes (fallback)

Condition: None of the above rules fully apply (mixed src + test + CI, etc.).

Labels: Apply the INTERSECTION of what each individual file category would disable.

  • If any src/ file changed: do NOT add disable_build
  • If any cmake//CMakeLists.txt changed: do NOT add disable_build
  • Only disable a job if ALL changed files agree it should be disabled

disable_build Logic (cross-cutting)

disable_build can be added whenever ALL of these are true:

  • No files changed in src/ (excluding src/**/*.py)
  • No files changed in cmake/
  • No CMakeLists.txt changed
  • No files changed in tools/ that affect the build

When disable_build is applied, CI uses nightly wheel instead of building from source.

Output Format

When used by the auto-label workflow, output ONLY the label names as a comma-separated list:

disable_e2e,disable_distributed,disable_win

If no labels should be applied (full CI needed), output:

none

Important Notes

  1. disable_auto label — When manually added to a PR, auto-labeling is completely disabled for that PR. The workflow will skip without allocating a runner. This label should only be added manually by humans (never by automation) to opt out of auto-labeling when full manual control over CI labels is needed.
  2. PRs with ai_generated label should still follow these rules (they need CI validation).
  3. When in doubt, disable less. It's better to run unnecessary CI than to miss a regression.

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.