
Finops Caches
- 55 installs
- 49 repo stars
- Updated August 4, 2026
- laurigates/claude-plugins
Helps with ai & agent building tasks.
About
finops-caches is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- finops-caches
- AI & Agent Building
- AI-coding skill
Finops Caches by the numbers
- 55 all-time installs (skills.sh)
- Ranked #6,846 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/laurigates/claude-plugins --skill finops-cachesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 55 |
|---|---|
| repo stars | ★ 49 |
| Last updated | August 4, 2026 |
| Repository | laurigates/claude-plugins ↗ |
What it does
Helps with ai & agent building tasks.
Files
/finops:caches
Analyze GitHub Actions cache usage - size breakdown, cache key patterns, branch distribution, and stale cache detection.
When to Use
| Scenario | Use this skill | Alternative |
|---|---|---|
| Cache usage near limit or unknown | /finops:caches | - |
| Identify stale or orphaned PR caches | /finops:caches | - |
| Review cache key strategy effectiveness | /finops:caches | - |
| Quick overall repo health check | /finops:overview | Start with overview first |
| Compare cache usage across repos | /finops:compare | Use compare for multi-repo view |
| Optimize workflow triggers, not caches | /finops:waste | Use waste for workflow-level issues |
Context
- Current repo URL: !
git remote get-url origin
Parameters
| Parameter | Description | Default |
|---|---|---|
repo | Repository in owner/name format | Current repository |
org:orgname | Analyze org-wide cache usage | - |
Execution
bash "${SKILL_DIR}/scripts/cache-analysis.sh" $ARGSOutput Format
=== Cache Analysis: org/repo ===
Summary:
45 caches, 2340MB used
23% of 10GB limit
=== By Key Prefix ===
node-modules: 12 caches, 1200MB
playwright: 8 caches, 800MB
turbo: 15 caches, 300MB
=== By Branch ===
main: 10 caches, 500MB
develop: 8 caches, 400MB
PR 123: 3 caches, 150MB
PR 118: 3 caches, 140MB
=== Largest Caches ===
node-modules-linux-abc123: 180MB
playwright-linux-def456: 150MB
=== Stale Caches (>7 days old) ===
8 stale caches, 450MB reclaimable
Oldest: 2025-01-15T10:30:00Z
=== PR Branch Caches ===
12 PR caches, 580MB (check if PRs are merged/closed)Agentic Optimizations
| Context | Command |
|---|---|
| Cache list (JSON) | gh api "/repos/{owner}/{repo}/actions/caches?per_page=100" --jq '.actions_caches' |
| Total cache count | gh api "/repos/{owner}/{repo}/actions/caches" --jq '.total_count' |
| Delete stale cache | gh api -X DELETE "/repos/{owner}/{repo}/actions/caches/{id}" |
| Cache key search | gh api "/repos/{owner}/{repo}/actions/caches?key=prefix" --jq '.actions_caches[].key' |
| Compact summary | bash "${SKILL_DIR}/scripts/cache-analysis.sh" $ARGS |
Post-actions
Based on findings, suggest:
- High % of limit -> Clean up stale caches, review key strategies
- Many PR caches -> Add cache cleanup workflow for closed PRs
- Large single caches -> Consider splitting or compressing
- Stale caches -> Provide cleanup command:
# Delete stale caches
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq '.actions_caches[] | select(.last_accessed_at < "CUTOFF") | .id' | \
while read id; do gh api -X DELETE "/repos/$REPO/actions/caches/$id"; done#!/usr/bin/env bash
# Cache Analysis
# Analyzes GitHub Actions cache usage: size breakdown, key patterns,
# branch distribution, stale cache detection.
# Usage: bash cache-analysis.sh [repo|org:orgname]
#
# Modes:
# repo Per-repo analysis (default: current repo)
# org:orgname Org-wide top repos by cache size
# shellcheck disable=SC2016 # jq expressions use $ for variable references, not shell expansion
set -euo pipefail
ARG="${1:-$(gh repo view --json nameWithOwner --jq '.nameWithOwner')}"
# === Org-wide mode ===
if [[ "$ARG" == org:* ]]; then
ORG="${ARG#org:}"
echo "=== Org Cache Usage: $ORG ==="
gh api "/orgs/$ORG/actions/cache/usage" \
--jq '"Total: \(.total_active_caches_count) caches, \(.total_active_caches_size_in_bytes / 1024 / 1024 | floor)MB"'
echo ""
echo "=== Top Repos by Cache Size ==="
gh repo list "$ORG" --json nameWithOwner --limit 100 --jq '.[].nameWithOwner' | while read -r repo; do
result=$(gh api "/repos/$repo/actions/cache/usage" 2>/dev/null || echo "")
if [ -n "$result" ]; then
size=$(echo "$result" | jq -r '.active_caches_size_in_bytes // 0')
count=$(echo "$result" | jq -r '.active_caches_count // 0')
if [ "$size" -gt 0 ]; then
echo "$repo|$count|$size"
fi
fi
done | sort -t'|' -k3 -n -r | head -15 | while IFS='|' read -r repo count size; do
mb=$((size / 1024 / 1024))
echo " $repo: $count caches, ${mb}MB"
done
exit 0
fi
# === Per-repo mode ===
REPO="$ARG"
echo "=== Cache Analysis: $REPO ==="
echo ""
echo "Summary:"
gh api "/repos/$REPO/actions/cache/usage" \
--jq '" \(.active_caches_count) caches, \(.active_caches_size_in_bytes / 1024 / 1024 | floor)MB used"'
SIZE=$(gh api "/repos/$REPO/actions/cache/usage" --jq '.active_caches_size_in_bytes')
LIMIT=$((10 * 1024 * 1024 * 1024)) # 10GB
PCT=$((SIZE * 100 / LIMIT))
echo " $PCT% of 10GB limit"
echo ""
echo "=== By Key Prefix ==="
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq '.actions_caches | group_by(.key | split("-") | .[0:2] | join("-")) |
map({
prefix: .[0].key | split("-") | .[0:2] | join("-"),
count: length,
size_mb: (map(.size_in_bytes) | add / 1024 / 1024 | floor)
}) |
sort_by(-.size_mb)[] |
" \(.prefix): \(.count) caches, \(.size_mb)MB"'
echo ""
echo "=== By Branch ==="
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq '.actions_caches | group_by(.ref) |
map({
branch: (.[0].ref | sub("refs/heads/"; "") | sub("refs/pull/"; "PR ")),
count: length,
size_mb: (map(.size_in_bytes) | add / 1024 / 1024 | floor)
}) |
sort_by(-.size_mb)[] |
" \(.branch): \(.count) caches, \(.size_mb)MB"'
echo ""
echo "=== Largest Caches ==="
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq '.actions_caches | sort_by(-.size_in_bytes) | .[0:10][] |
" \(.key | .[0:60]): \(.size_in_bytes / 1024 / 1024 | floor)MB"'
echo ""
echo "=== Stale Caches (>7 days old) ==="
CUTOFF=$(date -d '7 days ago' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-7d +%Y-%m-%dT%H:%M:%SZ)
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq --arg cutoff "$CUTOFF" '
[.actions_caches[] | select(.last_accessed_at < $cutoff)] |
{
count: length,
size_mb: (map(.size_in_bytes) | add / 1024 / 1024 | floor // 0),
oldest: (sort_by(.last_accessed_at) | .[0].last_accessed_at // "none")
} |
" \(.count) stale caches, \(.size_mb)MB reclaimable\n Oldest: \(.oldest)"'
echo ""
echo "=== PR Branch Caches ==="
gh api "/repos/$REPO/actions/caches?per_page=100" \
--jq '[.actions_caches[] | select(.ref | startswith("refs/pull/"))] |
{
count: length,
size_mb: (map(.size_in_bytes) | add / 1024 / 1024 | floor // 0)
} |
" \(.count) PR caches, \(.size_mb)MB (check if PRs are merged/closed)"'
Related skills
AI & Agent Buildingagents