update-nanoclaw
Skill1 starsChanged 43 days agoMITView on GitHub
Efficiently bring upstream NanoClaw updates into a customized install, with preview, selective cherry-pick, and low token usage.
- Deletes or force-pushes
8 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- nanocoai/nanoclawtheir own version, first seen Nov 3, 2026
- prathish-ks/isthmustheir own version, first seen Oct 12, 2026
- gavrielc/nanoclawtheir own version, first seen Oct 8, 2026
- qwibitai/nanoclawtheir own version, first seen Oct 8, 2026
- TomGranot/groupguardtheir own version, first seen Sep 3, 2026
- microsoft/amplifier-app-nanoclawedited, first seen Jun 12, 2026
Used with
Projects with it also use add-anydoc, add-clidash and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TomGranotSkilladd-anydoc
Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.
Also in 5 projects that use this
TomGranotSkilladd-clidash
Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.
Also in 5 projects that use this
qwibitaiSkilladd-iron-proxy
Install or refresh Iron Proxy and its official Iron Control web console for NanoClaw. Use when selecting the Iron gateway, adding its management UI, configuring credentials and grants, or restoring the proxy, approval bridge, and agent guidance.
Also in 4 projects that use this
qwibitaiSkilladd-mattermost
Add a self-hosted or cloud Mattermost bot channel through the Chat SDK bridge, reusing a healthy server when available and linking to official server setup guidance when needed.
Also in 4 projects that use this
nanocoaiSkilladd-cursor
Use Cursor (local Agent SDK) as a full agent provider — planning, tool orchestration, MCP tools, session resume — alongside or instead of Claude. Cursor-account sign-in or API key, held by the credential gateway. Per-group via `ncl groups config update --provider cursor`. Distinct from using Cursor as a cloud agent (those run on Cursor VMs and are not this provider).
Also in 3 projects that use this
- +5 more from TomGranot
- +1 more from qwibitai
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- b1rdmania/ghostclaw★ 9191% same
- microsoft/amplifier-app-nanoclaw★ 588% same
- breakcafe/picoclaw★ 191% same
Wrote their own version · 5
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- TomGranot/groupguard★ 3same name
- prathish-ks/isthmus★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- container/AGENTS.mdAGENTS.md
- container/CLAUDE.mdCLAUDE.md
- add-atomic-chat-toolSkill
- add-codexSkill
- add-dashboardSkill
- add-deltachatSkill
- add-discordSkill
- add-emacsSkill
- add-gcal-toolSkill
- add-gchatSkill
- add-githubSkill
- add-gmail-toolSkill
- add-imessageSkill
- add-karpathy-llm-wikiSkill
- add-linearSkill
- add-macos-statusbarSkill
- add-matrixSkill
- add-mnemonSkill
- add-ollama-providerSkill
- add-ollama-toolSkill
- add-opencodeSkill
- add-piSkill
- add-resendSkill
- add-rtkSkill
- add-signalSkill
- add-slackSkill
- add-teamsSkill
- add-telegramSkill
- add-vercelSkill
- add-webexSkill
- add-wechatSkill
- add-whatsapp-cloudSkill
- add-whatsappSkill
- archive-tripSkill
- customizeSkill
- debugSkill
- get-qodo-rulesSkill
- init-first-agentSkill
- init-onecliSkill
- learnSkill
- manage-channelsSkill
- manage-mountsSkill
- migrate-from-openclawSkill
- migrate-from-v1Skill
- migrate-memorySkill
- migrate-nanoclawSkill
- nano-pvt-hubSkill
- new-knowledge-graph-tutorSkill
- new-tripSkill
- qodo-pr-resolverSkill
- reflectSkill
- setupSkill
- update-skillsSkill
- use-native-credential-proxySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
50 rules. 0 are common, 35 are distinctive, and 15 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
35
Distinctive
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Run /update-nanoclaw in Claude Code.
- Distinctive: line 30
Conflict preview: before merging, runs a dry-run (git merge --no-commit --no-ff) to show which files would conflict.
- Very specific: line 36
Breaking changes check: after validation, reads CHANGELOG.md for any [BREAKING] entries introduced by the update.
- Distinctive: line 49
Only opens files with actual conflicts.
- Distinctive: line 57
Never proceed with a dirty working tree.
- Distinctive: line 58
Always create a rollback point (backup branch + tag) before touching anything.
- Distinctive: line 59
Prefer git-native operations (fetch, merge, cherry-pick).
- Distinctive: line 60
Default to MERGE (one-pass conflict resolution).
- Distinctive: line 61
Keep token usage low: rely on git status, git log, git diff, and open only conflicted files.
- Very specific: line 65
Ensure the upstream remote exists (default https://github.com/nanocoai/nanoclaw.git) and fetch: git fetch upstream --prune.
- Distinctive: line 74
If output is non-empty:
- Very specific: line 80
If upstream is missing:
- Very specific: line 81
Ask the user for the upstream repo URL (default: https://github.com/nanocoai/nanoclaw.git).
- Very specific: line 87
If upstream/main exists, use main.
- Very specific: line 88
If only upstream/master exists, use master.
- Distinctive: line 100
Create backup branch and tag (using timestamp to avoid collisions on retry):
- Distinctive: line 135
If Abort: stop here.
- Distinctive: line 138
If Full update or Rebase:
- Distinctive: line 143
If conflicts were listed: show them and ask user if they want to proceed.
- Distinctive: line 144
If no conflicts: tell user it is clean and proceed.
- Distinctive: line 151
Run git status and identify conflicted files.
- Distinctive: line 157
Do not refactor surrounding code.
- Distinctive: line 160
If merge did not auto-commit: git commit --no-edit
- Distinctive: line 163
If user chose Selective:
- Distinctive: line 166
Ask user which commit hashes they want.
- Distinctive: line 169
If conflicts during cherry-pick:
- Distinctive: line 173
If user wants to stop:
- Distinctive: line 184
If it gets messy (more than 3 rounds of conflicts):
- Distinctive: line 189
Check if the merge changed any lockfiles or package manifests:
- Very specific: line 193
If matched AND command -v bun succeeds: cd container/agent-runner && bun install
- Very specific: line 194
If bun is not installed on the host, skip — container deps will be installed during ./container/build.sh
- Distinctive: line 199
Check which areas changed to determine what to validate:
- Very specific: line 208
If this fails because bun types are missing (Cannot find type definition file for 'bun'), skip with a note — type errors will surface at …
- Distinctive: line 215
Only fix issues clearly caused by the merge (missing imports, type mismatches from merged code).
- Distinctive: line 216
Do not refactor unrelated code.
- Distinctive: line 217
If unclear, ask the user before making changes.
- Very specific: line 222
If git diff <backup-tag-from-step-1>..HEAD -- versions.json shows the onecli-gateway or onecli-cli value changed, follow …
- Distinctive: line 225
After validation succeeds, check if the update introduced any breaking changes.
- Very specific: line 235
If no [BREAKING] lines are found:
- Very specific: line 238
If one or more [BREAKING] lines are found:
- Distinctive: line 242
Use AskUserQuestion to ask the user which migration skills they want to run now.
- Distinctive: line 247
After all selected skills complete (or if user chose Skip), proceed to Step 7 (skill updates check).
- Distinctive: line 262
If nothing is installed: skip silently and proceed to Step 7.9.
- Distinctive: line 263
If one or more are installed: continue into skill updates.
- Distinctive: line 265
Hand-off — default in, minimal opt-out: Use AskUserQuestion (single-select).
- Very specific: line 276
Keep it to these two options — the per-skill selection lives inside /update-skills, not here.
- Distinctive: line 287
After validation has succeeded, record that this install reached the new version through the supported path.
- Distinctive: line 292
If validation did NOT succeed, do not stamp — leave the tripwire to catch the broken state.
- Very specific: line 316
Use the Read tool to read .claude/skills/update-nanoclaw/diagnostics.md.
- Distinctive: line 317
Follow every step in that file before finishing.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
About
Your NanoClaw fork drifts from upstream as you customize it. This skill pulls upstream changes into your install without losing your modifications.
Run /update-nanoclaw in Claude Code.
How it works
Preflight: checks for clean working tree (git status --porcelain). If upstream remote is missing, asks you for the URL (defaults to https://github.com/nanocoai/nanoclaw.git) and adds it. Detects the upstream branch name (main or master).
Backup: creates a timestamped backup branch and tag (backup/pre-update-<hash>-<timestamp>, pre-update-<hash>-<timestamp>) before touching anything. Safe to run multiple times.
Preview: runs git log and git diff against the merge base to show upstream changes since your last sync. Groups changed files into categories:
- Skills (
.claude/skills/): unlikely to conflict unless you edited an upstream skill - Host source (
src/): may conflict if you modified the same files - Container (
container/): triggers container rebuild - Build/config (
package.json,pnpm-lock.yaml,tsconfig*.json): lockfile changes trigger dep install
Update paths (you pick one):
merge(default):git merge upstream/<branch>. Resolves all conflicts in one pass.cherry-pick:git cherry-pick <hashes>. Pull in only the commits you want.rebase:git rebase upstream/<branch>. Linear history, but conflicts resolve per-commit.abort: just view the changelog, change nothing.
Conflict preview: before merging, runs a dry-run (git merge --no-commit --no-ff) to show which files would conflict. You can still abort at this point.
Conflict resolution: opens only conflicted files, resolves the conflict markers, keeps your local customizations intact.
Validation: runs pnpm run build and pnpm test. If container files changed, also runs the container typecheck and ./container/build.sh.
Breaking changes check: after validation, reads CHANGELOG.md for any [BREAKING] entries introduced by the update. If found, shows each breaking change and offers to run the recommended skill to migrate.
Rollback
The backup tag is printed at the end of each run:
git reset --hard pre-update-<hash>-<timestamp>Backup branch backup/pre-update-<hash>-<timestamp> also exists.
Token usage
Only opens files with actual conflicts. Uses git log, git diff, and git status for everything else. Does not scan or refactor unrelated code.
Goal
Help a user with a customized NanoClaw install safely incorporate upstream changes without a fresh reinstall and without blowing tokens.
Operating principles
- Never proceed with a dirty working tree.
- Always create a rollback point (backup branch + tag) before touching anything.
- Prefer git-native operations (fetch, merge, cherry-pick). Do not manually rewrite files except conflict markers.
- Default to MERGE (one-pass conflict resolution). Offer REBASE as an explicit option.
- Keep token usage low: rely on
git status,git log,git diff, and open only conflicted files.
Step 0a: Refresh this skill first
The update process itself evolves, so run its newest version before doing anything else:
- Ensure the
upstreamremote exists (defaulthttps://github.com/nanocoai/nanoclaw.git) and fetch:git fetch upstream --prune. Detect the upstream branch (mainormaster). - Refresh this skill from upstream:
git checkout upstream/<branch> -- .claude/skills/update-nanoclaw/ - Re-read
.claude/skills/update-nanoclaw/SKILL.md. If it changed, follow the updated version from the top instead of this one.
This is the only working-tree change expected before the preflight check; the full update commits it along with everything else.
Step 0: Preflight (stop early if unsafe)
Run:
git status --porcelainIf output is non-empty:- Tell the user to commit or stash first, then stop.
- Exception: changes limited to
.claude/skills/update-nanoclaw/are the Step 0a self-refresh — ignore those and proceed.
Confirm remotes:
git remote -vIfupstreamis missing:- Ask the user for the upstream repo URL (default:
https://github.com/nanocoai/nanoclaw.git). - Add it:
git remote add upstream <user-provided-url> - Then:
git fetch upstream --prune
Determine the upstream branch name:
git branch -r | grep upstream/- If
upstream/mainexists, usemain. - If only
upstream/masterexists, usemaster. - Otherwise, ask the user which branch to use.
- Store this as UPSTREAM_BRANCH for all subsequent commands. Every command below that references
upstream/mainshould useupstream/$UPSTREAM_BRANCHinstead.
Fetch:
git fetch upstream --prune
Step 1: Create a safety net
Capture current state:
HASH=$(git rev-parse --short HEAD)TIMESTAMP=$(date +%Y%m%d-%H%M%S)
Create backup branch and tag (using timestamp to avoid collisions on retry):
git branch backup/pre-update-$HASH-$TIMESTAMPgit tag pre-update-$HASH-$TIMESTAMP
Save the tag name for later reference in the summary and rollback instructions.
Step 2: Preview what upstream changed (no edits yet)
Compute common base:
BASE=$(git merge-base HEAD upstream/$UPSTREAM_BRANCH)
Show upstream commits since BASE:
git log --oneline $BASE..upstream/$UPSTREAM_BRANCH
Show local commits since BASE (custom drift):
git log --oneline $BASE..HEAD
Show file-level impact from upstream:
git diff --name-only $BASE..upstream/$UPSTREAM_BRANCH
Bucket the upstream changed files:
- Skills (
.claude/skills/): unlikely to conflict unless the user edited an upstream skill - Host source (
src/): may conflict if user modified the same files - Container (
container/): triggers container rebuild (+ typecheck ifagent-runner/src/changed) - Build/config (
package.json,pnpm-lock.yaml,tsconfig*.json): lockfile changes trigger dep install - Version pins (
versions.json): a changedonecli-gateway/onecli-clivalue requires upgrading the OneCLI gateway/CLI to match — see Step 5.5 - Other: docs, tests, setup scripts, misc
Large drift check: If the upstream commit count and age suggest the user has a lot of catching up to do, mention that /migrate-nanoclaw might be a better fit — it extracts customizations and reapplies them on clean upstream instead of merging. Offer it as an option but don't push.
Present these buckets to the user and ask them to choose one path using AskUserQuestion:
- A) Full update: merge all upstream changes
- B) Selective update: cherry-pick specific upstream commits
- C) Abort: they only wanted the preview
- D) Rebase mode: advanced, linear history (warn: resolves conflicts per-commit)
If Abort: stop here.
Step 3: Conflict preview (before committing anything)
If Full update or Rebase:
- Dry-run merge to preview conflicts. Run these as a single chained command so the abort always executes:
git merge --no-commit --no-ff upstream/$UPSTREAM_BRANCH; git diff --name-only --diff-filter=U; git merge --abort - If conflicts were listed: show them and ask user if they want to proceed.
- If no conflicts: tell user it is clean and proceed.
Step 4A: Full update (MERGE, default)
Run:
git merge upstream/$UPSTREAM_BRANCH --no-edit
If conflicts occur:
- Run
git statusand identify conflicted files. - For each conflicted file:
- Open the file.
- Resolve only conflict markers.
- Preserve intentional local customizations.
- Incorporate upstream fixes/improvements.
- Do not refactor surrounding code.
git add <file>
- When all resolved:
- If merge did not auto-commit:
git commit --no-edit
- If merge did not auto-commit:
Step 4B: Selective update (CHERRY-PICK)
If user chose Selective:
- Recompute BASE if needed:
BASE=$(git merge-base HEAD upstream/$UPSTREAM_BRANCH) - Show commit list again:
git log --oneline $BASE..upstream/$UPSTREAM_BRANCH - Ask user which commit hashes they want.
- Apply:
git cherry-pick <hash1> <hash2> ...
If conflicts during cherry-pick:
- Resolve only conflict markers, then:
git add <file>git cherry-pick --continueIf user wants to stop:git cherry-pick --abort
Step 4C: Rebase (only if user explicitly chose option D)
Run:
git rebase upstream/$UPSTREAM_BRANCH
If conflicts:
- Resolve conflict markers only, then:
git add <file>git rebase --continueIf it gets messy (more than 3 rounds of conflicts):git rebase --abort- Recommend merge instead.
Step 4.5: Install dependencies (if lockfiles changed)
Check if the merge changed any lockfiles or package manifests:
git diff <backup-tag-from-step-1>..HEAD --name-only | grep -E '^(pnpm-lock\.yaml|package\.json)$'- If matched:
pnpm install
- If matched:
git diff <backup-tag-from-step-1>..HEAD --name-only | grep -E '^container/agent-runner/(bun\.lock|package\.json)$'- If matched AND
command -v bunsucceeds:cd container/agent-runner && bun install - If bun is not installed on the host, skip — container deps will be installed during
./container/build.sh
- If matched AND
Skip this step if neither lockfile changed.
Step 5: Validation
Check which areas changed to determine what to validate:
CHANGED_FILES=$(git diff --name-only <backup-tag-from-step-1>..HEAD)
Host build (always):
pnpm run buildpnpm test(do not fail the flow if tests are not configured)
Container typecheck (only if container/agent-runner/src/ files are in CHANGED_FILES AND bun types are available):
- Check:
pnpm exec tsc -p container/agent-runner/tsconfig.json --noEmit - If this fails because bun types are missing (
Cannot find type definition file for 'bun'), skip with a note — type errors will surface at container runtime instead
Container image rebuild (only if any container/ files are in CHANGED_FILES):
./container/build.sh
If build fails:
- Show the error.
- Only fix issues clearly caused by the merge (missing imports, type mismatches from merged code).
- Do not refactor unrelated code.
- If unclear, ask the user before making changes.
Step 5.5: OneCLI upgrade (if pins moved)
The OneCLI gateway and CLI are external components pinned in versions.json; when a pin moves, the running version must be upgraded to match or the new code may fail against it.
If git diff <backup-tag-from-step-1>..HEAD -- versions.json shows the onecli-gateway or onecli-cli value changed, follow docs/onecli-upgrades.md before the service restart (Step 8). Otherwise skip.
Step 6: Breaking changes check
After validation succeeds, check if the update introduced any breaking changes.
Determine which CHANGELOG entries are new by diffing against the backup tag:
git diff <backup-tag-from-step-1>..HEAD -- CHANGELOG.md
Parse the diff output for lines that contain [BREAKING] anywhere in the line. Each such line is one breaking change entry. The format is:
[BREAKING] <description>. Run `/<skill-name>` to <action>.If no [BREAKING] lines are found:
- Skip this step silently. Proceed to Step 7 (skill updates check).
If one or more [BREAKING] lines are found:
- Display a warning header to the user: "This update includes breaking changes that may require action:"
- For each breaking change, display the full description.
- Collect all skill names referenced in the breaking change entries (the
/<skill-name>part). - Use AskUserQuestion to ask the user which migration skills they want to run now. Options:
- One option per referenced skill (e.g., "Run /add-whatsapp to re-add WhatsApp channel")
- "Skip — I'll handle these manually"
- Set
multiSelect: trueso the user can pick multiple skills if there are several breaking changes. - For each skill the user selects, invoke it using the Skill tool.
- After all selected skills complete (or if user chose Skip), proceed to Step 7 (skill updates check).
Step 7: Skill updates (part of updating NanoClaw)
Updating your installed skills is part of updating NanoClaw, not an optional
extra. Channel and provider code ships on long-lived branches (channels,
providers) that the host merge above doesn't touch — so stopping here leaves
that code on whatever version you installed, which is how an important upstream
fix gets silently left behind. The default is to continue into /update-skills,
which re-applies your installed channels/providers to pull their latest code.
Detect whether anything is installed: read src/channels/index.ts and
src/providers/index.ts, collecting import './<name>.js'; lines (excluding
cli).
- If nothing is installed: skip silently and proceed to Step 7.9.
- If one or more are installed: continue into skill updates.
Hand-off — default in, minimal opt-out. Use AskUserQuestion (single-select). Name the installed skills in the question so the choice is concrete:
- Question: "Skill updates are part of this NanoClaw update — your installed
channels/providers (
<list the detected ones>) ride separate branches the host update didn't touch. Continue into/update-skillsto bring them up to date?" - Option 1 (Recommended): "Continue into skill updates" — description: "Runs
/update-skills, which re-applies your installed channels/providers to pull their latest upstream code. You pick which ones there." - Option 2: "Skip — I'll run
/update-skillsmyself later" — description: "Your installed skill code stays as-is and may be behind upstream."
Keep it to these two options — the per-skill selection lives inside
/update-skills, not here.
- On "Continue": invoke
/update-skillsusing the Skill tool. (If the re-apply touches container code,/update-skillsrebuilds the agent image itself — see its Step 4 — so nothing container-related is owed back here.) - On "Skip": note that
/update-skillscan be run anytime, then proceed.
Proceed to Step 7.9.
Step 7.9: Stamp the upgrade marker (required)
After validation has succeeded, record that this install reached the new version through the supported path. Without this, the startup tripwire stops the host on its next start.
pnpm exec tsx scripts/upgrade-state.ts set "" update-nanoclaw- The empty version argument stamps the current
package.jsonversion.
- The empty version argument stamps the current
If validation did NOT succeed, do not stamp — leave the tripwire to catch the broken state.
Proceed to Step 8.
Step 8: Summary + rollback instructions
Show:
- Backup tag: the tag name created in Step 1
- New HEAD:
git rev-parse --short HEAD - Upstream HEAD:
git rev-parse --short upstream/$UPSTREAM_BRANCH - Conflicts resolved (list files, if any)
- Breaking changes applied (list skills run, if any)
- Remaining local diff vs upstream:
git diff --name-only upstream/$UPSTREAM_BRANCH..HEAD
Tell the user:
- To rollback:
git reset --hard <backup-tag-from-step-1> - Backup branch also exists:
backup/pre-update-<HASH>-<TIMESTAMP> - Restart the service to apply changes. The unit/label names are per-install — derive them with
setup/lib/install-slug.sh. Run from your NanoClaw project root:- macOS (Darwin):
source setup/lib/install-slug.sh && launchctl kickstart -k gui/$(id -u)/$(launchd_label) - Linux:
source setup/lib/install-slug.sh && systemctl --user restart $(systemd_unit)(or, if you want to confirm the unit name first:systemctl --user list-units --type=service | grep "$(. setup/lib/install-slug.sh && systemd_unit)") - Manual (no service found): restart
pnpm run dev
- macOS (Darwin):
Diagnostics
- Use the Read tool to read
.claude/skills/update-nanoclaw/diagnostics.md. - Follow every step in that file before finishing.
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.

