
hug-workflow
by elifarley
Humane Git wrapper / SCM CLI for safe, memorable commands + workflow automation, Git+Mercurial support, and repo analysis (churn/ownership/co-change). Includes an MCP server.
SKILL.md
name: hug-workflow description: | Git workflow management using Hug (enhanced Git replacement). Use for ALL Git operations. Triggers: commit, amend, staging, git status, git log, repo inspection, fixing commits. Use whenever Claude needs to: (1) Commit changes, (2) Inspect repo state, (3) Fix/amend commits, (4) Stage/unstage files, (5) View history or diffs. allowed-tools: Bash(hug:*)
Hug Workflow
Hug is a complete Git replacement with enhanced UX and safety features.
Hug accepts existing git commands as well.
CRUCIAL: When you want to run a git command, ALWAYS translate it to a hug equivalent instead.
Critical Safety Rules
Before EVERY commit, ALWAYS:
- Run
hug sla- See ALL uncommitted files (staged, unstaged, untracked) - Stage only intended files (see Staging Decision Tree below)
CRITICAL for hug cm (amend):
hug cm -m 'msg'adds ANY staged files to the commit- ALWAYS run
hug slsfirst to list staged files - Use
hug usato unstage everything if you want message-only amend
Handling multi-line commit messages
hug c -m "$(cat <<'EOF'
[1 or more lines of carefully formatted content]
EOF
)"
`
Staging Decision Tree
Start: hug sla
│
├─ Need to stage files?
│ ├─ Keep some unstaged? → hug a <file1> <file2> ... (selective)
│ └─ Stage ALL tracked? → hug a (no args, tracked files only)
│ └─ Stage untracked too? → hug a <file1> <file2> ... (explicit form)
│
├─ Verify: hug sls (list staged files only)
│
└─ Commit with `hug c -m`
RULE OF THUMB: If you didn't intentionally create/modify the file as part of your current task, DON'T stage it!
NEVER stage: Session artifacts like .claude/settings.local.json
Mapping: High-level intentions to Hug Commands
- To understand both which files were staged and what changes they contained so I can write an accurate commit message.
hug ss
Common Workflows
Commit Changes
hug sla # List S:*, U:*, untrcK files
hug a <files> # Stage specific files
hug sls # List S:* files
hug c -m 'message' # Commit
Inspect Repository State
hug sla # List staged, unstaged, untracked files
hug sls # List staged files only
hug sh # Last commit details, including list of files
hug llu # Outgoing commits (what would be pushed)
Search History
hug lf "term" -i --all # Search commit messages
hug lc "code" --all # Search code changes
hug ll # Log with file stats
Fix Last Commit
Change message ONLY:
hug sls # CRITICAL: Verify NO files are staged
hug cm -m 'new message' # Amends message only (keeps files intact)
Change message OR add files:
hug sla # Check which files to add
hug a <files> # Add files to stage
hug cm -m 'message' # Amends (message + staged files)
Remove files from commit:
hug back 1 # Go back, keeping changes staged
hug sls # List staged files
hug us <files> # Unstage unwanted files
hug c -m 'original message' # Re-commit
Key git -> hug Commands Mapping
ALWAYS use the Hug command that corresponds to the git command you're trying to run:
| Git | Hug | Description |
|---|---|---|
| git diff --cached | hug ss | Show staged changes then file stats |
| git diff --cached --stat --patch | hug ss | Show staged changes then file stats |
| git diff --stat --patch | hug su | Show unstaged changes then file stats |
| git diff HEAD --stat --patch | hug sw | Show all working directory changes then file stats |
Key Commands Reference
Status & Inspection:
hug sl- List staged (S:) and unstaged (U:) files, with statshug sls- List staged files onlyhug sla- List staged (S:), unstaged (U:) and untracked (untrcK) fileshug sh- Last commit with full message and diff statshug shp- Same ashug sh+ diffhug llu- Outgoing commitshug lol- Outgoing commits with file stats
Branch Operations:
hug b <branch>- Switch branchhug bc <name>- Create and switchhug bpush- Push current branchhug bpull- Pull (fast-forward only, safe)
Working Directory:
hug discard --force <file>- Discard unstaged changeshug discard-all --force- Discard all unstagedhug get <file> <commit>- Restore file from commit
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon


