mac-maintenance — Claude Code skill: what it does, how to install
mac-maintenance automates macOS maintenance by upgrading Homebrew packages, pulling clean git repositories, and emptying the Trash.
MIT 117 installs ★ 7,554 updated 2026-10-20
npx skills add steipete/agent-scripts --skill mac-maintenance -a claude-codeWhat mac-maintenance does
The skill runs a short macOS cleanup routine. It begins by triggering brew update && brew upgrade. Next, it scans folders under ~/Projects/*/.git, inspecting each working tree with git status --short --branch before running git pull --ff-only.
Dirty repositories remain untouched unless you specifically request handling them, and their paths are reported back. The sequence then empties the macOS Trash through an AppleScript call to Finder, closing with a brief tally of upgraded packages, touched repositories, and Trash status.
Because the git scan specifically targets ~/Projects, checkouts located elsewhere are ignored.
What it helps with
- upgrade Homebrew formulas and casks
- fast-forward clean git repositories under Projects
- empty macOS Trash using Finder
- review a concise status report of updated repositories and packages
Example prompts for the agent
- Run mac cleanup and refresh my repos
- Perform mac-maintenance on Homebrew and Projects
- Run system maintenance and empty the trash
How to install mac-maintenance
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill mac-maintenance -a claude-code2Manually: put the files in place
~/.claude/skills/mac-maintenance/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mac-maintenance/
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill mac-maintenance -a codex2Manually: put the files in place
.agents/skills/mac-maintenance/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill mac-maintenance -a cursor2Manually: put the files in place
.cursor/skills/mac-maintenance/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install steipete/agent-scripts skills/mac-maintenance2Manually: put the files in place
.github/skills/mac-maintenance/SKILL.md1Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill mac-maintenance -a gemini-cli2Platform CLI
gemini skills install https://github.com/steipete/agent-scripts --path skills/mac-maintenanceManually: put the files in place
.devin/skills/mac-maintenance/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add steipete/agent-scripts --skill mac-maintenance -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mac-maintenance
How to install mac-maintenance in Claude Code?
Run npx skills add steipete/agent-scripts --skill mac-maintenance -a claude-code in your terminal.
What does mac-maintenance do?
It upgrades Homebrew packages, runs fast-forward git pulls across clean repos in ~/Projects, and empties the macOS Trash.
How does the skill handle dirty git repositories?
It skips dirty trees by default, keeping your uncommitted work safe while reporting skipped directories in the final summary.
Source text
SKILL.md · MIT
---
name: mac-maintenance
description: "Mac upkeep: brew update/upgrade, pull clean repos, empty Trash."
---
# Mac Maintenance
Use when Peter asks for Mac cleanup, maintenance, or package/repo refresh.
## Run
1. Homebrew:
```bash
brew update && brew upgrade
```
2. Repos under `~/Projects`:
```bash
for repo in ~/Projects/*/.git; do
dir=${repo:h}
git -C "$dir" status --short --branch
git -C "$dir" pull --ff-only
done
```
Skip dirty repos unless Peter explicitly asked to handle them. Report skipped paths.
3. Empty Trash:
```bash
osascript -e 'tell application "Finder" to empty trash'
```
4. Finish with terse counts:
- brew: upgraded / already current
- repos: pulled / skipped / failed
- trash: emptied / failed
© steipete · MIT · steipete/agent-scripts