スキル一覧に戻る
trmcnvn

vcs-detect

by trmcnvn

.files

1🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: vcs-detect description: Detect whether the current project uses jj (Jujutsu) or git for version control. Run this BEFORE any VCS command to use the correct tool.

VCS Detection Skill

Detect the version control system in use before running any VCS commands.

Why This Matters

  • jj (Jujutsu) and git have different CLIs and workflows
  • Running git commands in a jj repo (or vice versa) causes errors
  • Some repos use jj with git colocated (both .jj/ and .git/ exist)

Detection Logic

Priority order (check in sequence):

  1. Check for .jj/ directory - If exists, use jj
  2. Check for .git/ directory - If exists, use git
  3. Neither found - Not a VCS-managed directory
if .jj/ exists -> use jj
else if .git/ exists -> use git
else -> no VCS detected

Detection Command

Run this single command to detect VCS:

if [ -d ".jj" ]; then echo "jj"; elif [ -d ".git" ]; then echo "git"; else echo "none"; fi

Command Mappings

Operationgitjj
Statusgit statusjj status
Loggit logjj log
Diffgit diffjj diff
Commitgit commitjj commit / jj describe
Branch listgit branchjj bookmark list
New branchgit checkout -b <name>jj bookmark create <name>
Pushgit pushjj git push
Pull/Fetchgit pull / git fetchjj git fetch
Rebasegit rebasejj rebase

Usage

Before any VCS operation:

  1. Run detection command
  2. Use appropriate CLI based on result
  3. If none, warn user directory is not version controlled

Example Integration

User: Show me the git log
Agent: [Runs detection] -> Result: jj
Agent: [Runs `jj log` instead of `git log`]

Colocated Repos

When both .jj/ and .git/ exist, the repo is "colocated":

  • jj manages the working copy
  • git is available for compatibility (GitHub, etc.)
  • Always prefer jj commands in colocated repos

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です