Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Designs team Git workflows for branching, PRs, and releases. Use when choosing branching models, stacked PRs, merge queues, worktree isolation for agents, or collaboration rules.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill to choose a team Git model, set merge and review policy, and define safe defaults for human and AI-assisted collaboration. It assumes the reader knows Git commands; it carries the decisions.
Default bias: GitHub Flow or trunk-based development, one merge method per repository, a merge queue once PRs routinely go stale before landing, one worktree per agent, and release branches only when version support requires them. Hosting-platform features (stacked PRs, merge-queue options, ruleset fields) and Git itself change several times a year: before recommending a version-gated Git feature, check the release notes on git-scm.com; before recommending a platform feature, check that platform's docs for availability on the user's plan.
| Need | Default | Reference |
|---|---|---|
| Pick a branching model | GitHub Flow; trunk-based plus merge queue at high merge concurrency | references/branching-strategies.md |
| Pick a merge method | squash for small-PR flows; merge commits for release branches | Merge Method, references/pr-best-practices.md |
| Keep main green under concurrency | merge queue or merge train | Merge Queue, references/automated-quality-gates.md |
| Land dependent changes fast | stacked PRs | references/stacked-diffs-guide.md |
| Run parallel agent or feature work | one worktree and branch per agent | references/ai-agent-worktrees.md |
| Release and hotfix | upstream-first fixes, tags from main | references/release-management.md |
| Commit messages and changelogs | owned by dev-git-commit-message | dev-git-commit-message, references/commit-conventions.md |
| Debug bad merges or regressions | conflict discipline, bisect | references/conflict-resolution.md, references/git-bisect-debugging.md |
Route elsewhere: review of a specific change set → software-code-review; CI/CD platform design beyond merge gates → ops-devops-platform; commit-message format, trailers, and changelog tooling → dev-git-commit-message.
| Situation | Default |
|---|---|
| one production line, frequent deploys | GitHub Flow |
| high merge concurrency, fast and stable CI, main must stay green | trunk-based plus merge queue |
| incomplete work must merge early | trunk-based plus feature flags |
| one supported version with scheduled releases | GitHub Flow or trunk-based with release tags |
| several supported versions or long stabilization | release branches cut from main (GitFlow only if a separate integration branch pays for itself) |
Trunk-based development needs CI that answers fast (roughly under 10 minutes) and a default branch that is rarely red (roughly under 5% of builds failing); treat both as heuristics to calibrate locally, not standards.
Headcount is a proxy for merge concurrency, not the real variable:
Pick one method per repository and enforce it in the ruleset's allowed merge methods. Mixed methods make git log, bisect, and revert behave differently from PR to PR.
| Method | Choose when | Costs |
|---|---|---|
| Squash | small PRs; commits inside a PR are not individually meaningful | one revertable unit per PR, but intermediate history is lost; the PR title becomes the commit subject, so enforce the convention on PR titles; squashing the base of a stack orphans the descendants' copies of its commits |
| Rebase-merge | authors curate commits and every commit builds and passes tests | linear and bisectable, but the landed SHAs differ from the SHAs CI and reviewers saw; check the host's docs on how rebase-merge treats commit signatures before combining it with required signed commits |
| Merge commit | release branches, back-merges, long-lived integration branches, or when the exact tested SHAs must be preserved | noisier history; use --first-parent in log and bisect |
Release-branch back-merges and forward-ports use merge commits or cherry-pick -x regardless of the repository's PR method.
Adopt a merge queue (GitHub) or merge train (GitLab) when PRs regularly need more than one "update branch" cycle before landing, or when main breaks from semantic conflicts between individually green PRs. Below that, "require branch up to date" plus auto-merge is simpler.
merge_group on GitHub Actions; the queue's temporary branches on third-party CI). A required workflow with path filters that never runs for a queue entry blocks the queue.main, release branches, and release tags. Keep the bypass list short, named, and audited; an emergency bypass still gets post-merge CI and review.cherry-pick -x it to each supported release branch. A fix applied only to a release branch returns as a regression in the next release.Before checkout, merge, rebase, amend, reset, or push:
git status --porcelain. Decide explicitly: commit, move the work to its own worktree, or stop. Never git stash in a tree other agents share: it sweeps every agent's uncommitted changes, and refs/stash is shared by all worktrees..git/index.lock exists, confirm no Git process is running before removing it.cwd: use git -C <path> for mutations, and verify the target with git -C <path> rev-parse --show-toplevel and branch --show-current first. If a mutation hits the wrong repo or branch, stop and inspect before any recovery.Risk depends on who else depends on the ref, not on the command:
--force-with-lease) dismisses approvals in most configurations, and re-review often costs more than the cleanup was worth. Check review state (gh pr view --json reviews,reviewDecision); if approvals exist, add a commit instead of rewriting. Give reviewers git range-diff output when a rewrite is unavoidable.main, develop, release branches, release tags, or any branch other people or agents build on.git filter-repo (Git's own docs deprecate filter-branch). Clones, forks, and host-side PR refs keep the old objects, so rotation is never optional.--force-with-lease against the remote tip the agent recorded, and treat a lease rejection as a stop condition: fetch, inspect, involve a human. Never retry with bare --force.The handoff for an authorized rewrite records the old tip, new tip, branch, affected dependent branches or PRs, and the command collaborators run to realign.
git log --author and blame; a Co-authored-by: or Assisted-by: trailer does not. Whether to add an AI trailer, and which one, follows the repo's policy and dev-git-commit-message. Never commit under a human identity without that person's knowledge.Rule: rules/common/git.md loads this invariant in every coding session.
When a user wants this loop in a real repo, standardize it in repo-local scripts (start <slug>, gate, pr, finish <slug>), record the exact commands and the review/merge policy in AGENTS.md, and use one shared slug and one PR per repo for multi-repo features, merging the contract-owning repo first. Full contract, multi-repo session command, env-override pattern, and validation steps: references/ai-agent-worktrees.md.
dev/staging/prod) that drift instead of promoting one build artifact.--update-refs, range-diff, recoveryRelated skills: software-code-review, qa-debugging, ops-devops-platform, qa-testing-strategy, docs-codebase, dev-git-commit-message, ai-coding-agents.
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。