github-actions
Original:🇺🇸 English
Translated
Create and audit GitHub Actions workflows with SHA pinning, permissions, and caching checks. Use when adding CI/CD, reviewing workflow files, or fixing action pinning.
14installs
Sourcetartinerlabs/skills
Added on
NPX Install
npx skill4agent add tartinerlabs/skills github-actionsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Language Conventions
Infer language style from the project:
- Analyse existing workflows, commit messages, and documentation to detect the project's language variant (US English, UK English, etc.)
- Match the spelling conventions found in the project (e.g., "optimize" vs "optimise", "customize" vs "customise")
- Maintain consistency with the project's established language style throughout workflow files and comments
Mode Detection
Determine the mode based on context:
- Create mode: No directory exists, or user explicitly asks to create/add a workflow
.github/workflows/ - Audit mode: files exist, or user explicitly asks to audit/review/fix workflows
.github/workflows/*.yml
Create Mode
1. Detect Project Type
Scan for project indicators:
- → Node.js/JS/TS
package.json - → Go
go.mod - /
requirements.txt/pyproject.toml→ Pythonsetup.py - → Rust
Cargo.toml - → Ruby
Gemfile
2. Detect Package Manager (JS/TS projects)
- → pnpm
pnpm-lock.yaml - /
bun.lock→ bunbun.lockb - → yarn
yarn.lock - → npm
package-lock.json
3. Generate Workflow
Apply all rules from the directory when generating workflows. Read each rule file for detailed requirements and examples.
rules/4. Workflow Template
Adapt this CI template to the detected project type and package manager (replace with the detected package manager):
<pm>yaml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: '<pm>'
- run: <pm> install --frozen-lockfile
- run: <pm> check
- run: <pm> test
- run: <pm> buildAudit Mode
1. Scan Workflows
Read all files in and audit against every rule in the directory.
.github/workflows/*.ymlrules/2. Report Format
## GitHub Actions Audit Results
### HIGH Severity
- `.github/workflows/ci.yml:15` - `codecov/codecov-action@v4` → pin to commit SHA
### MEDIUM Severity
- `.github/workflows/ci.yml` - Missing concurrency group → add concurrency block
### Summary
- High: X
- Medium: Y
- Low: Z
- Files scanned: N3. Auto-Fix
After reporting, apply fixes using the Edit tool. Look up commit SHAs for pinning using .
gh apiRules
Read individual rule files for detailed checks and examples:
| Rule | Severity | File |
|---|---|---|
| Action pinning | HIGH | |
| Permissions | HIGH | |
| Concurrency | MEDIUM | |
| Node version | MEDIUM | |
| Caching | MEDIUM | |
| Triggers | LOW | |
| Matrix strategy | LOW | |
Assumptions
- GitHub CLI () is available for looking up action commit SHAs
gh - The project is hosted on GitHub