Token导航 LogoToken导航TokenDH.com
待分类操作浏览器github未标认证来源可访问许可证需确认审计通过

dubstackdubstack 命令行

Agent Skill

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

总安装

392

周安装

16

GitHub Stars

1

下载量

125
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/wiseiodev/dubstack --skill dubstack

简介

dubstack 提供基于堆叠分支的轻量级命令行工具集,简化 stacked diff 的日常操作。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中依赖主干派生多特性分支的开发模式。
  • 常用命令包括创建、修改、导航与提交等,支持 AI 增强型交互体验扩展。
  • 需在 dub 配置中启用 ai-assistant 选项才能享受完整智能化操作支持。
  • dubstack 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

DubStack CLI Skill

Use this skill whenever the user is working in a repo that uses dub for stacked diffs.

Core Concepts

  • Stack: A chain of dependent branches (main -> feat/a -> feat/b)
  • Root: Trunk branch for a stack (commonly main)
  • Restack: Rebase branches so each child is based on its updated parent
  • Submit: Push stack branches and create/update PRs

Fast Command Map

IntentCommand
Create branchdub create <name>
AI createdub create --ai
Create + commitdub create <name> -am "msg"
AI full flowdub flow --ai -a / dub f --ai -a
Modify current branchdub modify / dub m
Navigate stackdub up, dub down, dub top, dub bottom
Interactive checkoutdub checkout / dub co
View stackdub log / dub ls
View current stack onlydub log --stack
Sync with remotedub sync
Rebase stackdub restack
Continue interrupted opdub continue
Abort interrupted opdub abort
Track/re-parent branchdub track [branch] --parent <branch>
Untrack metadata onlydub untrack [branch] [--downstack]
Stack-aware delete`dub delete [branch] [--upstack
Show parent/children/trunkdub parent, dub children, dub trunk
Submit PR stackdub submit / dub ss
AI PR descriptiondub submit --ai
Open PR in browser`dub pr [branch
Undo last create/restackdub undo
Ask AI assistantdub ai ask "..."
AI conflict helpdub ai resolve / dub continue --ai

Command Notes

Create

dub create feat/x
dub create feat/x -m "feat: ..."
dub create feat/x -am "feat: ..."
dub create feat/x -um "feat: ..."
dub create feat/x -pm "feat: ..."
  • -a: stage all
  • -u: stage tracked-file updates
  • -p: interactive hunk staging
  • staging flags require -m

AI create mode:

dub create --ai
dub create -ai
dub create --no-ai feat/x
  • --ai generates both branch name and commit message from staged changes.
  • --no-ai overrides repo AI defaults for a single invocation.
  • if a repo commit template is configured via git config commit.template, AI create preserves that structure in the generated commit body.

Modify

dub m
dub m -c -m "fix: ..."
dub m -p
dub m -u
dub m -v
dub m -vv
dub m --interactive-rebase
  • Restacks descendants after modification.
  • -m can be passed multiple times.
  • -v prints staged diff, -vv also prints unstaged diff.

Checkout and Navigation

dub co
# or
dub checkout --stack
dub checkout --show-untracked
dub checkout --trunk
dub up
dub up 2
dub down
dub down --steps 2
dub top
dub bottom

Sync, Restack, Submit, PR

dub sync
dub sync --all
dub sync --no-interactive
dub sync --force
dub sync --no-restack
dub restack
dub restack --continue
dub continue
dub abort
dub ss
dub submit --dry-run
dub submit --ai
dub submit --no-ai
dub flow --ai -a
dub f --dry-run
dub pr
dub pr feat/a
dub pr 123

Track, Untrack, Delete

dub track
dub track feat/a --parent main

dub untrack feat/a
dub untrack feat/a --downstack

dub delete feat/a
dub delete feat/a --upstack
dub delete feat/a --downstack
dub delete feat/a --force --quiet

Orientation

dub parent
dub children
dub trunk

Recommended Workflow

  1. Start from trunk: git checkout main && git pull
  2. Create layers with dub create... -am...
  3. Inspect stack with dub log
  4. Submit with dub ss
  5. Iterate with dub m... and dub ss
  6. Keep updated with dub sync (or dub restack when needed)

AI Setup

dub ai env --gemini-key "<your-key>"
# or
dub ai env --gateway-key "<your-key>"

dub config ai-assistant on
dub config ai-defaults create on
dub config ai-defaults submit on
dub config ai-defaults flow on

Precedence:

  1. command flag such as --ai or --no-ai
  2. repo-local dub config ai-defaults...
  3. built-in fallback of off

AI Workflow

Manual path:

  1. stage changes
  2. run dub create <name> -am "type: summary"
  3. run dub submit

AI-assisted path:

  1. stage changes or use -a, -u, or -p
  2. run dub flow --ai
  3. review the rendered branch, commit, and PR previews
  4. approve or edit
  5. let DubStack create and submit

Notes:

  • In non-interactive terminals, add -y because dub flow approval prompts require a TTY.
  • dub ai ask streams response text live and renders tool/status lines separately in TTY output.

Template Setup

If a repo wants DubStack AI to follow existing formatting, set up templates first.

Pull request templates:

  • .github/pull_request_template.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/PULL_REQUEST_TEMPLATE/*.md
  • docs/pull_request_template.md
  • pull_request_template.md

Commit message templates:

cat <<'EOF' > .gitmessage
feat(scope): summary

## Testing
- [ ] added coverage
EOF

git config commit.template .gitmessage

Notes:

  • PR titles still come from the last commit message.
  • AI-generated PR descriptions preserve repo PR template structure when present.
  • AI-generated commit bodies preserve repo commit template structure when present, but the first line still needs to be a valid Conventional Commit subject.

Recovery Patterns

Restack conflict

# after conflict
git add <resolved-files>
dub restack --continue

Undo mistaken create/restack

dub undo

Branch not tracked

  • Track branch explicitly:
dub track <branch> --parent <parent>
  • Verify placement:
dub parent <branch>
dub trunk <branch>

Common Errors

SymptomAction
gh CLI not foundInstall gh
Not authenticated with GitHubgh auth login
branch missing from stackUse dub create from tracked context
sync skips branchesrerun with interactive mode or --force if appropriate

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.52%
按下载量换算44

Claude

31.99%
按下载量换算40

Cursor

16.57%
按下载量换算21

Gemini CLI

8.27%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills