secondsky/claude-skills / plugins/github-project-automation/skills/github-project-automation
github-project-automation
VerifiedGitHub repository automation (CI/CD, issue templates, Dependabot, CodeQL). Use for project setup, Actions workflows, security scanning, or encountering YAML syntax, workflow configuration, template structure errors.
templates/workflows/scheduled-maintenance.yml
View on GitHub# Scheduled Maintenance Workflow
# Runs periodic tasks on a schedule
#
# Triggers on: schedule (cron)
# Tasks: Dependency updates check, cache cleanup, health checks
name: Scheduled Maintenance
on:
schedule:
# Run every Sunday at 00:00 UTC
- cron: '0 0 * * 0'
workflow_dispatch: # Allow manual triggering
# Least privilege: read-only by default; only the cache-cleanup job opts
# into actions: write, which the cache management API requires.
permissions:
contents: read
# Scheduled maintenance should never kill an in-progress maintenance run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
dependency-audit:
name: Security Audit
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: '20'
- name: Run npm audit
run: |
echo "Running security audit..."
npm audit --production || true
echo "Audit complete. Check for vulnerabilities above."
- name: Check for outdated dependencies
run: |
echo "Checking for outdated dependencies..."
npm outdated || true
cache-cleanup:
name: Clean Old Caches
runs-on: ubuntu-24.04
timeout-minutes: 10
# actions: write is required by the cache management API (gh cache delete).
permissions:
contents: read
actions: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Clean old caches
run: |
echo "Cleaning caches older than 7 days..."
gh cache list --limit 100 | while read -r line; do
CACHE_ID=$(echo "$line" | awk '{print $1}')
CACHE_AGE=$(echo "$line" | awk '{print $NF}')
# Delete if older than 7 days
if [[ "$CACHE_AGE" == *"days ago"* ]]; then
DAYS=$(echo "$CACHE_AGE" | awk '{print $1}')
if [ "$DAYS" -gt 7 ]; then
echo "Deleting cache $CACHE_ID (${DAYS} days old)"
gh cache delete "$CACHE_ID" || true
fi
fi
done
env:
GH_TOKEN: ${{ github.token }}
health-check:
name: Health Check
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check production endpoint
run: |
echo "Checking production health..."
# Replace with your actual health check endpoint
curl -f https://your-app.com/health || exit 1
echo "✅ Health check passed"
- name: Check build time
run: |
echo "Testing build performance..."
START=$(date +%s)
# Add your build command here
# npm run build
END=$(date +%s)
DURATION=$((END - START))
echo "Build took ${DURATION} seconds"
if [ "$DURATION" -gt 300 ]; then
echo "⚠️ Build is slow (>${DURATION}s)"
fi
report:
name: Generate Report
needs: [dependency-audit, cache-cleanup, health-check]
runs-on: ubuntu-24.04
timeout-minutes: 10
if: always()
steps:
- name: Summary
run: |
echo "=== Weekly Maintenance Report ==="
echo "Date: $(date)"
echo ""
echo "Security Audit: ${{ needs.dependency-audit.result }}"
echo "Cache Cleanup: ${{ needs.cache-cleanup.result }}"
echo "Health Check: ${{ needs.health-check.result }}"
echo ""
echo "Review details in job logs above."
# Optionally send notification
# - name: Send notification
# if: failure()
# run: |
# curl -X POST ${{ secrets.SLACK_WEBHOOK_URL }} \
# -H 'Content-Type: application/json' \
# -d '{"text":"⚠️ Weekly maintenance job failed!"}'
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |