update-ghostclaw
Skill91 starsChanged 7 months agoMITView on GitHub
Safely update GhostClaw to the latest version. Backs up, pulls, migrates, rebuilds, restarts, and verifies.
- Deletes or force-pushes
- Installs packages
In this repository55 other files it gives its agents.
- ab-test-setupSkill
- ad-creativeSkill
- add-discordSkill
- add-gmail-agentSkill
- add-heartbeatSkill
- add-morning-briefingSkill
- add-slackSkill
- add-telegramSkill
- add-telegram-swarmSkill
- add-update-checkSkill
- add-voice-replySkill
- add-voice-transcriptionSkill
- ai-seoSkill
- analytics-trackingSkill
- churn-preventionSkill
- cold-emailSkill
- competitor-alternativesSkill
- content-strategySkill
- copy-editingSkill
- copywritingSkill
- customizeSkill
- debugSkill
- designSkill
- domain-checkSkill
- email-sequenceSkill
- form-croSkill
- free-tool-strategySkill
- get-qodo-rulesSkill
- launch-strategySkill
- marketing-ideasSkill
- marketing-psychologySkill
- migrate-memorySkill
- onboarding-croSkill
- page-croSkill
- paid-adsSkill
- paywall-upgrade-croSkill
- popup-croSkill
- pr-babysitterSkill
- pricing-strategySkill
- product-marketing-contextSkill
- programmatic-seoSkill
- qodo-pr-resolverSkill
- referral-programSkill
- revopsSkill
- run-ralphSkill
- sales-enablementSkill
- schema-markupSkill
- seo-auditSkill
- setup-ghostclawSkill
- setup-shared-folderSkill
- setupSkill
- signup-flow-croSkill
- site-architectureSkill
- social-contentSkill
- update-nanoclawSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Memory warning: Before proceeding, tell the user:
- Distinctive: line 22
Check that the working tree is clean:
- Very specific: line 28
If there's any output, stop and tell the user: "You have uncommitted changes.
- Very specific: line 45
If no new commits, tell the user: "GhostClaw is already up to date (vOLD_VERSION)." and stop.
- Distinctive: line 51
Create a backup tag so the user can roll back:
- Distinctive: line 68
If there are merge conflicts, stop.
- Very specific: line 86
If NEW_VERSION differs from OLD_VERSION, run migrations:
- Distinctive: line 94
If migrations fail, warn the user but continue — they may need to fix something manually.
- Very specific: line 98
If the upstream changed groups/main/CLAUDE.md.template or groups/global/CLAUDE.md.template, inform the user:
- Very specific: line 104
If any templates changed, tell the user: "The CLAUDE.md template was updated upstream.
- Distinctive: line 112
If the build fails, stop. Tell the user to check the error and fix it before restarting.
- Distinctive: line 120
If tests fail, warn the user but don't block.
- Distinctive: line 158
Wait 3 seconds, then check the service is running:
- Very specific: line 177
If the service isn't running, tell the user to check logs/ghostclaw.error.log.
- Distinctive: line 181
If something goes wrong after an update:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update GhostClaw
Pulls the latest GhostClaw release, runs migrations, rebuilds, and restarts the service. Creates a backup tag before changing anything so the user can roll back.
Steps
1. Preflight
Memory warning: Before proceeding, tell the user:
"⚠️ Heads up: updating will reset your active session. If you want to preserve recent conversation context, back up your memory files first:
groups/main/memory/— identity, state, and loggroups/main/CLAUDE.md— personalised soulThe update won't delete these files, but a fresh session after restart won't have the previous conversation in context."
Check that the working tree is clean:
git status --porcelainIf there's any output, stop and tell the user: "You have uncommitted changes. Commit or stash them first, then run /update-ghostclaw again."
Get the current version:
node -e "console.log(require('./package.json').version)"Save this as OLD_VERSION.
Check for updates:
git fetch origin
git log HEAD..origin/main --onelineIf no new commits, tell the user: "GhostClaw is already up to date (vOLD_VERSION)." and stop.
Otherwise, show the user the list of incoming commits and how many there are. Ask: "These updates are available. Apply them?"
2. Backup
Create a backup tag so the user can roll back:
git tag "backup/pre-update-$(git rev-parse --short HEAD)-$(date +%s)"Tell the user the tag name. Remind them they can roll back with:
git reset --hard <tag-name> && npm run build && launchctl kickstart -k gui/$(id -u)/com.ghostclaw3. Pull
git merge origin/mainIf there are merge conflicts, stop. Tell the user which files conflict and that they need to resolve manually. Do NOT force-resolve conflicts — this code runs bare metal with full system access.
4. Install dependencies and run migrations
npm installThis also runs the postinstall script which bootstraps agent-runner.
Get the new version:
node -e "console.log(require('./package.json').version)"Save this as NEW_VERSION.
If NEW_VERSION differs from OLD_VERSION, run migrations:
npx tsx scripts/run-migrations.ts OLD_VERSION NEW_VERSION .Report the migration results (how many ran, any failures).
If migrations fail, warn the user but continue — they may need to fix something manually.
4b. Check for template updates
If the upstream changed groups/main/CLAUDE.md.template or groups/global/CLAUDE.md.template, inform the user:
git diff HEAD~$(git log HEAD..origin/main --oneline | wc -l)..HEAD --name-only | grep 'CLAUDE.md.template'If any templates changed, tell the user: "The CLAUDE.md template was updated upstream. Your personalised groups/main/CLAUDE.md is untouched — review the template changes if you want to incorporate any new sections."
5. Build and validate
npm run buildIf the build fails, stop. Tell the user to check the error and fix it before restarting.
Run tests (non-blocking):
npm testIf tests fail, warn the user but don't block. They may have local customisations that diverge from upstream tests.
6. Hard reset sessions
Clear all stored sessions so agents start fresh after restart (stale sessions from the previous version can cause auth or execution errors):
node -e "
const Database = require('better-sqlite3');
const db = new Database('store/messages.db');
const result = db.prepare('DELETE FROM sessions').run();
console.log('Cleared ' + result.changes + ' session(s)');
"Report how many sessions were cleared.
7. Restart service
Detect the platform and restart:
macOS (launchd):
launchctl kickstart -k gui/$(id -u)/com.ghostclawLinux (systemd):
systemctl --user restart ghostclawFallback (nohup/other): Tell the user to restart manually.
To detect: check if launchctl list 2>/dev/null | grep com.ghostclaw finds something (macOS), otherwise check if systemctl --user is-active ghostclaw 2>/dev/null works (Linux).
8. Verify
Wait 3 seconds, then check the service is running:
macOS:
launchctl list | grep com.ghostclawLinux:
systemctl --user is-active ghostclawReport to the user:
- Old version → new version
- Number of commits applied
- Migration results (if any)
- Service status
- Backup tag for rollback
If the service isn't running, tell the user to check logs/ghostclaw.error.log.
Rolling back
If something goes wrong after an update:
git reset --hard <backup-tag>
npm install
npm run build
# Then restart the service (launchctl/systemctl)The backup tag is printed during step 2 and again in the final summary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

