vcs-detect

Detect jj or git version control in the current project directory.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/sustinbebustin/.dotfiles --skill vcs-detect-sustinbebustin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vcs-detect
Source: https://github.com/sustinbebustin/.dotfiles/tree/main/home/.claude/skills/vcs-detect
Command: npx skills add https://github.com/sustinbebustin/.dotfiles --skill vcs-detect-sustinbebustin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents errors by automatically detecting whether a project uses jj (Jujutsu) or git for version control, ensuring the correct commands are used.

Core Features & Use Cases

  • Version Control Detection: Identifies the active VCS (jj or git) in the current directory.
  • Command Routing: Ensures subsequent VCS operations use the appropriate CLI (jj or git).
  • Handles Colocation: Correctly prioritizes jj when both jj and git repositories exist.
  • Use Case: When you ask the AI to "commit my changes," it first runs this skill to determine if it should execute git commit or jj commit.

Quick Start

Run this skill to determine the version control system in use.

Frequently Asked Questions about vcs-detect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect which version control system is used in a project directory?

To detect the version control system in a project directory, you can run a detection tool that checks for the presence of jj or git. This identifies the active VCS, prioritizing jj if both are colocated, to ensure correct command routing.

How does version control detection handle colocated jj and git repositories?

Version control detection handles colocated repositories by prioritizing jj when both jj and git are found in the same directory. This prevents command routing errors by ensuring the jj CLI is used for operations in mixed environments.

Why do I need VCS detection before committing changes with an AI assistant?

You need VCS detection before committing changes to prevent errors from running wrong CLI commands. It determines whether to execute git commit or jj commit, ensuring compatibility with the project's specific version control setup.

What happens if no git or jj repository is found in the current directory?

If no git or jj repository is found in the current directory, the VCS detection process handles the scenario by recognizing the absence of a version control system. This prevents failed operations when attempting subsequent version control commands.

Can I use automated VCS detection to route CLI commands for mixed repositories?

Yes, you can use automated VCS detection to route CLI commands for mixed repositories. It identifies whether jj or git is active and directs subsequent version control operations to the appropriate command-line interface, avoiding execution errors.