Used when working with vcs/git/jj/commit task, triggered by phrase like [git], [git commit], [diff], [push], [check git status], [create git branch], [git worktree], [git sqaush], [review with changes], [review with lifeguard], [jj], [jj commit], [jj changes], [commit changes]
/plugin marketplace add towry/dots/plugin install claude-code-skills@local-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/git_workflows.mdreferences/jj_bookmarks.mdreferences/jj_revset.mdreferences/jj_template.mdreferences/jj_workflows.mdscripts/repo_check.shNote:
<skill-base-dir> refers to the git skill directory (~/.claude/skills/git-jj/) containing this SKILL.md file.<type>(<scope>): <description>Provide specialized workflows for Git and Jujutsu (jj) version control systems with automatic repository detection, command reference lookup, and safe operation practices.
Activate this skill for VCS tasks involving Git or Jujutsu (jj), such as:
Run the repository detection script using the Bash tool:
bash ~/.claude/skills/git-jj/scripts/repo_check.sh
Important: Execute this command from the repository root (user's current working directory). The script checks for .jj or .git folders in the current directory.
The script outputs one of three values to stdout:
jj - Jujutsu repository detected (.jj folder exists)git - Git repository detectedno-repo - No repository foundPriority: If both .jj folder and .git exist (common when jj operates atop git), the script returns jj to respect jj-first preference.
| Output | Action |
|---|---|
jj | Follow JJ Branch workflow. Read ~/.claude/skills/git-jj/references/jj_workflows.md for core commands and working copy model. |
git | Follow Git Branch workflow. Read ~/.claude/skills/git-jj/references/git_workflows.md for command syntax. |
no-repo | Proceed to Repository Initialization workflow below. |
When following the JJ branch, load additional references based on task complexity:
Always read first:
~/.claude/skills/git-jj/references/jj_workflows.md - Core commands, working copy model, WIP pattern, filesetsRead conditionally when needed:
~/.claude/skills/git-jj/references/jj_bookmarks.md~/.claude/skills/git-jj/references/jj_revset.md~/.claude/skills/git-jj/references/jj_template.mdReference selection rules:
jj_bookmarks.mdjj_revset.mdjj_template.mdjj_workflows.md (Fileset section)<skill-base-dir>/references/git_workflows.md for all Git operations (covers branches, worktrees, stashing, troubleshooting)AskUserQuestion tool to ask: "No repository found. Initialize jj or git?"
jj init or jj git init (if git backend desired), then load references/jj_workflows.mdgit init, then load references/git_workflows.mdFor command syntax, see reference files. This section covers workflow orchestration.
Bash tool BEFORE invoking other toolsjj_workflows.md or git_workflows.md for commandsscripts/repo_check.sh first to confirm VCS type.jj diff output unless very small (<200 lines). Instead launch the lifeguard subagent with an execution plan listing jj commands it should run to gather its own context.please load git claude skill (this triggers skill reference loading), OR (b) inline list of reference file paths you want it to consult. Prefer phrase for brevity; attach paths when focusing on specialized areas (revsets, bookmarks, templates).Reference file path list
Use this canonical jj command set in the lifeguard prompt (adjust as needed):
# Core context collection
jj --no-pager status
jj --no-pager log -n 20 --no-graph
jj --no-pager diff # working copy changes
# Targeted commit review (replace <rev>)
jj --no-pager show <rev>
# Compare parent vs current working copy commit
jj --no-pager diff -r @-..@
# Multi-commit / ancestry exploration examples
jj --no-pager log -r "ancestors(@, 10)"
jj --no-pager log -r "descendants(@, 5)"
Optional revset queries when user asks for filtering:
# Author filter
jj --no-pager log -r "author('name@example.com') & ancestors(@, 20)"
# Files touched
jj --no-pager log -r "file('src/**') & ancestors(@, 30)"
Bookmark/WIP context to include in the lifeguard prompt (if applicable):
Prompt template example (JJ):
Please load git claude skill.
Review JJ working copy and recent commits. Run the listed jj commands (modify as needed) to inspect changes; focus on correctness, style, and potential refactors. Repository uses JJ atop git.
Commands to run:
1. jj --no-pager status
2. jj --no-pager diff
3. jj --no-pager log -n 20 --no-graph
4. jj --no-pager diff -r @-..@
If needed: jj --no-pager show <rev>, jj --no-pager log -r "ancestors(@, 10)".
Bookmark: <bookmark-name>
Parent commit description: <parent-desc>
Relevant references (if needed): ~/.claude/skills/git-jj/references/jj_revset.md
Git prompt template (large diff scenario):
Please load git claude skill.
Review pending changes. Fetch diffs yourself; do NOT rely on inline diff copy. Focus on correctness, style, and commit structuring.
Commands to run:
1. git status
2. git diff
3. git log --oneline -n 20
When focusing on a subset of files, pass a short list of paths (not full diff). Lifeguard will retrieve their diffs directly.
Summary:
git add workflow-m flag (bare jj commit opens editor, blocks agent). See ~/.claude/skills/git-jj/references/jj_workflows.md for WIP pattern.jj --no-pager log -n 4 --no-graph--force unless explicitly requested.jj + .git coexist, prefer jj commandsgit_workflows.md for full mapping tablescripts/repo_check.sh → Determine VCS typejj_workflows.md WIP pattern)jj when .jj folder existsTodoWrite for multi-step VCS workflows