From mjlab
Agent behavior for git and GitHub in Miller-Jensen lab work — when to branch, what to commit, what to ignore, when to push back on big files, and how to handle the lab org `miller-jensen-lab`. TRIGGER when working in a git repository whose origin is under `miller-jensen-lab/*` OR a lab member's personal account doing lab-related work, when running `git`, `gh`, or any commit/branch/PR/repo-creation flow on lab code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mjlab:using-git-and-githubThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill teaches the *agent* how to behave when handling git and GitHub for lab work. The user is a bench scientist, not a developer. They are not going to type "commit," ask for a branch, or notice when they're about to push a 4 GB FCS file. The agent does.
This skill teaches the agent how to behave when handling git and GitHub for lab work. The user is a bench scientist, not a developer. They are not going to type "commit," ask for a branch, or notice when they're about to push a 4 GB FCS file. The agent does.
The lab's GitHub org is miller-jensen-lab. Default branch on every repo is main.
If the user has not authenticated gh, run:
gh auth login --hostname github.com --git-protocol https --web
This stores a token in the macOS Keychain (or system equivalent) and configures git to use gh as a credential helper. No SSH keys, no ~/.ssh/config. SSH only as a fallback if the user already has it set up and prefers it.
Don't push 2FA or signed-commits configuration. Membership in miller-jensen-lab is gated by the admin (Kyle Jensen); attribution and key management are not a concern.
Default: commit on main and push. PRs to yourself are theater.
Propose a branch only when:
git log --since=6.months --format='%an' | sort -u.When you do branch on a solo repo, merge with git merge --ff-only, push, delete the branch. Don't open a PR to yourself.
When the repo is multi-author: open a PR with gh pr create, and request review from the other recent committer (gh pr edit --add-reviewer <login>).
feat:/fix: Conventional Commits prefixes.Examples:
Add volcano plot to DE notebook
Rerun DESeq2 with corrected sample metadata
Drop wells D11–D12; contaminated per imaging
Drop a .gitignore like this on the first commit to any fresh lab repo:
# Data — fileserver or Zenodo, not git
data/raw/
data/derived/
*.h5ad
*.h5
*.fcs
*.fastq
*.fastq.gz
*.bam
*.bai
*.tiff
*.tif
*.czi
*.nd2
# Intermediate outputs
results/
figures/
# Notebook crud
.ipynb_checkpoints/
*.nbconvert.ipynb
# Python
.venv/
__pycache__/
*.pyc
.pytest_cache/
.ruff_cache/
# R
.Rhistory
.RData
.Rproj.user/
renv/library/
renv/local/
renv/staging/
# Env & secrets
.env
.env.local
# OS
.DS_Store
Thumbs.db
When manuscript figures need to be tracked, put them in an explicitly-tracked manuscript/figures/ (not results/ or figures/).
Before any commit, check sizes of staged files.
data/raw/ (gitignored) with a data.yml entry.The data.yml records what the file is and where it actually lives:
- name: counts.h5ad
sha256: e3b0c4...
size_bytes: 1234567890
location: /Volumes/MJ-lab/projects/2026-tnf-bursting/data/counts.h5ad
# or: zenodo: https://doi.org/10.5281/zenodo.XXXXXXX
description: TNF-α stimulated macrophage scRNA-seq, n=12k cells
Commit data.yml, not the data.
When git status shows untracked files, don't silently .gitignore or stage. Report what you see in one short block, propose a plan (track / ignore / refuse), and confirm with the user before acting.
Use judgment on ambiguous files. A 600-byte samples.csv is fine to track; a 4 GB experiment.fcs is not.
When the user starts new analysis work, ask once: lab org or personal account?
Then interview the user before proposing a name. Ask:
Propose 2–3 candidate names that follow these rules:
tnf-bursting, not TNF_bursting)gh repo list miller-jensen-lab six months latergh repo list miller-jensen-lab --limit 50 first)<firstauthor>etal-<topic> then)test, scratch, new-project, untitledCreate private by default:
gh repo create miller-jensen-lab/<name> --private --clone --description "<one sentence>"
Softly prompt to move a personal repo to miller-jensen-lab when any of:
/Volumes/MJ-lab/..., fileserver mounts).Accept "no" without nagging. Warn the user that transferring rewrites the URL and breaks any existing clones or bookmarks. Use:
gh repo transfer <repo> miller-jensen-lab
When the user says "we're submitting" or "this is going on bioRxiv," run through:
gh repo edit --visibility public.uv sync + commit uv.lock, or renv::snapshot() + commit renv.lock.git tag v1.0-preprint && git push --tags). Brief — tags aren't central.<firstauthor>etal-<topic> (e.g. bridgesetal-ccc). Don't enforce — URL changes break things.CITATION.cff so GitHub's "Cite this repository" works.gh issue list --state all --limit 1 to see if the repo uses issues. If yes, file proactively when blocked. If no, ask the user once whether they want to start; don't impose..env, credentials.json, *.pem, and string patterns AKIA[0-9A-Z]{16}, ghp_[A-Za-z0-9]{36}, sk-[A-Za-z0-9]{32,}. Refuse the commit if found. For repos that legitimately handle sensitive code, suggest installing gitleaks, detect-secrets, ripsecrets, or nosey-parker as a pre-commit hook.main or any branch that's been pushed. On a personal unpushed branch, OK with explicit user confirmation. Otherwise propose a revert commit.git fetch before starting work. If origin/main is ahead, surface it.git pull --rebase on personal branches; stop and ask on main.git status + git fetch and report anything unexpected (unpushed commits, divergent remote). Catches "I forgot to push from the other machine.".env, credentials, or obvious secrets staged/Users/..., ~/Dropbox/...) introduced in this commitmain of a multi-author repo, you have a PR (not a direct push)gitleaks, detect-secrets, ripsecrets, nosey-parkerCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub miller-jensen-lab/claude-code-marketplace --plugin mjlab