Skills github-actions
Use when adding CI/CD, creating workflows, auditing GitHub Actions, or fixing action pinning. Creates and audits workflows for SHA pinning and permissions.
install
source · Clone the upstream repo
git clone https://github.com/tartinerlabs/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/tartinerlabs/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/github-actions" ~/.claude/skills/tartinerlabs-skills-github-actions && rm -rf "$T"
manifest:
skills/github-actions/SKILL.mdsource content
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/TSpackage.json
→ Gogo.mod
/requirements.txt
/pyproject.toml
→ Pythonsetup.py
→ RustCargo.toml
→ RubyGemfile
2. Detect Package Manager (JS/TS projects)
→ pnpmpnpm-lock.yaml
/bun.lock
→ bunbun.lockb
→ yarnyarn.lock
→ npmpackage-lock.json
3. Generate Workflow
Apply all rules from the
rules/ directory when generating workflows. Read each rule file for detailed requirements and examples.
4. Workflow Template
Adapt this CI template to the detected project type and package manager (replace
<pm> with the detected package manager):
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> build
Audit Mode
1. Scan Workflows
Read all files in
.github/workflows/*.yml and audit against every rule in the rules/ directory.
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: N
3. Auto-Fix
After reporting, apply fixes. Look up commit SHAs for pinning using
gh api.
Rules
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 SHAsgh - The project is hosted on GitHub