Skip to content
Machine Learning
Skill

/github-actions-style

GitHub Actions workflow and composite action conventions for MLflow. Use when writing, modifying, or reviewing workflows in .github/workflows/ or actions in .github/actions/ in this repository.

From plugin
mlflow
29k11 skills

Claude Code

$ npx -y skills add mlflow/mlflow --skill github-actions-style --agent claude-code

SKILL.md

github-actions-style.SKILL.md
name: github-actions-style
description: GitHub Actions workflow and composite action conventions for MLflow. Use when writing, modifying, or reviewing workflows in .github/workflows/ or actions in .github/actions/ in this repository.

GitHub Actions Workflow Guidelines

Name Steps When the Name Adds Information

GitHub Actions UI shows only the first line of an unnamed `run:` step. Add a short, action-oriented `name:` when it explains the whole step better than that line, even if the first command is clear:

# Bad: the GitHub Actions UI shows only the condition.
- run: |
    if [ "$RUN_TESTS" = true ]; then
      npm test
    fi

# Good: the name explains the step.
- name: Run tests
  run: |
    if [ "$RUN_TESTS" = true ]; then
      npm test
    fi

Omit a name that merely restates a self-explanatory command, such as `Install dependencies` for `npm ci`. An action path like `./.github/actions/setup-python` can also speak for itself. Keep names concise; the job name often supplies enough context.

Reinvent the Wheel When It's Cheap

Prefer a small `run:` step or repository script over a third-party action when the behavior is straightforward and cheap to implement and maintain. Use tools already available in the job, such as `gh`, `curl`, or Python. A few lines of code can avoid another dependency to audit, pin, and update, reduce exposure to supply chain attacks, and skip the action's download overhead.

# Bad: adds a dependency just to label a PR
- uses: example/label-pr@...
  with:
    label: needs-review

# Good
- env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    PR_NUMBER: ${{ github.event.pull_request.number }}
    REPO: ${{ github.repository }}
  run: gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label needs-review

Use a third-party action when it provides substantial functionality that would be costly or error-prone to reproduce.

Use `ubuntu-slim` for Lightweight Tasks

Prefer `ubuntu-slim` over `ubuntu-24.04` for simple jobs (e.g., labeling, commenting, notifications).

Note: `ubuntu-slim` has a 15-minute timeout limit. Use `ubuntu-24.04` for long-running jobs (e.g., polling).

# Bad
runs-on: ubuntu-24.04

# Good
runs-on: ubuntu-slim

Use Workflow Context Instead of Fetching

If the trigger event already carries the data, read it from the `github` context instead of calling `gh` or `actions/github-script`. Extra API calls burn rate-limit budget and add a flaky network hop for nothing.

# Bad
- env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    PR_NUMBER: ${{ github.event.pull_request.number }}
  run: |
    HEAD_SHA=$(gh pr view "$PR_NUMBER" --json headRefOid -q .headRefOid)

# Good
- env:
    HEAD_SHA: ${{ github.event.pull_request.head.sha }}
  run: echo "$HEAD_SHA"

Only fetch when the data isn't in the payload (e.g., check runs, review threads, changed files on `issue_comment`).

Prefer Job Conditions Over Shell Guards

When a condition determines whether a job has any work and can be evaluated from workflow contexts, use a job-level `if` instead of starting a `run` script and checking the condition in the shell. GitHub can then skip the job without provisioning a runner.

# Bad: every opened issue provisions a runner before checking its title
jobs:
  label:
    runs-on: ubuntu-slim
    steps:
      - env:
          ISSUE_TITLE: ${{ github.event.issue.title }}
        run: |
          if echo "$ISSUE_TITLE" | grep -qi "bug report"; then
            gh issue edit ... --add-label bug
          fi

# Good: unrelated issues skip the job before a runner is provisioned
jobs:
  label:
    if: contains(github.event.issue.title, 'bug report')
    runs-on: ubuntu-slim
    steps:
      - run: gh issue edit ... --add-label bug

Keep the condition inside `run` when it depends on information produced on the runner or a command's result and cannot be evaluated as a workflow expression.

Prefer `gh` CLI over `actions/github-script`

For simple GitHub API operations (commenting, labeling, cancelling runs, etc.), use `gh` CLI instead of `actions/github-script`. It avoids the need for `actions/checkout` and JavaScript boilerplate.

# Bad
- uses: actions/checkout@...
- uses: actions/github-script@...
  with:
    script: |
      const script = require(".github/workflows/my-script.js");
      await script({ context, github });

# Good
- env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: |
    gh pr comment ...

Benchmark GraphQL Queries to Avoid Timeouts

GitHub terminates any GraphQL request that runs longer than 10 seconds and returns a `502` or `504`. A timeout also deducts extra points from the primary rate limit for the next hour ([docs](https://docs.github.com/en/graphql/overview/rate-limits-and-query-limits-for-the-graphql-api#timeouts)). Nested connections multiply the work, so a query that is fast on a small PR can time out on a large one.

Before adding a GraphQL query to a workflow, time it against realistic inputs, including some large ones (e.g., a PR with many review threads):

time gh api graphql -F owner=mlflow -F repo=mlflow -F number=12345 -f query='...' > /dev/null

If it is not comfortably under the limit, lower `first`/`last` and paginate, reduce nesting, request fewer fields, or split the query.

Prefer `GITHUB_TOKEN` When Its Scope and Trigger Behavior Are Sufficient

Use `${{ secrets.GITHUB_TOKEN }}` by default for operations in the current repository when its job-level permissions are sufficient. Use `actions/create-github-app-token` when access to other repositories or separately scoped credentials is required, or when the resulting GitHub event must trigger another workflow. Events created with `GITHUB_TOKEN` [generally do not trigger workflow runs](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow).

# Bad: this comment does not need to trigger another workflow
- uses: actions/create-githu
Read more
@mlflow
Ships withmlflow

The open source AI engineering platform for agents, LLMs, and ML models. MLflow enables teams of all sizes to debug, evaluate, monitor, and optimize production-quality AI applications while controlling costs and managing access to models and data.

Stars on GitHub

Momentum

stars in total
28.9k
Star history of mlflow/mlflow on GitHub, a chart by star-history.com

Other skills on mlflow.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

@mlflow@mlflowInstall Skill
nightly

nightly

Investigate supplied workflow runs and summarize failures by root cause.

@mlflow@mlflowInstall Skill
python-style

python-style

Python coding and testing conventions for MLflow. Use when writing, modifying, or reviewing Python source files and tests in this…

@mlflow@mlflowInstall Skill
repair

repair

Diagnose pull request problems and propose supported repair actions.

@mlflow@mlflowInstall Skill
resolve

resolve

Address a submitted pull request review and prepare a patch, PR edits, replies, and supporting media.

@mlflow@mlflowInstall Skill
triage

triage

Triage GitHub issues or handle maintainer follow-ups in a sandbox, writing a response and optional verified implementation…

@mlflow@mlflowInstall Skill

More skills from other plugins.

hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills2w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast8d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai5d7.3k
@civitai@civitaiInstall Skill
accessing-mlflow

accessing-mlflow

Query and browse evaluation results stored in MLflow. Use when the user wants to look up runs by invocation ID, compare metrics…

@nvidia@nvidiaInstall Skill

Questions about github-actions-style.

Which coding agents can use github-actions-style?
github-actions-style installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.