go-crypto-wallet / rules
Cursor rule128 starsChanged 6 months agoMITView on GitHub
GitHub Actions Workflow Rules
We split this github-actions.mdc into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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
- Distinctive: line 51
Composite Actions: Create composite actions for repeated steps
- Distinctive: line 52
Matrix Strategy: Use matrix for parallel execution instead of duplicate jobs
- Distinctive: line 70
Always use caching for dependencies:
- Distinctive: line 83
Use path filters to avoid unnecessary runs:
- Distinctive: line 154
Before committing workflow changes:
- Distinctive: line 157
Check for branch name (main not master)
- Very specific: line 158
Verify runner is ubuntu-slim
- Distinctive: line 159
Ensure timeout is set
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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 Workflow Rules
globs: [".github/workflows/*.yml"]
alwaysApply: false
---
# GitHub Actions Workflow Rules
## Overview
Rules for modifying GitHub Actions workflow files (`.github/workflows/*.yml`) in go-crypto-wallet.
## Runner Configuration
### Required Runner
**Always use `ubuntu-slim` as the runner** unless there is a specific reason to use another image.
```yaml
# Good
runs-on: ubuntu-slim
# Avoid (unless specifically needed)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
```
### Why ubuntu-slim?
- Faster startup time (smaller image)
- Lower resource consumption
- Contains essential tools for most CI tasks
- Cost-effective for GitHub Actions minutes
Reference: [GitHub Actions Runner Images](https://github.com/actions/runner-images)
### Available Runners
| Image | YAML Label | Use Case |
|-------|------------|----------|
| Ubuntu Slim | `ubuntu-slim` | **Default choice** - most CI tasks |
| Ubuntu 24.04 | `ubuntu-latest` or `ubuntu-24.04` | When additional tools are required |
| Ubuntu 22.04 | `ubuntu-22.04` | Legacy compatibility |
## Performance Best Practices
### Avoid Duplication
1. **Reusable Workflows**: Extract common patterns into reusable workflows
2. **Composite Actions**: Create composite actions for repeated steps
3. **Matrix Strategy**: Use matrix for parallel execution instead of duplicate jobs
```yaml
# Good: Matrix strategy for parallel execution
strategy:
matrix:
go-version: ['1.22', '1.23']
# Avoid: Duplicate jobs for each version
jobs:
test-go-122:
...
test-go-123:
...
```
### Caching
Always use caching for dependencies:
```yaml
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
```
### Conditional Execution
Use path filters to avoid unnecessary runs:
```yaml
on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
```
## Branch Configuration
### Default Branch
This repository uses `main` as the default branch. Always use `main` (not `master`):
```yaml
# Good
on:
push:
branches:
- main
# Wrong
on:
push:
branches:
- master
```
## Workflow Structure
### Standard Workflow Template
```yaml
name: Workflow Name
on:
push:
branches:
- main
paths:
- 'relevant/paths/**'
pull_request:
branches:
- main
workflow_dispatch: # Manual trigger
jobs:
job-name:
name: Descriptive Job Name
runs-on: ubuntu-slim
timeout-minutes: 10 # Always set timeout
permissions:
contents: read # Minimal permissions
steps:
- uses: actions/checkout@v6
# ... steps
```
### Required Elements
| Element | Required | Description |
|---------|----------|-------------|
| `timeout-minutes` | Yes | Prevent runaway jobs |
| `permissions` | Yes | Principle of least privilege |
| `runs-on: ubuntu-slim` | Yes | Standard runner |
## Verification
Before committing workflow changes:
1. Validate YAML syntax
2. Check for branch name (`main` not `master`)
3. Verify runner is `ubuntu-slim`
4. Ensure timeout is set
5. Review permissions (minimal required)
```bash
# Validate YAML syntax
make yaml-lint
```
## Quick Checklist
- [ ] Runner is `ubuntu-slim`
- [ ] Branch is `main` (not `master`)
- [ ] `timeout-minutes` is set
- [ ] `permissions` block is defined
- [ ] Path filters are used where appropriate
- [ ] Caching is implemented for dependencies
- [ ] No duplicate jobs (use matrix instead)
## Related Documentation
- @.github/workflows/ - Existing workflows
- @.github/labels.yml - Repository labels
## Related Skills
- `devops` - CI/CD and DevOps workflow
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 3,978 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 repository62 other files it gives its agents.
- AGENTS.mdAGENTS.md
- internal/AGENTS.mdAGENTS.md
- pkg/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- internal/CLAUDE.mdCLAUDE.md
- pkg/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/agent-files.mdcCursor rule
- .cursor/rules/apps/bun.mdcCursor rule
- .cursor/rules/apps/eth-contracts.mdcCursor rule
- .cursor/rules/apps/xrp-server.mdcCursor rule
- .cursor/rules/database/atlas-hcl.mdcCursor rule
- .cursor/rules/database/sqlc.mdcCursor rule
- .cursor/rules/documentation-language.mdcCursor rule
- .cursor/rules/general.mdcCursor rule
- .cursor/rules/go/conventions.mdcCursor rule
- .cursor/rules/go/di.mdcCursor rule
- .cursor/rules/go/go-path.mdcCursor rule
- .cursor/rules/go/go-test.mdcCursor rule
- .cursor/rules/internal/application-layer.mdcCursor rule
- .cursor/rules/internal/btc-shared.mdcCursor rule
- .cursor/rules/internal/clean-architecture.mdcCursor rule
- .cursor/rules/internal/cli-structure.mdcCursor rule
- .cursor/rules/internal/domain-layer.mdcCursor rule
- .cursor/rules/internal/dto.mdcCursor rule
- .cursor/rules/internal/infrastructure-layer.mdcCursor rule
- .cursor/rules/internal/interface-adapters-layer.mdcCursor rule
- .cursor/rules/internal/internal-interface.mdcCursor rule
- .cursor/rules/internal/mockery.mdcCursor rule
- .cursor/rules/internal/repository.mdcCursor rule
- .cursor/rules/internal/usecase.mdcCursor rule
- .cursor/rules/proto.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- .cursor/rules/security.mdcCursor rule
- .cursor/rules/shell-script.mdcCursor rule
- .cursor/rules/ssot.mdcCursor rule
- .cursor/rules/task-context-loading.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
- .cursor/rules/yaml.mdcCursor rule
- llms.txtllms.txt
- bch-developmentSkill
- btc-terminologySkill
- db-migrationSkill
- devopsSkill
- docs-ssotSkill
- docs-updateSkill
- fix-pr-reviewSkill
- github-issue-creationSkill
- git-workflowSkill
- go-developmentSkill
- knowledge-gapSkill
- label-context-mappingSkill
- makefile-updateSkill
- mockerySkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- shell-scriptsSkill
- solidity-developmentSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

