merge-upstream — community merge-upstream, shannon, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0

关于此技能

Nushell + Bash

shannonshell shannonshell
[8]
[0]
更新于: 4/14/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 1/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Review Score
1/11
Quality Score
34
Canonical Locale
en
Detected Body Locale
en

Nushell + Bash

核心价值

Nushell + Bash

适用 Agent 类型

Suitable for operator workflows that need explicit guardrails before installation and execution.

赋予的主要能力 · merge-upstream

! 使用限制与门槛

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The page lacks a strong recommendation layer.
  • - The page lacks concrete use-case guidance.
  • - The page lacks explicit limitations or caution signals.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

merge-upstream 是什么?

Nushell + Bash

如何安装 merge-upstream?

运行命令:npx killer-skills add shannonshell/shannon/merge-upstream。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

merge-upstream 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add shannonshell/shannon/merge-upstream。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    merge-upstream 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

merge-upstream

安装 merge-upstream,这是一款面向AI agent workflows and automation的 AI Agent Skill。支持 Claude Code、Cursor、Windsurf,一键安装。

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

Merge Upstream

Shannon tracks nushell and reedline as git subtrees under nushell/ and reedline/. Every few nushell releases, we pull upstream to pick up new features and fixes. This skill captures what actually works — because scripts/sync-upstream.sh alone is not enough when upstream has drifted.

Why the script alone doesn't work

scripts/sync-upstream.sh runs git subtree pull for nushell and reedline, then cargo build && cargo test. That's fine for tiny drifts. For real upstream releases it fails because:

  1. Subtree auto-merge is noisy. A hundred or more files will conflict — most of them files Shannon never touched. The auto-merger gets confused by rename chains and workspace-wide edits.
  2. Auto-merged files end up half-upstream, half-fork. Even files that don't show conflicts can end up with stale content that references removed APIs. You won't see this until cargo build fails deep in nu-protocol or nu-parser.
  3. New upstream files get missed. When auto-merge fights with the subtree prefix, new files upstream added may not appear in our tree at all — the build will complain about missing modules.
  4. Shannon's own src/ lags upstream API. src/main.rs and src/run.rs are copied from nushell's binary and drift every release.
  5. Root Cargo.toml version pins don't auto-bump. The Shannon crate still references the old 0.N.0 nu-* versions.
  6. Reedline must move in lockstep. Nushell's workspace pins a specific reedline version; if you only pull nushell, the build fails because our vendored reedline is stale.

Shannon's fork surface (the only 10 files we preserve)

Keep these exact files across upgrades. Everything else in nushell/ should come from upstream verbatim:

  • nushell/Cargo.toml — workspace reedline path dep, shannon package renames (shannon-nu-cli, shannon-nu-lsp), shannon crate versions
  • nushell/crates/nu-cli/Cargo.tomlname = "shannon-nu-cli", tree-sitter deps for BashHighlighter
  • nushell/crates/nu-cli/src/bash_highlight.rs — NEW, tree-sitter-based bash syntax highlighter
  • nushell/crates/nu-cli/src/mode_dispatcher.rs — NEW, ModeDispatcher trait
  • nushell/crates/nu-cli/src/lib.rs — declares mod bash_highlight, mod mode_dispatcher, and re-exports BashHighlighter, ModeDispatcher, ModeResult
  • nushell/crates/nu-cli/src/repl.rs — dispatch hook in loop_iteration() that forwards to ModeDispatcher::execute() when $env.SHANNON_MODE is not "nu"; also a few smaller tweaks
  • nushell/crates/nu-cli/src/nu_highlight.rs — small tweak
  • nushell/crates/nu-command/src/platform/input/input_.rs — small tweak
  • nushell/crates/nu-lsp/Cargo.tomlname = "shannon-nu-lsp", references shannon-nu-cli

Verify this list against the current state before you start:

sh
1git diff --stat <last-nushell-import-commit>..HEAD -- nushell/

If new Shannon-modified files appear, add them to the preserve list below.

The reliable procedure

Work on a branch — never on main.

1. Preflight

Clean working tree. Fetch upstream. Count the drift.

sh
1git status # must be clean 2git fetch upstream-nushell upstream-reedline 3git log --oneline <last-merge-base>..upstream-nushell/main | wc -l

Large drifts (100+ commits) are the norm — that's fine, just plan for conflicts.

2. Branch off

sh
1git checkout -b upgrade/nushell-$(date +%Y-%m-%d)

3. Pull nushell (expect conflicts)

sh
1git subtree pull --prefix nushell upstream-nushell main \ 2 -m "Merge nushell upstream $(date +%Y-%m-%d)"

This will fail with "Automatic merge failed". That is expected.

4. Save Shannon's fork files to /tmp

Before doing anything destructive:

sh
1mkdir -p /tmp/shannon_patches 2cp nushell/Cargo.toml /tmp/shannon_patches/Cargo.toml 3cp nushell/crates/nu-cli/Cargo.toml /tmp/shannon_patches/nu-cli-Cargo.toml 4cp nushell/crates/nu-cli/src/bash_highlight.rs /tmp/shannon_patches/bash_highlight.rs 5cp nushell/crates/nu-cli/src/mode_dispatcher.rs /tmp/shannon_patches/mode_dispatcher.rs 6cp nushell/crates/nu-cli/src/lib.rs /tmp/shannon_patches/lib.rs 7cp nushell/crates/nu-cli/src/nu_highlight.rs /tmp/shannon_patches/nu_highlight.rs 8cp nushell/crates/nu-cli/src/repl.rs /tmp/shannon_patches/repl.rs 9cp nushell/crates/nu-command/src/platform/input/input_.rs /tmp/shannon_patches/input_.rs 10cp nushell/crates/nu-lsp/Cargo.toml /tmp/shannon_patches/nu-lsp-Cargo.toml

The unresolved conflict markers in those files are fine — they're snapshots, not for reuse. What you actually need from them is the Shannon side of each hunk, which you'll recreate by hand in step 7. In practice the easier workflow is: commit the broken merge first (step 5), then re-export clean Shannon versions from the main branch:

sh
1git show main:nushell/Cargo.toml > /tmp/shannon_patches/Cargo.toml 2# ... and so on

5. Commit the busted merge so you have a clean slate

Don't try to hand-resolve 100+ conflicts. Just stage whatever's there and commit it — you're about to overwrite the tree anyway.

sh
1git checkout --theirs -- $(git diff --name-only --diff-filter=U) 2git add -A 3git -c core.editor=true commit --no-edit

6. Wholesale-replace the nushell/ tree with upstream

This is the step that makes everything else tractable. Wipe nushell/ and re-populate from upstream-nushell/main:

sh
1git rm -rqf nushell/ 2mkdir -p nushell 3git archive upstream-nushell/main | tar -x -C nushell/

You now have a pristine copy of upstream's tree at nushell/, free of any auto-merge weirdness.

7. Re-apply Shannon's fork files

sh
1cp /tmp/shannon_patches/Cargo.toml nushell/Cargo.toml 2cp /tmp/shannon_patches/nu-cli-Cargo.toml nushell/crates/nu-cli/Cargo.toml 3cp /tmp/shannon_patches/bash_highlight.rs nushell/crates/nu-cli/src/bash_highlight.rs 4cp /tmp/shannon_patches/mode_dispatcher.rs nushell/crates/nu-cli/src/mode_dispatcher.rs 5cp /tmp/shannon_patches/lib.rs nushell/crates/nu-cli/src/lib.rs 6cp /tmp/shannon_patches/nu_highlight.rs nushell/crates/nu-cli/src/nu_highlight.rs 7cp /tmp/shannon_patches/repl.rs nushell/crates/nu-cli/src/repl.rs 8cp /tmp/shannon_patches/input_.rs nushell/crates/nu-command/src/platform/input/input_.rs 9cp /tmp/shannon_patches/nu-lsp-Cargo.toml nushell/crates/nu-lsp/Cargo.toml

Then update the Shannon files for upstream API churn:

  • nushell/Cargo.toml — bump all version = "0.OLD.0" entries in the [dependencies] block to match the new upstream version. Keep the shannon-nu-cli / shannon-nu-lsp package renames and Shannon crate versions. Bump reedline in [workspace.dependencies] to the new version and keep path = "../reedline". The [workspace.package] and [[test]] blocks may be new from upstream — preserve them.
  • nushell/crates/nu-cli/Cargo.toml — bump all version = "0.OLD.0" in both [dev-dependencies] and [dependencies]. Add rust-version.workspace = true and autotests = false if upstream introduced them.
  • nushell/crates/nu-lsp/Cargo.toml — same pattern.

8. Pull reedline

sh
1git subtree pull --prefix reedline upstream-reedline main \ 2 -m "Merge reedline upstream $(date +%Y-%m-%d)" 3# Resolve Cargo.lock conflict by taking upstream: 4git checkout --theirs -- reedline/Cargo.lock 5git add reedline/Cargo.lock 6git -c core.editor=true commit --no-edit

Reedline has no Shannon-side changes, so conflicts are minimal (usually just Cargo.lock).

9. Regenerate Cargo.lock files

sh
1rm nushell/Cargo.lock 2(cd nushell && cargo generate-lockfile)

The root Cargo.lock regenerates on the next cargo build.

10. Bump root Cargo.toml

In /Users/ryan/dev/shannon/Cargo.toml, update:

  • Every nu-* = { version = "0.OLD.0", ... } to the new version
  • reedline = { version = "0.OLD.0", ... } to the new version

A sed one-liner works if the old version is unique:

sh
1sed -i '' 's/version = "0.111.0"/version = "0.112.2"/g' Cargo.toml 2sed -i '' 's/version = "0.46.0"/version = "0.47.0"/g' Cargo.toml

(macOS sed uses -i ''. Linux: sed -i.)

11. Update Shannon's src/main.rs and src/run.rs for API churn

Shannon's src/ is copied from nushell's binary and drifts every release. Diff against upstream to find what changed:

sh
1diff src/main.rs nushell/src/main.rs 2diff src/run.rs nushell/src/run.rs

Common changes:

  • std::time::Instantnu_utils::time::Instant. Nushell migrated to its own Instant wrapper. Replace everywhere in Shannon's src/.
  • nu_protocol::location!() removed. Calls to IoError::new_internal_with_path(err, msg, location!(), path) now take only (err, msg, path) — drop the location!() argument.
  • ShellError::GenericErrorShellError::Generic. (Currently emits deprecation warnings; not a build failure yet.)
  • evaluate_repl signature changes. Check the argument list against upstream if you get a type mismatch.

The diff against upstream's equivalent file is the fastest way to find all call sites that need updating.

12. Build

sh
1cargo build

First build errors will usually be in nu-parser or nu-protocol complaining about missing exports. If you see this after a wholesale tree replace, it's almost always stale incremental compilation artifacts from an earlier failed build. Force a rebuild of the affected crate:

sh
1touch nushell/crates/nu-experimental/src/lib.rs # or whichever crate is stuck 2cargo build

Avoid cargo clean — per nushell/CLAUDE.md, it just wastes compile time.

Once nushell/ compiles, the next errors will be in shannonshell itself (src/main.rs, src/run.rs) — those are the API-churn fixes from step 11.

13. Smoke test

sh
1./target/debug/shannon --version 2./target/debug/shannon

In the interactive shell:

  1. Type a nushell command (e.g. ls) — verify nu mode works
  2. Press Shift+Tab — verify mode switches to bash
  3. Type a bash command (e.g. echo $HOME) — verify bash mode works
  4. Press Shift+Tab — verify it switches back to nu
  5. Verify env vars propagate across the switch (e.g. cd /tmp in bash, then back to nu and check pwd)

The build passing is not sufficient — Shannon's ModeDispatcher hook lives in repl.rs, which upstream rewrites frequently. A merge can compile fine but silently break the dispatcher.

14. Commit the work

At this point you should have on the branch:

  1. The busted-merge commit (nushell subtree pull)
  2. The reedline merge commit
  3. One or two commits for the wholesale tree replace + Shannon fork re-application + root Cargo.toml / src/ API updates

Merge to main when ready:

sh
1git checkout main 2git merge --no-ff upgrade/nushell-$(date +%Y-%m-%d)

Things that will bite you

  • Don't use --squash with git subtree. Shannon's CLAUDE.md explicitly forbids it. Full history across merged projects must be preserved for blame/log/bisect.
  • Don't hand-resolve 100+ conflicts. Wholesale replace is faster and correct. Conflict-by-conflict resolution leaves stale auto-merged content in files you don't notice until build time.
  • Don't forget reedline. Pull both or the build will fail on version pinning.
  • Don't forget the root Cargo.toml. Bumping only nushell/Cargo.toml is not enough.
  • Don't skip the interactive smoke test. cargo build does not exercise the dispatcher hook.
  • The scripts/sync-upstream.sh script is not the source of truth. This skill is. Update the script if you want, but don't rely on it alone for real upgrades.

After the upgrade

Consider opening an issue under issues/ to track any cleanup work — deprecation warnings to address, features upstream added that Shannon could expose (e.g. ExternalHinter in repl.rs), or new commands that should be wired up.

相关技能

寻找 merge-upstream 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
开发者工具