agentleFS
ivangrynenkoivangrynenko/cursorrules/.cursor/rules/github-actions-standards.mdc

cursorrules / rules

Cursor rule88 starsChanged 13 months agoMITView on GitHub

Ensures GitHub Actions workflows follow best practices and use the latest action versions.

  • Reads credentials

The file

We split this github-actions-standards.mdc into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Latest Action Versions: Always use the latest stable versions of GitHub Actions.

    line 29
  2. Very specific:

    Security: Use GITHUB_TOKEN with minimum required permissions.

    line 37
  3. Distinctive:

    Artifacts: Use descriptive names for artifacts and set appropriate retention periods.

    line 38
  4. Distinctive:

    Matrix Strategy: Use matrix builds for testing across multiple environments.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
github-actions-standards.mdc
---
description: 
globs: .github/workflows/*.yml
alwaysApply: false
---
 # GitHub Actions Standards

Ensures GitHub Actions workflows follow best practices and use the latest action versions.

## Rule Details

- **Name:** github_actions_standards

- **Description:** Enforce standards for GitHub Actions workflows

## Filters
- file extension pattern: `\\.ya?ml$`
- file path pattern: `\\.github/workflows/`

## Enforcement Checks
- Conditions:
  - pattern `uses:\\s*actions/upload-artifact@v[123]` – Use actions/upload-artifact@v4 instead of older versions. Version 3 is deprecated: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
  - pattern `uses:\\s*actions/download-artifact@v[123]` – Use actions/download-artifact@v4 instead of older versions.
  - pattern `uses:\\s*actions/checkout@v[12]` – Consider using actions/checkout@v4 for the latest features and security updates.

## Suggestions
- Guidance:
**GitHub Actions Best Practices:**
- **Latest Action Versions:** Always use the latest stable versions of GitHub Actions.
  - `actions/checkout@v4`
  - `actions/upload-artifact@v4`
  - `actions/download-artifact@v4`
  - `actions/setup-node@v4`
  - `actions/setup-python@v5`
- **Workflow Structure:** Organize workflows with clear job names and step descriptions.
- **Caching:** Implement caching for dependencies to speed up workflows.
- **Security:** Use `GITHUB_TOKEN` with minimum required permissions.
- **Artifacts:** Use descriptive names for artifacts and set appropriate retention periods.
- **Matrix Strategy:** Use matrix builds for testing across multiple environments.
- **Timeouts:** Set appropriate timeouts for jobs to prevent hanging workflows.

## Validation Checks
- Conditions:
  - pattern `uses:\\s*actions/upload-artifact@v4` – Good job using the latest version of actions/upload-artifact!
  - pattern `uses:\\s*actions/download-artifact@v4` – Good job using the latest version of actions/download-artifact!
  - pattern `uses:\\s*actions/checkout@v[34]` – Good job using a recent version of actions/checkout!

## Metadata
- Priority: high
- Version: 1.1
- Tags: ci/cd, github, automation

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.