Autonomous backup agent for Copilot CLI skills. Your laptop will crash. Your skills won't. Watches, syncs, pushes. Starts on boot, runs forever, zero interaction.
β‘ Install in one line:
curl -fsSL https://raw.githubusercontent.com/DUBSOpenHub/groundhog-day/main/install.sh | bashOr with Homebrew:
brew install DUBSOpenHub/tap/groundhog-day
Did you know that every Copilot CLI skill you've ever built lives in one local folder?
~/.copilot/skills/
That's it. No version history. No sync. No restore path.
Your custom skills. Your workflow automations. The prompts you spent weeks iterating on to get just right. All sitting in a single directory on a single machine. One spilled coffee, one failed drive, one stolen laptop and it's all...
...gone. π
πΏοΈ Groundhog Day is a tiny background agent with one job: make sure that never happens. It watches your skills folder in real time, commits every change, and pushes it to GitHub automatically. You set it up once and never think about it again.
πΏοΈ Zero effort. Zero maintenance. Zero risk of losing your work.
The installer handles everything: detects your skills, creates a backup repo on your GitHub account, seeds it with your existing skills, and starts the watcher. One command, fully protected.
πΏοΈ Same thing. Every time. It watches. It syncs. It pushes. It never stops. It never complains. It wakes up tomorrow and does it all again.
β‘ Install in one line:
curl -fsSL https://raw.githubusercontent.com/DUBSOpenHub/groundhog-day/main/install.sh | bash
$ groundhog status
πΏοΈ Groundhog Day: β
Running
$ mkdir -p ~/.copilot/skills/my-new-skill
$ cat > ~/.copilot/skills/my-new-skill/SKILL.md << EOF
---
name: my-new-skill
description: A brand new skill I just created
---
EOF
... 5 seconds later ...
$ tail -1 ~/.groundhog.log
πΏοΈ synced β add skill: my-new-skill
$ groundhog checkup
πΏοΈ Groundhog Day β Nightly Checkup
β
Watcher process: running
β
Skills directory: 10 skills found
β
Repo state: clean
β
Remote: in sync
β
Log: no errors
πΏοΈ All clear. Groundhog Day is healthy.
# 1. Clone
git clone https://github.com/DUBSOpenHub/groundhog-day.git ~/dev/groundhog-day
# 2. Set up your skills repo (or use an existing one)
gh repo create my-copilot-skills --public
git clone https://github.com/YOUR_USERNAME/my-copilot-skills.git ~/dev/copilot-skills
# 3. Install the agent
cp ~/dev/groundhog-day/groundhog ~/bin/groundhog
chmod +x ~/bin/groundhog
# 4. Configure (edit these two lines in ~/bin/groundhog)
# REPO="$HOME/dev/copilot-skills" β your skills backup repo
# SKILLS="$HOME/.copilot/skills" β default, probably don't change
# 5. Start watching (runs forever, survives reboots)
cp ~/dev/groundhog-day/com.dubsopenhub.groundhog.plist ~/Library/LaunchAgents/
# Edit the plist to match your home directory if not /Users/greggcochran
launchctl load ~/Library/LaunchAgents/com.dubsopenhub.groundhog.plistThat's it. Every skill you create, edit, or delete from this moment forward is automatically committed and pushed. Same thing, every time. πΏοΈ
Groundhog Day is a fully autonomous background agent that watches your ~/.copilot/skills/ directory in real time. Once installed, it requires zero interaction. It starts on boot, restarts if it crashes, and syncs every change without you ever touching it. The moment a file changes, it:
- Watches β detects every create, edit, rename, and delete in real time
- Syncs β rsyncs your skills to a version-controlled git repo
- Commits β creates meaningful commits (detects new skills by name)
- Pushes β sends it to GitHub with automatic retry on failure
- Catalogs β auto-generates a README with a table of all your skills
No cron. No manual steps. No remembering. It just runs.
| Scenario | Without Groundhog Day | With Groundhog Day |
|---|---|---|
| Laptop dies | π Skills gone forever | β
git clone on new machine |
| Accidentally delete a skill | π Hope you remember what it said | β
git restore |
| Want to share a skill | π Manually copy files around | β Send a repo link |
| New machine setup | π Rebuild everything from scratch | β One clone, done |
| "Wait, what did that skill look like last week?" | π No idea | β
git log -p |
groundhog # One-shot sync right now
groundhog watch # Start the real-time watcher
groundhog status # Health check β is it running? Last sync?~/.copilot/skills/ ~/dev/copilot-skills GitHub
ββββββββββββββββ fswatch ββββββββββββββββ git push ββββββββββββββββ
β SKILL.md β βββββββββββΆ β SKILL.md β βββββββββββΆ β SKILL.md β
β (local) β rsync β (git repo) β auto β (backed up) β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
you edit groundhog safe forever
- fswatch detects file changes in real time (5s debounce)
- rsync copies changes to the git working tree
- git commits and pushes with meaningful messages
- macOS LaunchAgent keeps it alive across reboots
This isn't a quick script. Groundhog Day was stress-tested by two AI analysis agents before release:
π¬ Agent X-Ray performed a full security, reliability, and performance audit β identified 12 issues across 5 severity levels including a shell injection vector, race conditions, and data loss scenarios.
π Grid-Medic independently diagnosed the same codebase, applied 8 fixes, validated each one, and verified the agent restarted cleanly after patching.
Every finding was fixed. Here's what's built in:
| Protection | What it prevents |
|---|---|
| π Sync lock | Overlapping syncs corrupting git state |
| π Push retry (3x) | Network failures silently dropping commits |
| π‘οΈ Empty source guard | rsync --delete wiping your repo if skills dir is empty |
| π₯ Repo health check | Dirty state, rebase conflicts, or missing dirs breaking sync |
| π Log rotation | Unbounded log growth eating your disk over months |
| π§Ή Graceful shutdown | Orphaned processes on SIGTERM |
| π Injection protection | Shell interpolation in Python calls |
| π§² Event drain | Redundant syncs from batched file events |
Groundhog Day runs an automated health check every morning at 6:00 AM. It checks 11 things:
- Is the watcher process alive?
- Is the LaunchAgent loaded?
- Does the skills directory exist and have skills?
- Is the repo clean?
- Are all commits pushed?
- Is the repo stuck in a rebase?
- Any push failures or errors in the log?
- Log file size (reported for awareness)
- When was the last successful sync?
- Is fswatch installed?
- Is a stale sync lock blocking syncs?
If anything is wrong, you get a macOS notification. The checkup tells you exactly what to run:
π¨ 1 issue(s) found. Run grid-medic:
β Open Copilot CLI and say:
"grid-medic diagnose ~/bin/groundhog"
You can also run it manually anytime:
groundhog checkupRe-run Agent X-Ray after modifying the script to catch new security or reliability issues: Open Copilot CLI and say: "X-ray ~/bin/groundhog for security, reliability, and performance"
Your laptop just died. Here's your 60-second recovery:
# On your new machine
git clone https://github.com/YOUR_USERNAME/my-copilot-skills.git /tmp/skills-restore
cp -R /tmp/skills-restore/*/ ~/.copilot/skills/All your skills are back. Every single one. Like the crash never happened.
Q: Does this work on Linux? A: The script works everywhere. The LaunchAgent plist is macOS-specific. On Linux, use a systemd unit or cron instead.
Q: What if I'm offline? A: Changes are committed locally. The next time you're online, the push retry catches up.
Q: Will it push secrets?
A: Skills are prompt files (markdown). The sync explicitly excludes .env, .DS_Store, node_modules, and __pycache__. Add a .gitignore to your skills backup repo for anything else you want excluded.
Q: Can multiple people share a skills repo?
A: Yes. Groundhog Day runs git pull --rebase before pushing, so it handles concurrent updates.
Same thing. Every time. It watches. It syncs. It pushes. It never stops. It never complains. It wakes up tomorrow and does it all again. πΏοΈ
MIT
Found a bug or want to add a feature? PRs welcome. This is a tiny agent with one job β keep it simple.
π Created with π by @DUBSOpenHub with the GitHub Copilot CLI.
Let's build! πβ¨


