durchnull/git/init
Claude Code and agent skill by durchnull/git
- community
Checking that the SKILL.md file is still in the repository.
Interview this repo and write .claude/git.json — the project-local config the /git:* commands read for the promotion chain, branch prefixes, quality gates, changelog format, and deploy notes. Idempotent; preserves values you already set.
Install
npx vskill@latest install durchnull/git/initSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as durchnull/git/init.
Git init — teach this project's branch flow to the git commands
/git:ship, /git:promote and /git:release are portable mechanics driven by facts about this repo: which branches form its promotion chain, what its quality gates are, where its changelog lives, and what merging each tier actually deploys. Those facts live in this repo — .claude/git.json — not in the plugin.
Everything is optional. The commands infer sensible values with no config file at all; this command exists to pin the ones inference gets wrong and to record what inference cannot guess. It writes config, not commands — nothing is generated into .claude/commands/.
Currently resolved (inference + any existing config):
!node "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-git-config.mjs"
No-questions command: infer, state the picks, write. --dry-run prints the file without writing.
1. Read what's already there
If .claude/git.json exists, Read it first. Every value already set is kept — this command is idempotent and safe to re-run after a plugin update. Without --force, only fill in keys that are absent; with --force, re-propose every key but still show the old value alongside the new.
The block above already shows what resolves today and whether each value came from the config or from inference — start from it rather than re-deriving.
2. Settle the promotion chain
tiers is the ordered chain, integration first, production last. It is the one key everything else hangs off, so get it right from evidence rather than assumption:
git branch -aandgit symbolic-ref refs/remotes/origin/HEAD— what exists, and what the
remote calls default.
- The project's own docs (
CLAUDE.md,CONTRIBUTING.md,README.md) if they describe a branch
flow, plus branch-protection rules and deploy triggers in .github/workflows/. A workflow that fires on push to a branch is strong evidence that branch is a deployed tier.
Shapes, and what each means for the commands:
- Three or more (
["dev","staging","main"]) — the full flow./git:shiptargets the
integration tier, /git:promote cuts integration → pre-production, /git:release cuts pre-production → production.
- Two (
["dev","main"]) — no pre-production tier./git:promotecorrectly reports that it
does not apply; /git:release cuts integration → production.
- One (
["main"]) — a solo-branch repo./git:shipstill branches and PRs;/git:release
tags. Perfectly valid.
Only list branches that exist. An aspirational tier the repo doesn't have is worse than no entry, because every command would route work through a branch nobody merges to.
Record where the flow is written down. When the chain came out of a doc — a branching section in CONTRIBUTING.md, a workflow paragraph in CLAUDE.md or the README — put the reference in `flowDocs` (["CONTRIBUTING.md#branching"]; file, plus a heading fragment when one section is the source). The commands cite it when explaining the chain, the resolver warns when the file disappears, and a later /git:init run compares the doc against the config to catch drift — a config that disagrees with the doc it was derived from is stale on one side or the other; say which. Leave it empty when no doc describes the flow — never invent a reference.
3. Settle the everyday-work keys
- `branchPrefixes` — infer from existing branch names when the repo shows a habit (
fix/vs
bugfix/, feat/ vs feature/); otherwise keep the defaults. These drive branch naming and branch-type classification, so a repo using an unusual prefix must say so here.
- `labels` — the PR label per branch type. Check
gh label listfor what the repo actually
has; the plugin creates a missing label rather than dropping it, but matching existing ones is better.
- `mergeMethod` —
merge,squash, orrebase. Read it off the repo's enabled merge methods
if you can; a project that disabled squash must not have it proposed.
- `tagFormat` —
v{version}unless existing tags say otherwise (git tag -l | head).
4. Describe the quality gates as layers
layers is what makes gate selection diff-scoped: each entry names a part of the tree and the commands that check it, and /git:ship runs only the layers a change actually touches.
Layers are never inferred — guessing a project's build and test commands would silently run the wrong thing — so this is the section worth the most care. Read package.json (workspaces, scripts), any pnpm-workspace.yaml / turbo.json / nx.json, and the CI workflow, which is the most honest statement of what must pass.
Each layer:
Two subtleties worth getting right:
- `forcesFullSuite` — paths whose effect a
--changedrun would miss because they reach the
tests from outside the import graph: schema migrations, a checked-in config example. Anything listed here also gets surfaced by /git:promote as a high-risk deploy path, so keep it accurate and keep it small.
- `requiresService` — when a suite needs a database or queue, this lets an unreachable service
skip that layer's tests with a note instead of failing the ship. The plugin probes host:port only and never reads or prints a credential.
lint is separate because it is usually repo-wide: { "run": "…", "fix": "…" }, where fix is run once on failure before re-checking. Leave it null if the project has no lint step.
5. Changelog and narrative
- `changelog` — path, the accumulator heading, and the category headings the project actually
uses. Read the existing file rather than imposing a vocabulary on it. Set changelog: null if the project has no changelog; the changelog steps are then skipped entirely.
- `deployNotes` — one free-text note per tier, echoed verbatim into PR bodies and reports.
This is where "merging this deploys X" belongs. Draft it from the deploy workflows. Keep it factual; it is the sentence a reviewer relies on before merging.
- `shipReminders` — free-text correctness checks shown before every commit (migration ordering,
a required doc shard). Leave empty unless the project has real ones; an invented reminder is worse than none, because the command echoes it every time.
6. Project-specific promotion steps (optional)
Some projects do real work as part of a promotion that no generic plugin can know about — generating an artifact, updating a manifest, posting an announcement. promoteSteps attaches those to /git:promote without forking it:
run omitted ⇒ an instruction-only step the model performs. optional: true ⇒ a failure is reported and the promotion continues. Leave both arrays empty unless the project genuinely has such steps. Related: codenames ({ "enabled": true, "scheme": "<the naming rule>" }) gives each promotion PR a distinguishing name — useful when otherwise-identical promotion PRs pile up.
7. Write it
Write .claude/git.json, creating .claude/ if needed. Stamp "configVersion": 1. Omit keys you have nothing to say about — an absent key means "infer it", which is a better default than a pinned guess. Preserve any unrecognized keys already in the file rather than dropping them.
With --dry-run, print the file and stop.
8. Report
The path written (clickable) and whether it was created or updated in place · each key with its value and where it came from (inferred / kept / newly proposed) · every key deliberately left absent, with the inferred value it falls back to · and, if tiers has fewer than three entries, one line noting that /git:promote does not apply to this project.
Close with the one genuinely leaky part of the setup: `allowed-tools` in a plugin command is static and cannot be templated per project, so every gate command you just configured (layers[].build/typecheck/test, lint.run/fix, and any promoteSteps[].run) must be allowlisted in this project's own .claude/settings.json — the plugin cannot grant permission for commands it doesn't know at build time. List the exact commands you configured so they can be pasted straight in.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/init/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/durchnull/git/init)