Hug SCM Repository Analysis

Investigate Git repository history, authorship, and code changes using Hug SCM commands.

2|1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/elifarley/hug-scm --skill hug-scm-repository-analysis-elifarley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hug SCM Repository Analysis
Source: https://github.com/elifarley/hug-scm/tree/main/docs/skills/hug-repo-analysis
Command: npx skills add https://github.com/elifarley/hug-scm --skill hug-scm-repository-analysis-elifarley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Investigating Git history with raw commands is error-prone and hard to remember, making it difficult to track down when bugs were introduced, who owns code, or what changed before a release. This Skill teaches AI assistants to use Hug SCM's humane command layer to perform systematic repository investigations safely. ## Core Features & Use Cases - History Investigation: Search commit messages and code changes with literal or regex matching, run temporal queries like "3 days ago", and trace file origins with binary search. - Computational Analysis: Detect co-changing files, calculate recency-weighted code ownership, build commit dependency graphs, and analyze team activity patterns with JSON export. - Safe History Workflows: Review changes before committing, compare branches, and clean up commit history with auto-backups, dry-run previews, and force-with-lease pushes. - Use Case: When a user reports "login broke last week," the assistant searches recent commits touching auth files, inspects suspect diffs, identifies the introducing commit, and checks which branches contain the fix. ## Quick Start Ask the assistant to investigate when a specific bug was introduced in your repository using Hug SCM commands.

Frequently Asked Questions about Hug SCM Repository Analysis

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

FAQPage Schema
How do I find when a bug was introduced in Git?

Search commit messages with hug lf, search code changes with hug lc or regex via hug lcr, then narrow the timeline with temporal queries like hug h files -t "1 week ago". Inspect suspect commits with hug shp to view full diffs.

How do I find who wrote a specific line of code in Git?

Use hug fblame to see line-by-line authorship, hug fcon to list all contributors to a file, or hug analyze expert for recency-weighted ownership that identifies current maintainers rather than historical contributors.

What is the difference between hug lc and hug lcr?

hug lc performs fast literal string matching in code diffs using Git's pickaxe, while hug lcr uses regex patterns via Git's -G flag for complex pattern matching like function definitions or import statements.

Does Hug SCM support Mercurial repositories?

Yes, Hug SCM supports both Git and Mercurial with the same command set, so investigation workflows like status checks, log searches, and file history work identically across both version control systems.

Is it safe to rewrite Git history with Hug SCM?

Destructive HEAD operations like squash and rewind automatically create backup branches, and commands support --dry-run previews. Force pushing uses force-with-lease via hug bpushf to prevent overwriting others' work.

When should I use raw Git instead of Hug SCM?

Use raw Git for submodule operations, worktree management, advanced reflog queries, bisect operations, and filter-branch or filter-repo tasks, since Hug does not wrap these operations.