# Update Nanoclaw

Transactionally update a customized NanoClaw checkout from official upstream without...

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill update-nanoclaw -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill update-nanoclaw -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill update-nanoclaw -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill update-nanoclaw -g -a gemini-cli -y`

## Description

Transactionally update a customized NanoClaw checkout from official upstream without exposing live mounted source, with fork-safe skill refresh, mutable-state snapshots, migration gates, exact-code upgrade markers, detected service restart, health verification, and automatic local rollback. Use for routine merge, rebase, or selective upstream updates.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Update NanoClaw

Update a customized install through an isolated, resumable transaction. The
live checkout is not touched until the staged result has passed validation.

Use ordinary conversation for decisions and confirmations. Do not depend on
Claude Code, Codex, OpenCode, or any provider-specific question/skill tool.

## Safety contract

- Require a clean live checkout.
- Stage Git integration, dependency installation, installed-skill refresh, and
  tests in a separate worktree.
- Resolve registry branches from the remote that actually carries them.
- Stop the detected service and drain this install's active containers before
  changing source mounted into agent containers.
- Snapshot `.env`, `data/`, `groups/`, `store/`, and manual-service state before
  cutover. Sockets and other ephemeral special files are intentionally omitted.
- Gate every breaking migration and external version-pin move.
- Stamp the exact Git commit/tree only after all required work succeeds.
- Restart through the detected launchd, user-systemd, system-systemd, or nohup
  mode; require process state, `data/ncl.sock`, and `bin/ncl groups list`.
- Refuse cutover while an unmanaged `pnpm dev`/Node host is running. Stop that
  process explicitly, update offline, then start it again manually.
- On build or health failure, restore Git and the mutable-state snapshot, rebuild
  the previous image, restart the previous service, and health-check it.

## 1. Load the newest controller without changing the live tree

Confirm the live tree is clean:

```bash
git status --porcelain
```

Stop if it prints anything. Setup commits the files it applies as
`setup: apply <skill>` commits unless `NANOCLAW_SETUP_COMMIT=0` was set.
Treat anything left as part of the install: show it, ask the user to commit it
as a local customization, then re-check. Never stash it, since the updater
discovers installed skills from these files.

Use the official remote if one already exists. Otherwise add it as `upstream`:

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/update-nanoclaw/SKILL.md
