hex-upgradelisted
Install: claude install-skill mrap/hex
# /hex-upgrade — Upgrade Hexagon
Pull the latest scripts, skills, commands, and hooks from hex.
## Step 1: Run the upgrade command
```bash
hex upgrade
```
If the user passed arguments (e.g., `--dry-run`, `--local PATH`), forward them:
```bash
hex upgrade ARGUMENTS
```
## Step 2: Handle CLAUDE.md template changes
If the upgrade script reports that the CLAUDE.md template has changed:
1. Read the new template from the upgrade cache:
```
$HEX_DIR/.hex/.upgrade-cache/templates/CLAUDE.md.template
```
2. Read the current `$HEX_DIR/CLAUDE.md`
3. Detect the user's `{{NAME}}` and `{{AGENT}}` values from the current CLAUDE.md:
- `{{NAME}}` = the name used throughout (e.g., "${HEX_USER:-user}")
- `{{AGENT}}` = the agent name from the file index section or title
4. Merge intelligently:
- Apply structural changes from the new template (new sections, updated protocols, fixed instructions)
- **Preserve** user additions: custom standing orders (rows beyond the defaults), custom sections, any content the user added
- **Preserve** the Environment Paths section if the user customized it
- Substitute `{{NAME}}`, `{{AGENT}}`, and `{{DATE}}` with the detected values
5. Show the user a summary of what changed in CLAUDE.md and ask for confirmation before writing.
## Step 3: Rebuild memory index
After upgrade, rebuild the memory index to pick up any changes:
```bash
hex memory index
```
## Step 4: Report
Show a concise summary:
- What files were updated/added