home / skills / abdullahbeam / nexus-design-abdullah / update-nexus

This skill updates Nexus system files from upstream while safeguarding user data and clearly communicates changes.

npx playbooks add skill abdullahbeam/nexus-design-abdullah --skill update-nexus

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.3 KB
---
name: update-nexus
description: Update Nexus system files from upstream repository. Load when user says "update nexus", "sync nexus", "get nexus updates", "check for updates", "upgrade nexus". Safely pulls system updates while protecting user data.
---

# Update Nexus

> **Purpose**: Sync system files from the upstream Nexus repository while protecting user data
>
> **Trigger**: "update nexus", "sync nexus", "get updates", "check for updates"
>
> **Duration**: 1-2 minutes

---

## What This Does

Updates these **system files** from upstream:
- `00-system/` - Core framework, skills, documentation
- `CLAUDE.md` - Entry point
- `README.md` - Project readme

Protects these **user folders** (NEVER touched):
- `01-memory/` - Your goals, learnings, config
- `02-projects/` - Your projects
- `03-skills/` - Your custom skills
- `04-workspace/` - Your files
- `.env`, `.claude/` - Your secrets and settings

---

## Workflow

### Step 1: Check for Updates

Run the update check:
```bash
python 00-system/core/nexus-loader.py --check-update
```

**Parse the JSON response:**
- If `checked: false` with error → Display error, exit gracefully
- If `update_available: false` → Display "Already up-to-date!", exit
- If `update_available: true` → Continue to Step 2

### Step 2: Show What Will Change

Display to user:
```
UPDATE AVAILABLE

Current version: {local_version}
New version:     {upstream_version}

Files to update ({changes_count}):
{list changed_files, max 20}

PROTECTED (will NOT be touched):
- 01-memory/    (your goals & config)
- 02-projects/  (your projects)
- 03-skills/    (your custom skills)
- 04-workspace/ (your files)
```

### Step 3: Confirm with User

Ask: **"Proceed with update? (yes/no)"**

- If no → Exit with "Update cancelled"
- If yes → Continue to Step 4

### Step 4: Perform Sync

Run the sync command:
```bash
python 00-system/core/nexus-loader.py --sync --force
```

**Parse the JSON response:**
- If `success: false` → Display error message, suggest fixes
- If `success: true` → Continue to Step 5

### Step 5: Display Results

On success, display:
```
UPDATE COMPLETE!

{local_version} → {upstream_version}

Updated paths:
{list files_updated}

Backup saved to: {backup_path}

To commit this update:
  git add . && git commit -m "Update Nexus to v{upstream_version}"
```

---

## Error Handling

| Error | User Message |
|-------|--------------|
| "Not a git repository" | "This folder isn't a git repo. Initialize with: git init" |
| "Could not reach upstream" | "Can't connect to GitHub. Check your internet connection." |
| "Uncommitted changes detected" | "You have uncommitted changes. Commit them first:\n  git add . && git commit -m 'Save changes'" |
| "Could not read upstream version" | "The upstream repo might not be set up correctly. Check the URL in user-config.yaml" |

---

## Advanced: Dry Run

To preview changes without applying:
```bash
python 00-system/core/nexus-loader.py --sync --dry-run
```

This shows what WOULD change, but doesn't change anything.

---

## Notes

- **Backup**: Before any sync, your current system files are backed up to `.sync-backup/{timestamp}/`
- **Safe**: User data folders are NEVER in the sync paths - they cannot be touched
- **Upstream Remote**: Automatically added on first use (named "upstream")
- **Default URL**: https://github.com/beamanalytica/Nexus-v4.git (can override in user-config.yaml)

Overview

This skill updates Nexus system files from the upstream repository while protecting user data and settings. It safely checks for available updates, previews changes, asks for confirmation, and performs a controlled sync with backups. The process is non-destructive to protected user folders and provides clear error messages and recovery guidance.

How this skill works

The skill runs a two-step workflow: a check phase that queries the upstream repository and a sync phase that pulls approved changes. It parses JSON responses from the nexus-loader script to determine update availability, show file-level diffs, and perform the sync with a backup saved beforehand. Protected folders and secret files are excluded from any update operation.

When to use it

  • You want to bring core system files and official docs up to date from the upstream repo.
  • You need a safe update that will not overwrite your personal projects, memories, skills, or workspace files.
  • Before troubleshooting unexpected behavior to ensure the system framework is current.
  • When preparing to share or commit an updated system state to your own repository.
  • To preview changes first using a dry run before applying them.

Best practices

  • Commit or stash any local changes in system-controlled areas before running an update.
  • Review the preview list and confirm file changes before proceeding with the sync.
  • Use the dry-run option to preview updates without applying them.
  • Keep backups or review the .sync-backup/{timestamp}/ folder after updates.
  • Ensure network connectivity and that upstream remote URL is correct in user-config.yaml

Example use cases

  • Check for updates and apply them to get the latest core features and fixes.
  • Perform a dry run to see what system files would change prior to a full sync.
  • Recover from a failed manual update by restoring from the sync backup folder.
  • Validate upstream configuration when the loader reports it cannot read the upstream version.
  • Use the update flow before creating a release or pushing configuration to another environment.

FAQ

Which folders will never be changed by this update?

User data folders (01-memory, 02-projects, 03-skills, 04-workspace) plus .env and .claude are protected and never modified by the update.

What if I have uncommitted changes?

The updater will advise you to commit changes first. Use: git add . && git commit -m 'Save changes' before retrying the update.