config / rules
Cursor rule1 starsChanged 8 days agoApache-2.0View on GitHub
GitHub Actions Workflows Instructions
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,181 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .apm/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- .cursor/rules/agent-skills.mdcCursor rule
- .cursor/rules/bats.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/go-test.mdcCursor rule
- .cursor/rules/instructions.mdcCursor rule
- .cursor/rules/markdown.mdcCursor rule
- .cursor/rules/shell-script.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
The file
We split this github-actions-workflow.mdc into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Keep map keys in alphabetical order (A-Z) within each block (see ORD-01 in Guidelines for review wording):
- Very specific: line 74
Keep map keys alphabetically ordered per ORD-01 in companion github-actions-workflow rules (stem github-actions-workflow).
- Very specific: line 83
Keep permissions at least privilege and avoid unnecessary write scopes.
- Distinctive: line 85
Prefer commit SHA pinning for third-party actions and document reasons for exceptions.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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.
Files
---
description: GitHub Actions Workflows Instructions
globs: .github/workflows/**/*.yaml, .github/workflows/**/*.yml, .github/actions/**/action.yml
---
# GitHub Actions Workflows Instructions
## Scope
- Scope covers designing, updating, and validating GitHub Actions workflows and composite action definitions.
## Standards
### Key Ordering
Keep map keys in alphabetical order (A-Z) within each block (see ORD-01 in Guidelines for review wording):
| Scope | In-scope key maps |
| ----------------------------- | --------------------------------------------------------------------------------- |
| Workflow and job | `env`, `outputs`, `permissions`, `secrets`, `with` |
| Reusable workflow declaration | `on.workflow_call.inputs`, `on.workflow_call.outputs`, `on.workflow_call.secrets` |
| Composite `action.yml` | `inputs`, `outputs`; per-step `env`, `with` |
Any `env`, `inputs`, `outputs`, `permissions`, `secrets`, or `with` map is in scope. Out of scope for alphabetical ordering: `jobs` map keys and `on` trigger keys (keep semantic order). `steps` are ordered lists, not key maps.
Enforced by the `github-actions-validation` ORD-01 step (map key order check, run before actionlint, ghalint, and zizmor); also apply during edits.
## Guidelines
### Best Practices (BP)
- BP-01 (SHOULD): Extract shared pipelines to reusable workflows/composites
- BP-02 (SHOULD): Declare job dependencies with needs
- BP-03 (SHOULD): Keep secrets at minimal env scope
- BP-04 (SHOULD): Explicit with: for security/cache/core action inputs
### Error Handling (ERR)
- ERR-01 (SHOULD): Limit continue-on-error to non-critical justified steps
- ERR-02 (SHOULD): Use if: failure()/always() for cleanup/notify uploads
- ERR-03 (SHOULD): Set timeout-minutes on jobs or long steps
### Global / Base (G)
- G-01 (SHOULD): Narrow on triggers by branch/path/event
- G-02 (SHOULD): Production jobs use environment + approval
### Ordering (ORD)
- ORD-01 (MUST): Alphabetize keys in env/inputs/outputs/permissions/secrets/with maps
### Performance (PERF)
- PERF-01 (SHOULD): Deterministic cache keys invalidated by dependency changes
- PERF-02 (SHOULD): Balance matrix/parallelism vs runner cost
- PERF-03 (SHOULD): Cancel redundant runs with concurrency (caller-owned for reusable)
### Security (SEC)
- SEC-01 (MUST): Reference secrets only via secrets.\*; never echo them
- SEC-02 (MUST): Restrict pull_request_target on fork PRs
- SEC-03 (SHOULD): Mask sensitive values in logs (::add-mask / setSecret)
- SEC-04 (SHOULD): Validate/sanitize env inputs before use
- SEC-05 (SHOULD): Public repos gate privileged steps on private/trusted context
### Tool Integration (TOOL)
- TOOL-01 (SHOULD): Wire reviewdog for PR inline lint feedback when applicable
- TOOL-02 (SHOULD): Upload coverage to Codecov with a clear fail policy
- TOOL-03 (SHOULD): Set artifact retention intentionally (not default forever)
### Anti-Patterns (AP)
- AP-01 (MUST): Echoing or logging secrets
- AP-02 (MUST): pull_request_target on untrusted fork PRs without guards
- AP-03 (SHOULD): Floating third-party action tags
- AP-04 (SHOULD): Overly broad workflow permissions
- AP-05 (SHOULD): Passing untrusted PR input directly to shell
### Code Modification Guidelines
- Keep map keys alphabetically ordered per ORD-01 in companion github-actions-workflow rules (stem `github-actions-workflow`).
## Testing and Validation
On-demand validation: see github-actions-validation skill SKILL.md.
## Security Guidelines
- Keep `permissions` at least privilege and avoid unnecessary `write` scopes.
- Reference secrets only via `${{ secrets.* }}` and never print them to logs.
- Prefer commit SHA pinning for third-party actions and document reasons for exceptions.
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
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.

