← スキル一覧に戻る

git-workflow
by vereis
Nix Configuration
⭐ 37🍴 7📅 2026年1月23日
SKILL.md
name: git-workflow description: "MANDATORY: Enforce branch/worktree workflow. Use when starting work, picking up work, creating branches, using git worktrees, or when asked to implement anything non-trivial. Ensures all work happens on correctly named branches, preferably in dedicated worktrees." allowed-tools:
- Bash(git status:*)
- Bash(git branch:*)
- Bash(git rev-parse:*)
- Bash(git worktree:*)
- Bash(git show:*)
- Bash(git log:*) user-invocable: true
Git workflow: branches + worktrees
Non-negotiables
- All work happens on a branch. Never commit on
master/main. - Branch names must follow the conventions below.
- Prefer using a git worktree per task so context stays clean and you don’t trample other work.
Branch naming (Conventional Commit aligned)
Without ticket
feat/<short-kebab>fix/<short-kebab>refactor/<short-kebab>chore/<short-kebab>docs/<short-kebab>
With ticket
feat/TICKET-123fix/TICKET-123refactor/TICKET-123
Optional (still keep it short):
feat/TICKET-123-short-kebabfix/TICKET-123-short-kebabrefactor/TICKET-123-short-kebab
Rules:
- Keep it minimal: no essays.
- Use lowercase + hyphens.
Worktree workflow
Detect whether we’re in a worktree
- Use
git rev-parse --is-inside-work-treeandgit rev-parse --is-bare-repository.
If we are asked to "pick up work" or start a new task
If we’re already in a git worktree, create a new dedicated worktree for the new task.
Preferred entrypoint:
- Use the
/worktree:newcommand (it creates the worktree in the correct place and handles existing branches).
Steps:
- Find the worktree root repo:
- Run
git rev-parse --git-common-dir. - If it ends with
/worktrees/<name>, you are inside a linked worktree. - The top-level directory is the parent of that common dir.
- Create a new worktree directory in the top-level repo Use:
# from the top-level repo directory
git worktree add <TICKET_OR_MIN_DESC> -b <branch-name>
<TICKET_OR_MIN_DESC>: directory name, minimal (e.g.VET-123orfix-nix-eval)<branch-name>: must follow the branch naming rules above
If the branch already exists:
git worktree add <TICKET_OR_MIN_DESC> <branch-name>
Safety checks before doing anything
- If on
master/main: stop and create a branch (or worktree) first. - If the branch name doesn’t follow conventions: rename it before continuing.
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です