본문으로 건너뛰기
cccskills
무료GitHub에 공개

update-nanoclaw

Update a customized NanoClaw installation with official changes. The skill stages and tests updates in a separate workspace, manages required migrations, restarts the detected service, and restores saved local state if the build or health checks fail.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Apply routine official updates to a customized installation
  • Review and resolve conflicts before changing the live installation
  • Apply selected upstream commits
  • Keep a recovery point for a completed update

포함된 파일(1)

  • SKILL.md11.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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:

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:

if git remote get-url upstream >/dev/null 2>&1; then
  upstream_remote=upstream
elif git remote get-url origin 2>/dev/null | grep -Eq '(^|[:/])nanocoai/nanoclaw(.git)?$'; then
  upstream_remote=origin
else
  git remote add upstream https://github.com/nanocoai/nanoclaw.git
  upstream_remote=upstream
fi
git fetch "$upstream_remote" --prune

Select main when present, otherwise master:

if git show-ref --verify --quiet "refs/remotes/$upstream_remote/main"; then
  upstream_ref="$upstream_remote/main"
elif git show-ref --verify --quiet "refs/remotes/$upstream_remote/master"; then
  upstream_ref="$upstream_remote/master"
else
  echo "Official remote has neither main nor master" >&2
  exit 1
fi

Materialize the newest controller from that ref. This is the self-update seam: an older local skill still executes the newest safety code before any mutation. The controller always comes from main; the ref it merges follows the channel (step 2).

# pwd -P: on macOS mktemp returns a path through the /var symlink, and a
# symlinked argv defeats Node's import.meta main-module guard — the controller
# then exits 0 having done NOTHING. Canonicalize before use.
controller_dir="$(cd "$(mktemp -d)" && pwd -P)"
# Extract all of scripts/, not a hand-listed subset. These paths are a
# contract: older copies of this skill extract exactly them from the newest
# ref, so the controller must load from them alone, with no node_modules.
# scripts/update/controller-archive.test.ts enforces it.
git archive "$upstream_ref" scripts src/install-slug.ts | tar -x -C "$controller_dir"

2. Choose the channel, the Git strategy, and prepare

Channels (NANOCLAW_UPDATE_CHANNEL in .env; --channel <name> overrides it once): stable (default) = newest annotated vX.Y.Z tag; beta = newest -rc.N if newer than stable; edge = upstream main. Change the default only with set-channel (below), never by editing .env.

Default to merge. Use rebase only when the user explicitly wants linear history. Use cherry-pick only with an explicit comma-separated commit list.

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" prepare \
  --project-root "$PWD" --remote "$upstream_remote" --strategy merge

The JSON result is nanoclaw-update/v1. Record its id, stageRoot, backup branch/tag, changed files, and requirements. The live HEAD is still unchanged. Tell the user the channel and upstreamRef. Then:

  • Nothing new (stable/beta, phase: prepared, targetHead equals originalHead): say "Already on the newest release (vX.Y.Z)", still run step 3 (it refreshes installed skills), and abandon if targetHead is still unchanged.

  • Error code: ahead-of-release (nothing staged): ask once, "This install is newer than the latest release, <tag>. Keep getting the newest code from main (edge), or switch to releases and wait for the next one (stable)?" Save the answer, then on edge re-run prepare with --channel edge; on stable stop, as there is nothing to update until the next release:

    pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" set-channel \
      --project-root "$PWD" --channel edge   # or stable
    

If phase is conflict, resolve conflicts only inside stageRoot, preserving intentional local customizations. Complete the merge/rebase/cherry-pick there, commit it, then run:

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" resume \
  --project-root "$PWD" --id "$id"

Run every transaction command from $controller_dir, not from stageRoot: a cherry-pick stage can still hold the old controller. If $controller_dir is gone (a reboot clears temp directories), recreate it with the step 1 commands without fetching again.

Show the user the upstream commits, changed-file buckets, requirements, and any resolved conflicts. To stop with no live mutation:

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" abandon \
  --project-root "$PWD" --id "$id"

3. Validate the staged result

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" validate \
  --project-root "$PWD" --id "$id"

Validation performs a fork-safe structured refresh of every installed channel and provider, and of the selected gateway when gateway core or that gateway's own skill changed. On a skill-only change, a gateway it cannot resolve is skipped and named in the validation checks. It commits refreshed payloads in the staging branch, installs frozen dependencies, runs the host build and full host tests, and runs the container dependency/typecheck leg when Bun is available. A provider skill that declares Bun dependencies does not require Bun on the host: refresh runs the exact Bun version pinned by container/Dockerfile through pnpm. Any selected skill refresh or validation failure blocks cutover and the completion stamp.

Fix only failures caused by the staged update, inside stageRoot, commit the fix, and re-run validation. Do not mutate the live checkout to repair staging.

4. Confirm and cut over

Before downtime, show the exact changed files, required migrations, detected backup tag, and rollback command. Ask for one confirmation to begin cutover.

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" cutover \
  --project-root "$PWD" --id "$id"

Cutover stops the detected service, then stops this install's labeled agent containers (an agent mid-turn loses that turn; wait for a quiet moment if that matters), snapshots mutable state, resets the live branch to the validated target, installs frozen dependencies, builds the host, and updates the agent image when container/ changed. Hardened-image installs use pull; local-image installs build locally. The service remains stopped while required migrations are pending.

5. Complete every requirement

Process requirements one at a time.

  • For a referenced local guide, read it from the cut-over checkout and follow its detect, fix, verify, and rollback sections.
  • For a referenced /<skill>, read that skill's current SKILL.md and follow it directly. Do not require a harness-specific skill invocation feature.
  • For OneCLI pin moves, follow docs/onecli-upgrades.md; record the exact old version or rollback command because OneCLI is outside the Git snapshot.

If a migration intentionally changes tracked files, review and commit those changes before acknowledging it. Finish refuses a dirty cut-over checkout.

After verification, acknowledge the requirement:

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" ack \
  --project-root "$PWD" --id "$id" \
  --requirement "$requirement_id" --status succeeded

For an external component, also pass a concise exact rollback instruction:

... ack ... --rollback "restore onecli-gateway to <old-version>"

Use --status failed when verification fails. A pending or failed requirement blocks finish; never offer “restart anyway.” The state snapshot is the recovery path for forward local migrations.

6. Finish and health-check

pnpm exec tsx "$controller_dir/scripts/update-nanoclaw.ts" finish \
  --project-root "$PWD" --id "$id"

Finish stamps the exact version/commit/tree, restarts the service mode detected before cutover, and waits for the process, CLI socket, and a real CLI request. Only phase: complete is success.

After success, remove the staging worktree and its temporary branch from the live checkout. This keeps the backup branch/tag and mutable snapshot intact for rollback:

pnpm exec tsx scripts/update-nanoclaw.ts cleanup --id "$id"

If health fails, the controller restores the previous Git commit and mutable state, rebuilds the previous image, restarts the old service, and verifies it. If an external component was changed, also execute the recorded external rollback instruction and verify that component; Git cannot restore it.

7. Report and retain one rollback point

Report:

  • transaction id and final phase;
  • old, target, and official upstream commits;
  • backup branch/tag and mutable snapshot location;
  • conflicts resolved;
  • registry remotes and refreshed skills;
  • validation and image result;
  • completed migrations and external rollback instructions;
  • detected service mode and health result; and
  • remaining diff from official upstream.

Manual rollback remains available while the snapshot is retained:

pnpm exec tsx scripts/update-nanoclaw.ts rollback --id "$id"

Do not describe the Git tag alone as full rollback. The transaction snapshot is what restores SQLite and other mutable local state. Keep the newest successful transaction until the next update completes. Then preview older terminal transactions that are safe to prune:

pnpm exec tsx scripts/update-nanoclaw.ts prune --id "$id" --dry-run

Show the removed list and ask for confirmation. If confirmed, run the same command without --dry-run. Pruning keeps the selected transaction, every newer transaction, and every nonterminal transaction. It removes older terminal snapshots and their staging/backup Git references. Never delete transaction directories directly.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Equip NanoClaw agents to convert attached office documents into Markdown locally using Firecrawl AnyDoc. Agents can read Word, PowerPoint, Excel, and text-based PDF files without uploading them to an external parsing service.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reading and summarizing attached office documents
  • Converting documents without uploading them to an external service
  • Extracting text from text-based PDFs
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

Let a NanoClaw container agent call local models running in Atomic Chat. The skill adds an MCP server, a connection that exposes model listing and text generation as tools, while Claude continues to coordinate the work.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Delegate part of Claude's work to a local model
  • List models available in Atomic Chat
  • Generate an answer with a specified local model
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

Add a read-only web dashboard for browsing NanoClaw agents, sessions, and other resources. It builds tables from command-line JSON output and includes message activity charts, recent logs, and a viewer for skills, profiles, and CLAUDE.md files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check agent and session status in a browser
  • Review message counts and daily activity
  • Read recent host logs
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

add-codex

무료

Add Codex as the agent that plans tasks and coordinates tools in NanoClaw. Choose it for individual groups alongside Claude, with conversation history and session resume using a ChatGPT subscription or OpenAI API key.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding Codex as a NanoClaw agent provider
  • Choosing Claude or Codex for each group
  • Setting up ChatGPT or API key authentication
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

Install Cursor as an agent backend for NanoClaw groups using its local SDK. Set up authentication and container integration so groups can use Cursor for planning, MCP tools, streaming responses, and session continuation.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Install Cursor as a NanoClaw agent backend
  • Configure Cursor account sign-in or API key authentication
  • Switch a specific NanoClaw group to Cursor
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

Install a local NanoClaw dashboard to inspect agents, sessions, channels, messages, and users. It displays token usage, context usage, activity, and live logs using periodic data snapshots and a log forwarding module.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking agent and session status in one place
  • Reviewing token and context usage
  • Following live logs with level filters
nanocoai/nanoclaw3.1만2026년 10월 23일 업데이트

nanocoai의 스킬 모두 보기

이 스킬의 문제 신고