github-actions

github-actions is a cursor rule for Cursor from sanjeed5/awesome-cursor-rules-mdc. It costs 2,503 tokens per session, scanned C, original, CC0-1.0.

A set of guidelines for GitHub Actions workflows. GitHub Actions runs automated jobs such as building and testing code when repository events occur.

In plain words
What is it for?
Use it to create reusable workflows and shared actions for tasks such as checking out code, installing dependencies, building, and testing projects.
Why use it?
It helps remove duplicated workflow steps and makes automated builds and tests easier to maintain and secure.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uses: ./.github/workflows/reusable-build.yml.

Good fit Use it to create reusable workflows and shared actions for tasks such as checking out code, installing dependencies, building, and testing projects.

Compare 6 cursor rules from other repositories ↓
About the project

awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.

sanjeed5/awesome-cursor-rules-mdc · 3,571 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdc
agentmods
npx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/github-actions

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for github-actions

README.md
[![agentmods](https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/github-actions.svg)](https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/github-actions)
Your own site
<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/github-actions"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/github-actions.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,503 This file is loaded in full into every session.
When invoked 2,503 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02503 $0.02503
Opus 5 $0.01252 $0.01252
Sonnet 5 $0.00501 $0.00501
Haiku 4.5 $0.00250 $0.00250

Measured 3d ago against content hash 22811948ce1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

github-actions scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- run: echo "Title: ${{ github.event.pull_request.title }}" # Vulnerable to `"; rm -rf /"`
rules-mdc/github-actions.mdc · 389 lines

How it starts

The opening of the file, as written. The whole thing — 389 lines — stays where its author put it; the contents beside it link to each section on GitHub.

github-actions Best Practices

GitHub Actions is the backbone of modern CI/CD. Adhering to these best practices ensures your workflows are efficient, secure, and maintainable. This guide is your definitive reference for building high-quality pipelines.

1. Workflow Design & Code Organization

Structure your workflows for clarity, reusability, and efficiency.

1.1 Use Reusable Workflows and Composite Actions

Avoid duplication. Abstract common sequences into reusable workflows or composite actions.

❌ BAD: Duplicated Steps

# .github/workflows/build-frontend.yml
jobs:
  build:
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npm run build

# .github/workflows/build-backend.yml
jobs:
  build:
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4 # Duplicated setup
        with: { node-version: '20' }
      - run: npm ci # Duplicated install
      - run: npm run build:backend # Different build step

✅ GOOD: Reusable Workflow

# .github/workflows/reusable-build.yml
on:
  workflow_call:
    inputs:
      build-script: { required: true, type: string }
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: ${{ inputs.build-script }}

# .github/workflows/frontend.yml
jobs:
  build:
    uses: ./.github/workflows/reusable-build.yml
    with: { build-script: 'npm run build:frontend' }

# .github/workflows/backend.yml
jobs:
  build:
    uses: ./.github/workflows/reusable-build.yml
    with: { build-script: 'npm run build:backend' }

1.2 Name Jobs and Steps Consistently

Use clear, descriptive names for jobs and steps. This improves readability and debugging.

❌ BAD: Vague Naming

jobs:
  job1:
    steps:
      - run: echo "hello"
      - run: npm test

# logs will show 'Run echo "hello"' and 'Run npm test'

Read the full file on GitHub · 389 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 389 lines · 2,503 tokens per session scan C 22811948ce1f

Subscribe to this mod's changes

github-actions is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,503 tokens to every session, about $0.0125 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.