From necturalabs
Use when making git commits, creating branches, or starting any implementation work that will require more than one commit. Ensures Conventional Commits format, atomic commits (one logical unit per commit), and git worktree isolation for multi-commit work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/necturalabs:git-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Enforces three practices: **Conventional Commits** for every commit message, **atomic commits** that separate changes into logical/contextual units, and **git worktree isolation** for any work requiring more than one commit.
Enforces three practices: Conventional Commits for every commit message, atomic commits that separate changes into logical/contextual units, and git worktree isolation for any work requiring more than one commit.
Do NOT commit without a completed review. No exceptions — not for "small changes", not for "just docs", not for "I already looked at it manually."
Every commit should be a single logical unit of change. Separate unrelated changes into distinct commits, even within the same work session.
Is this change related to the same logical concern?
YES → Same commit
NO → Separate commit
Does this commit do exactly ONE thing?
YES → Good
NO → Split it
Could someone revert this commit without losing unrelated work?
YES → Good
NO → Split it
| Bad Practice | Why | Fix |
|---|---|---|
| "Fix bug and add feature" | Two concerns in one commit | Two separate commits |
| "Update 12 files" | No indication of what changed or why | Split by logical concern |
| "WIP" or "checkpoint" | Incomplete work pollutes history | Finish the unit, then commit |
| Mixing formatting with logic | Impossible to review logic changes | Formatting commit first, then logic |
| Committing generated + source together | Generated files obscure real changes | Source commit, then regenerate |
<type>(<optional-scope>): <description>
[optional body]
[optional footer(s)]
| Type | When to use |
|---|---|
feat | New feature or functionality |
fix | Bug fix |
docs | Documentation only |
style | Formatting, whitespace (no logic change) |
refactor | Code restructuring (no bug fix, no new feature) |
perf | Performance improvement |
test | Adding or fixing tests |
build | Build system or dependency changes |
ci | CI/CD configuration |
chore | Routine maintenance |
Closes #123, Fixes #456BREAKING CHANGE: <description> or ! after type (feat!:)feat(auth): add OAuth2 login flow
Implement OAuth2 authorization code flow with PKCE. Replaces the
legacy session-based auth which doesn't meet compliance requirements
for token storage.
Closes #142
fix: prevent race condition in request handler
Introduce a request ID and reference to the latest request. Dismiss
incoming responses other than from the latest request.
Previously, rapid sequential requests returned stale data because
responses were processed in arrival order.
refactor: extract validation into shared module
docs: update API authentication guide
| Bad message | Why it's wrong |
|---|---|
fix stuff | No type prefix, vague |
feat: Updated the login page. | Past tense, period, capitalized after prefix |
WIP | Never commit work-in-progress |
misc changes | Meaningless |
feat: changes | No description of what changed |
digraph worktree_decision {
"Starting new work" [shape=doublecircle];
"Needs >1 commit?" [shape=diamond];
"Create worktree + branch" [shape=box];
"Commit directly on current branch" [shape=box];
"Do the work" [shape=box];
"Merge, remove worktree, delete branch" [shape=box];
"Starting new work" -> "Needs >1 commit?";
"Needs >1 commit?" -> "Create worktree + branch" [label="yes"];
"Needs >1 commit?" -> "Commit directly on current branch" [label="no"];
"Create worktree + branch" -> "Do the work";
"Do the work" -> "Merge, remove worktree, delete branch";
}
Skip worktrees for: single-commit changes (typo fixes, one-line config tweaks).
# From your main worktree — use <project>-<description> for the path:
git worktree add ../<project>-<description> -b feature/short-description
# Examples:
git worktree add ../myapp-user-auth -b feature/user-authentication
git worktree add ../myapp-fix-cart -b bugfix/cart-total-rounding
Git worktrees share the main repo's .git directory (the worktree has a .git file pointing back, not its own .git folder). This means the LFS object cache at .git/lfs/objects/ is already shared — objects downloaded in the main repo are available to every worktree.
# In the worktree, populate LFS files from the shared local cache:
cd <worktree> && git lfs checkout
# Do NOT use `git lfs pull` — it contacts the remote and re-downloads
# objects that are already in the shared cache.
git lfs checkout (local-only) — reads from the shared .git/lfs/objects/ cachegit lfs pull in a worktree when the main repo already has the objects — it wastes bandwidth re-fetching what's already cached locallygit lfs pull if objects are genuinely missing from the local cacheFormat: <type>/<lowercase-hyphenated-description>
| Prefix | Purpose | Example |
|---|---|---|
feature/ | New functionality | feature/user-authentication |
bugfix/ | Non-urgent bug fix (longer form distinguishes from hotfix/) | bugfix/cart-total-rounding |
hotfix/ | Urgent production fix | hotfix/payment-null-pointer |
refactor/ | Code improvement | refactor/extract-auth-service |
docs/ | Documentation | docs/api-reference |
test/ | Test additions | test/payment-edge-cases |
chore/ | Maintenance | chore/upgrade-dependencies |
Rules:
feature/user-auth not feature/stufffeature/PROJ-123-user-auth# After branch is merged:
git worktree remove ../worktree-path
git branch -d feature/branch-name
# NEVER use rm -rf on worktrees -- leaves stale metadata
# If you did, fix with:
git worktree prune
| Action | Command |
|---|---|
| Create worktree | git worktree add <path> -b <branch> |
| List worktrees | git worktree list |
| Remove worktree | git worktree remove <path> |
| Clean stale data | git worktree prune |
| Delete branch | git branch -d <branch> |
After every git push, if gh CLI is available:
gh run list --limit 1 to check if the push triggered a CI rungh run watch <run-id> to monitor it to completionNever push and walk away without confirming CI status.
npx claudepluginhub necturalabs/agentskills --plugin necturalabsGuides git workflows emphasizing trunk-based development, atomic commits, descriptive messages, and short-lived branches. Use for code changes, committing, branching, conflicts, and parallel streams.
Applies Conventional Commits v1.0.0 standards for Git branch naming, worktree organization under .claude/worktrees/, and commit messages in GitHub/GitLab projects. Supports consistent history, SemVer releases, and changelog automation.