Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计提醒

jujutsujujutsu 搜索

Agent Skill

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

总安装

372

周安装

16

GitHub Stars

1

下载量

131
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/factorial-io/skills --skill jujutsu

简介

jujutsu (jj) 作为 Git 兼容的版本控制系统,简化了提交与分支心智模型。

  • 无暂存区设计,每个变更自动纳入工作副本,使用 bookmarks 替代传统分支名。
  • 适合需要频繁历史编辑与冲突值处理的复杂协作场景,降低 Git 学习门槛。
  • 迁移项目前应完整备份原仓库,防止因操作失误导致历史丢失或混乱。
  • jujutsu 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Jujutsu (jj) Usage Guide for Claude Code

This document instructs Claude Code to use jj (Jujutsu) instead of git for version control operations. jj is a Git-compatible VCS that provides a simpler mental model and powerful history editing.

Core Concepts

Key Differences from Git

  1. No staging area - Every change is automatically part of the working copy commit
  2. Working copy is a commit - The @ symbol represents your current working copy commit
  3. Anonymous branches - Commits don't need branch names; use "bookmarks" when needed for pushing
  4. Conflicts are values - Conflicts don't block operations; they're tracked and can be resolved later
  5. Automatic rebasing - Descendant commits automatically rebase when you modify history

Terminology Mapping

Gitjj
branchbookmark
HEAD@ (working copy)
checkoutedit or new
stashNot needed (just create new commits)
staging/indexNot applicable
commit --amendJust edit, changes auto-apply to @

Common Operations

Viewing State

# Show current status (like git status)
jj status
jj st              # short form

# Show commit log (like git log --graph)
jj log
jj log -r 'all()'  # show all commits

# Show diff of working copy
jj diff --git

# Show diff of specific commit
jj diff --git -r <commit>

# Show commit details
jj show <commit>

Creating Commits

# Describe the current working copy commit
jj describe -m "feat: add new feature"
jj desc -m "feat: add new feature"  # short form

# Create a new empty commit on top of current
jj new
jj new -m "feat: starting new work"  # with message

# Create new commit on top of specific commit
jj new <commit>
jj new main        # new commit based on main

Editing History

# Edit an existing commit (moves @ to that commit)
jj edit <commit>

# Squash current commit into parent
jj squash -m "combined message"

# Squash specific commit into its parent
jj squash -r <commit> -m "combined message"

# Squash specific paths from one commit into another (no editor)
jj squash --from <src> --into <dst> <paths>

# Restore specific paths to the state at another commit
jj restore --from <rev> <paths>

# Split a commit by file paths (no editor, see "Avoiding Interactive Editors")
jj split <path>...

# Absorb changes into appropriate ancestor commits
jj absorb

# Rebase commits
jj rebase -r <commit> -d <destination>      # single commit
jj rebase -s <commit> -d <destination>      # commit and descendants
jj rebase -b <commit> -d <destination>      # whole branch

Working with Bookmarks (Branches)

# List bookmarks
jj bookmark list

# Create a bookmark at current commit
jj bookmark create <n>
jj bookmark create <n> -r <commit>  # at specific commit

# Move a bookmark to current commit
jj bookmark set <n>

# Delete a bookmark
jj bookmark delete <n>

# Track a remote bookmark
jj bookmark track <n>@origin

Remote Operations

# Fetch from remote
jj git fetch
jj git fetch --remote origin

# Push bookmark to remote
jj git push --bookmark <n>
jj git push -b <n>  # short form

# Push current commit's bookmark
jj git push

# Create and push in one step (if bookmark exists)
jj bookmark set feature-x && jj git push -b feature-x

Handling Conflicts

# Conflicts don't block operations - check for them
jj log -r 'conflicts()'

# Resolve conflicts in working copy
# Just edit the files, remove conflict markers, save

# After resolving, the commit auto-updates
jj status  # verify resolved

Undo and Recovery

# Show operation log
jj op log

# Undo last operation
jj op undo

# Restore to specific operation
jj op restore <operation-id>

Workflow Patterns

Starting New Work

When starting substantial new work (feature, bug fix, refactor), create a new commit first:

# Start new work from main
jj new main -m "feat: description of the work"

# Or start from current position
jj new -m "fix: description of the fix"

This keeps changes isolated and makes it easier to:

  • Understand what changed for a specific piece of work
  • Review changes before merging
  • Revert or modify specific work without affecting other changes

Making Changes

The cheapest way to get atomic commits is to create them as you go, not to split a sprawling working copy afterward. Between logical steps, run jj new:

# start work with a description already in place
jj new -m "refactor: extract auth helper"
# ...edit files...

# move on to the next logical step
jj new -m "feat: use auth helper in login flow"
# ...edit files...

# and the next
jj new -m "test: cover auth helper edge cases"

If the description needs updating later:

jj describe -m "refactor: extract auth helper from login module"

If two adjacent commits turn out to be one logical change after all:

jj squash -m "combined message"

Cleaning Up Before Push

# Squash fixup commits into their parents
jj squash -r <fixup-commit>

# Or use absorb to automatically distribute changes
jj absorb
# Note: absorb only moves hunks into ancestor commits that already
# touch the same lines. It won't create new commits; if you have
# mixed unrelated changes in @, split them first.

# Rebase onto latest main
jj git fetch
jj rebase -d main

Creating a Pull Request

# Ensure bookmark exists
jj bookmark create my-feature

# Push to remote
jj git push -b my-feature

# Or push and create bookmark tracking
jj git push --bookmark my-feature

Updating a PR After Review

# Edit the commit that needs changes
jj edit <commit>

# Make changes (they apply directly)
# Descendants auto-rebase

# Return to working on tip
jj new <tip-commit>

# Force push updated bookmark
jj git push -b my-feature

Best Practices

Commit Messages

  • Use conventional commits: feat:, fix:, chore:, refactor:, docs:, test:
  • Describe the commit when the work is complete, not at the start
  • Use jj describe to update messages as work evolves

History Hygiene

  • Use jj squash to combine WIP commits before pushing
  • Use jj absorb to fold review feedback into original commits
  • Keep commits atomic and focused

Bookmark Naming

When pushing to GitHub, use descriptive bookmark names:

jj bookmark create fix/issue-123-auth-bug
jj bookmark create feat/user-dashboard
jj bookmark create claude/<feature>-<session-id>  # for Claude Code sessions

Before Push Checklist

# 1. Check for conflicts
jj log -r 'conflicts()'

# 2. Ensure clean status
jj status

# 3. Rebase onto latest main
jj git fetch && jj rebase -d main

# 4. Review changes
jj log -r '::@ ~ ::main'

# 5. Push
jj git push -b <bookmark>

Coexistence with Git

jj can coexist with git in the same repository:

# Initialize jj in existing git repo
jj git init --colocate

# jj and git now share the same .git directory
# You can use either tool, but prefer jj for day-to-day work

When colocated:

  • jj git fetch updates both jj and git refs
  • jj git push pushes via git
  • git commands still work if needed for edge cases

Avoiding Interactive Editors

jj commands like squash, describe, commit, and split open an interactive editor by default. Since LLMs cannot drive TUIs, always use the non-interactive forms:

  • Commit messages inline: always pass -m "message" to describe, squash, commit, new.
  • Squash without editor: jj squash -m "message" or jj squash --into <rev> -m "message".
  • Squash specific paths only: jj squash --from <src> --into <dst> <paths> moves only the named files, no editor involved.
  • Restore specific paths: jj restore --from <rev> <paths> pulls paths back to the state at <rev>, useful for peeling changes off a commit.

Splitting commits non-interactively

jj split *can* be used non-interactively — don't avoid it, just use the right invocation:

  • File-based split (preferred): jj split <path>... moves the listed paths into the first commit and leaves everything else in the second. No editor opens. Use this whenever atomic boundaries align with files.
  • Parallel split: add --parallel if the two halves should be siblings rather than stacked.
  • Messages inline: add -m "first" -m "second" to set both commit descriptions without prompting.

Example:

jj split -m "refactor: extract helper" -m "feat: use helper in X" \
    src/helper.rs

When file-based split isn't enough

For hunk-level splits within a single file, prefer one of these patterns over trying to drive the interactive TUI:

  1. Split before you mess up — the best strategy. Between logical steps, run jj new -m "next thing". You end up with atomic commits by construction and never need split.
  2. Compose with squash/restore: jj new # empty change on top # edit files to the desired state of part A jj squash --from <original> --into @ <paths-for-A> # the original commit now contains only part B
  3. Patch round-trip (last resort, fully scriptable): jj diff -r <rev> --git > /tmp/full.patch # split the patch into partial.patch and rest.patch jj restore -r <rev> jj new -r <rev>- git apply /tmp/partial.patch && jj commit -m "part A" git apply /tmp/rest.patch && jj commit -m "part B"

Command Quick Reference

ActionCommand
Statusjj st
Logjj log
Diffjj diff --git
Describe commitjj desc -m "message"
New commitjj new
Edit old commitjj edit <rev>
Squash into parentjj squash -m <message>
Squash pathsjj squash --from <src> --into <dst> <paths>
Split by filejj split <path>...
Rebasejj rebase -d <dest>
Create bookmarkjj bookmark create <n>
Fetchjj git fetch
Pushjj git push -b <n>
Undojj op undo

Error Recovery

If something goes wrong:

# See what happened
jj op log

# Undo the last operation
jj op undo

# Or restore to a known good state
jj op restore <operation-id>

jj's operation log means you can always recover from mistakes - nothing is ever truly lost.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenCode

31.58%
按下载量换算41

Codex

21.85%
按下载量换算29

Claude Code

19.49%
按下载量换算26

windsurf

11.61%
按下载量换算15

Cursor

8.86%
按下载量换算12

Antigravity

3.65%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills