AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

github-actions-efficiency

Audit GitHub Actions workflow efficiency and recommend fixes to reduce CI minutes and costs.

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read github--github-actions-efficiency at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 5

references/patterns.md

Canonical Patterns

Load this reference only when you need concrete examples during implementation.

Dependency Cache

- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
    restore-keys: |
      ${{ runner.os }}-node-

Adapt the cache path and invalidation file to the repo's ecosystem.

Cancel Stale Runs

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Scope Triggers

on:
  push:
    paths:
      - "src/**"
      - "tests/**"
      - "package.json"

Use paths-ignore when exclusion is easier to maintain than inclusion.

Job-Level Changed-File Gating

Use a small change-detection step that emits explicit outputs such as:

  • docs_relevant
  • runtime_relevant
  • compat_relevant
  • run_tests

Gate downstream jobs on those outputs when event-level filters are not expressive enough.

Matrix Reduction

Use the minimum matrix that matches the decision:

  • Full matrix on release
  • Reduced compatibility matrix on sensitive runtime surfaces
  • Single representative leg for ordinary code changes

Optional Write-Back Job

Use label-driven or manual triggers for jobs that mutate the PR branch, such as formatting bots.