skills/git-conventions/SKILL.md
Git commit practices and conventions. Use when committing changes, writing commit messages, creating branches, or making PRs.
npx skillsauth add musserlab/lab-claude-skills git-conventionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# Check current branch and status
git status
git branch
# Pull latest changes if on a shared branch
git pull
Commit frequently — after completing each logical unit of work
Write descriptive commit messages — explain the "what" and "why"
Include the co-author line at the end of commit messages:
Co-Authored-By: Claude <[email protected]>
Check what will be committed before committing:
git status
git diff --staged
IMPORTANT: Use multiple -m flags for commit messages — do NOT use heredocs (<<'EOF').
Heredocs create multi-line Bash commands that don't match permission allowlist glob patterns (the * wildcard doesn't match newlines). Multiple -m flags keep the command on a single line.
Single-line message:
git commit -m "Title line here" -m "Co-Authored-By: Claude <[email protected]>"
Multi-line message (title + body + co-author):
git commit -m "Title line here" -m "Body paragraph explaining the why." -m "Co-Authored-By: Claude <[email protected]>"
Each -m flag adds a separate paragraph to the commit message (separated by a blank line in the git log).
.gitignore).env, credentials.json, etc.).claude/worktrees/)/done skill)"Command not found" for git tools → Git should be available system-wide; check PATH if issues arise
Merge conflicts → Alert the user and explain the conflict before attempting resolution
Git push fails with SSH permission denied
→ SSH keys aren't available in Claude Code's terminal environment
→ Switch remote to HTTPS: git remote set-url origin https://github.com/OWNER/REPO.git
→ The gh CLI provides HTTPS authentication automatically
development
Phylogenetic tree visualization and formatting with ggtree (R) or iTOL (web). Use when rendering a phylogenetic tree as a figure, choosing tree layout, coloring branches or labels by taxonomy, collapsing clades, displaying support values, or adding overlays to a tree. Do NOT load for tree inference (use protein-phylogeny skill) or domain annotation (future separate skill).
development
Configure and manage Claude Code security protections for sensitive files, credentials, and data. Use when the user invokes /security-setup to set up or modify protections against unauthorized file access, credential exposure, or sensitive data leaks.
development
Script organization for data science analysis projects with numbered scripts, data/outs/ directories, and reproducibility conventions. Use when creating new analysis scripts in projects that follow data science conventions (numbered XX_ prefix scripts, outs/ directories, BUILD_INFO.txt). Do NOT load for documentation projects (Quarto books), infrastructure repos, or projects without data/outs/ directory structure.
testing
R renv package management for data science projects. Use when working with renv (renv.lock, renv::restore, renv::snapshot) in R analysis projects. Do NOT load for projects that do not use R or renv.