Index of every page on this site: llms.txt
All skills
Run it yourself

Audits a repository's GitHub Actions workflows for CI optimization opportunities — missing caches, redundant setup, sleep-based readiness, long test jobs without sharding, full-history checkout, dead env vars, build-cache misconfig, and ~60 more patterns across caching, redundancy, parallelization, conditional execution, trigger scope, and hidden failures. Use when: (1) analyzing a repo's CI for optimization opportunities, (2) producing a prioritized report with measured wall-clock and runner-minute savings, (3) re-auditing after upstream CI changes. Do not trigger for: general CI setup help, writing new workflows from scratch, non-GitHub-Actions CI systems, or security/posture audits — use `ci-secure` for those.

Use this Skill: https://skilld.dev/gh/starslingdev/skills/ci-speedup

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespatternsopt33-no-draft-pr-gating-on-expensive-jobs.md

≈660 tokens on demand. Your agent reads this file only when SKILL.md points to it.

OPT33 — No Draft PR Gating on Expensive Jobs

TL;DR: Expensive jobs run on draft PRs that are still works-in-progress, burning CI on code that isn't ready for review yet.

Anti-pattern: Expensive jobs run on draft PRs where the code is still being worked on.

Detection heuristic:

# Check for draft PR condition in job-level if:
grep -rn 'pull_request' .github/workflows/ -A 10
# Flag expensive jobs missing: if: github.event.pull_request.draft == false

Fix: Add if: github.event.pull_request.draft == false to expensive jobs. Job-level gating is the documented-safe shape — a skipped job reports Success and satisfies a required status check, where narrowing the pull_request trigger cannot express draft-ness at all (the default types: — opened/synchronize/reopened — fires on drafts too) and a mis-narrowed types: list leaves required checks "Pending" and blocks merges. When you add the draft if:, also ADD ready_for_review to types: (it is NOT in the default set): without it, no event fires when the draft flips to ready, and the head commit's required check keeps its draft-time "Success (skipped)" — the PR can merge with the expensive job never having run.

Required-status-check caveat: treat required-status UNKNOWN as required — when branch protection/rulesets are unreadable, assume every check this workflow produces may be required, and keep the gating at job level (the "Pending" landmine; see OPT32's caveat for the full mechanism and the community-workaround labeling rule).

Activation-fidelity gate (only flag jobs that actually run on every PR): the detector must confirm the job runs on a normal PR open/update before claiming it "runs on every PR including drafts". A job is NOT every-PR — and must NOT be flagged — when the pull_request: trigger is gated by types: to a non-lifecycle activity (e.g. types: [labeled], which only fires when a label is added), or the job's own if: gates on the activity (github.event.label / contains(github.event.pull_request.labels.*.name, …) / github.event.action == '<non-lifecycle>'). GitHub's default types: is exactly {opened, synchronize, reopened}; a draft if: is a separate concern, not an activity gate. (Shared _pr_trigger_runs_every_pr / _job_runs_on_every_pr in scan.py, also used by OPT39/OPT40.)


Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    The skill is a robust CI optimization tool that audits GitHub Actions workflows. It identifies performance bottlenecks using deterministic logic and provides analysis of job logs. While it processes untrusted log data, it includes strong defensive instructions to mitigate indirect prompt injection. A minor best-practice issue regarding unsafe YAML loading was identified in a utility script.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: CRITICAL · 2 issues

Signed by skilld at 9a84115. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated yesterday

README badge

README badge for starslingdev/skills/ci-speedup