Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

mlflowот mlflow★ 29 044 звезды на GitHub

Об этом скилле

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). 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

Полный SKILL.md на GitHub

Установить github-actions-style в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл 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.

Как установить скилл github-actions-style?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-actions-style запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-actions-style с