Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计异常

update-nanoclaw更新纳米爪

Agent Skill

update-nanoclaw 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

245

周安装

10

GitHub Stars

28,117

下载量

78
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:update-nanoclaw(更新纳米爪)
来源仓库:https://github.com/qwibitai/nanoclaw
仓库路径:skills/update-nanoclaw
安装命令:
npx skills add https://github.com/qwibitai/nanoclaw --skill update-nanoclaw
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/qwibitai/nanoclaw --skill update-nanoclaw

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。
  • update-nanoclaw 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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/qwibitai/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
  • Source (src/): may conflict if you modified the same files
  • Build/config (package.json, tsconfig*.json, container/): review needed

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.

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 0: Preflight (stop early if unsafe)

Run:

  • git status --porcelain If output is non-empty:
  • Tell the user to commit or stash first, then stop.

Confirm remotes:

  • git remote -v If upstream is missing:
  • Ask the user for the upstream repo URL (default: https://github.com/qwibitai/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/main exists, use main.
  • If only upstream/master exists, use master.
  • Otherwise, ask the user which branch to use.
  • Store this as UPSTREAM_BRANCH for all subsequent commands. Every command below that references upstream/main should use upstream/$UPSTREAM_BRANCH instead.

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-$TIMESTAMP
  • git 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
  • Source (src/): may conflict if user modified the same files
  • Build/config (package.json, pnpm-lock.yaml, tsconfig*.json, container/, launchd/): review needed
  • Other: docs, tests, 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 status and 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

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 --continue If 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 --continue If it gets messy (more than 3 rounds of conflicts): - git rebase --abort - Recommend merge instead.

Step 5: Validation

Run:

  • pnpm run build
  • pnpm test (do not fail the flow if tests are not configured)

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 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: true so 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: Check for skill updates

After the summary, check if skills are distributed as branches in this repo:

  • git branch -r --list 'upstream/skill/*'

If any upstream/skill/* branches exist:

  • Use AskUserQuestion to ask: "Upstream has skill branches. Would you like to check for skill updates?"

- Option 1: "Yes, check for updates" (description: "Runs /update-skills to check for and apply skill branch updates") - Option 2: "No, skip" (description: "You can run /update-skills later any time")

  • If user selects yes, invoke /update-skills using the Skill tool.
  • After the skill completes (or if user selected no), 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:

- If using launchd: launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist && launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist - If running manually: restart pnpm run dev

Diagnostics

  1. Use the Read tool to read .claude/skills/update-nanoclaw/diagnostics.md.
  2. Follow every step in that file before finishing.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.13%
按下载量换算27

Claude

33.91%
按下载量换算26

Cursor

18.24%
按下载量换算14

Gemini CLI

9.24%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills