Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Git Flow Next

ASecurity

Work with repositories using the git-flow-next branching model (default branch is `develop`, production branch is `main`). Covers branch creation, worktree setup, atomic commits, PR targeting, validation on `develop`, and mandatory end-of-session promotion to `main`.

3 stars
0 votes
0 copies
3 views
Added 9/19/2026
ai-agentsgobashgit

Works with

cli

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add dryvist/claude-code-plugins --skill git-flow-next --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Flow Next?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Git Flow Next
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dryvist-git-flow-next/badge)](https://www.skillsdirectory.com/skills/dryvist-git-flow-next)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: git-flow-next
description: >-
  Work with repositories using the git-flow-next branching model (default branch is `develop`, production branch is `main`). Covers branch creation, worktree setup, atomic commits, PR targeting, validation on `develop`, and mandatory end-of-session promotion to `main`.
---

# git-flow-next Usage Guide

Use this skill when working on repositories configured for the Git Flow branching model.

## 1. Detect Adoption First

Before any branch, PR, or release work, check the repo's remote default branch:

```bash
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
```

- If default branch is `develop` -> Follow this skill.
- If default branch is `main` -> Use trunk flow (squash-to-main directly). Do NOT follow this skill.
- Never infer adoption from the current local branch name.

## 2. The Branching Model

| Branch | Role | Gets changes by |
| --- | --- | --- |
| `main` | Production. Protected; no direct pushes. | **Merge commits only** — squash and rebase are banned. |
| `develop` | Default integration branch. Protected; no direct pushes. | Squash-merged feature PRs (default); merge commits for back-merges. |
| `feature/<issue>-<sid8>-<slug>` | Topic work | Branched from fresh `develop`. |
| `release/<version>` | Release stabilization | Branched from `develop`; merge-committed to `main`; back-merged to `develop`. |
| `hotfix/<slug>` | Production fix | Branched from `main`; PR to `main` (merge commit); back-merged to `develop`. |

## 3. Dedicated Worktree Setup

All feature development happens in dedicated worktrees. Branch names carry the
session id: `<issue>-<sid8>-<slug>`, where `<sid8>` is the first 8 hex chars of
the session/conversation id (generate `openssl rand -hex 4` if the runtime has
none). Issueless work drops the issue segment: `<sid8>-<slug>`. The worktree
directory matches the branch's name segment. Unique-per-session names make
worktree/branch collisions between concurrent sessions structurally
impossible; refs dryvist/ai-assistant-instructions#749.

To prevent wrong nesting:

1. Resolve the destination path using an absolute anchor and create the branch directly in the worktree:

   ```bash
   name="123-03a3a401-fix-inventory-loader"
   git worktree add -b "feature/$name" \
     "$(dirname "$(git rev-parse --git-common-dir)")/.worktrees/$name" origin/develop
   ```

2. The primary/root checkout remains on `develop`. Never check out feature branches at the root.
3. **One session, one branch**: never commit to or push another session's
   branch. A takeover continues on a NEW branch (fresh `<sid8>`), never by
   reusing the prior session's name.

## 4. Working a Change

1. Navigate to the newly created worktree directory:

   ```bash
   cd "$(dirname "$(git rev-parse --git-common-dir)")/.worktrees/123-03a3a401-fix-inventory-loader"
   ```

   *Note*: The branch `feature/123-03a3a401-fix-inventory-loader` is already created and checked out by the worktree setup step.
2. Commit atomically following Conventional Commits, referencing the issue (`#123`).
3. Open the PR targeting `develop` — every change to `develop` goes through a
   PR; the ruleset rejects direct pushes (`GH013`). Squash-merge feature PRs
   with `gh pr merge <PR_NUMBER> --squash --auto`: a bare `--squash` is rejected with
   "the base branch policy prohibits the merge" while checks settle, and
   `--auto` merges as soon as the policy is satisfied.
4. **Validation**: Thoroughly test and validate the merged code on `develop` before production promotion.

## 5. Mandatory Promotion to Production

"Promotion is a step you take, not an event that happens."

Feature PRs squash into `develop` and stop there. To release them:

1. Before finishing a session, fetch the latest remote state and verify if `develop` has unpromoted commits:

   ```bash
   git fetch origin --force develop main && git log origin/main..origin/develop
   ```

2. If commits exist, run `/promote-release` to open/reuse a `develop` -> `main` PR and merge it using a **merge commit** (`--merge` flag on `gh pr merge`).
   Never squash or rebase into `main`.
3. Merging triggers `release-please` on `main`, which automatically cuts the release, version bump, and tag.
4. **Planning Reminder**: You must add "Merge develop into main" to your session checklist/to-do list at planning time.

## Related Skills

- **git-workflow-standards** (git-workflows) — Branch hygiene and worktree layout
- **pr-standards** (github-workflows) — PR templates and guards
- **promote-release** (github-workflows) — Promotion PR commands
- **wrap-up** (ai-cli-harness-better-practices) — End-of-session handler checking promotion state

Attribution

dryvistdryvist
View sourceSee grades on GitHubMore from dryvist →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →