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 Workflow Standards

ASecurity

Use when managing branches, resolving merge conflicts, syncing with the default branch, or working with worktrees. Covers both trunk repos (main) and git-flow repos (develop) — see gh-cli-patterns (github-workflows) for default-branch detection.

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

Works with

cli

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add dryvist/claude-code-plugins --skill git-workflow-standards --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Workflow Standards?

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

Security grade badge for Git Workflow Standards
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dryvist-git-workflow-standards/badge)](https://www.skillsdirectory.com/skills/dryvist-git-workflow-standards)

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-workflow-standards
description: >-
  Use when managing branches, resolving merge conflicts, syncing with the
  default branch, or working with worktrees. Covers both trunk repos (main)
  and git-flow repos (develop) — see gh-cli-patterns (github-workflows) for
  default-branch detection.
---

# Git Workflow Standards

Worktree setup and structure: see `superpowers:using-git-worktrees`. This
skill covers what comes after the worktree exists.

Every branch with commits MUST have an associated PR.
Orphaned branches must get a PR or be deleted.

**Stale branch** (worktree-paired, bare local, or remote-only — see
`prune-branches`, github-workflows, for the full procedure): a non-default
branch, checked out nowhere, unreferenced by any open PR (`--head` or
`--base`), with no uncommitted changes (when a worktree exists), and either
a merged PR whose `headRefOid` matches the branch tip, or zero commits ahead
of the default branch. Use `git worktree remove` (never `--force`) for
worktree-paired branches — Git blocks removal of dirty worktrees — and
`git push origin --delete` for a live remote ref, only after
`prune-branches`'s pre-push ancestry re-check.

## Branch Hygiene

- Sync the default branch daily: `git pull`
- Long-running branches: rebase from the default branch weekly
- Before PRs: ensure branch is on the latest default branch
- Never branch from feature branches — always from the default branch fresh
  (git-flow repos: `git flow feature start` branches from `develop`).
  The one exception is layering a PR stack, and only via `gh stack`; see
  `pr-stacks` (github-workflows).
- Commit messages: conventional-commit prefixes only, no emoji (see `pr-standards`)

### Git Flow Repositories

For repositories using the Git Flow model (where the default branch is `develop`):

1. **Target Branch**: All feature and bugfix branches must target and merge into `develop`.
2. **Validation**: Once changes are merged into `develop`, they must be thoroughly validated against production/tested on `develop`.
3. **End-of-Session Promotion**: At the end of every session, all changes on `develop` MUST be merged into `main` via `/promote-release`.
   This promotion is a **mandatory, non-optional step**.
4. **Planning Checklist**: You must explicitly add "Merge develop into main (promote release)" to your session to-do / plan checklist at the start of work.

| Method | When |
| --- | --- |
| `git merge origin/<default>` | Default — preserves history, safer |
| `git rebase origin/<default>` | Only if branch has NOT been pushed yet |

Sync workflow (replace `<default>` with the repo's actual default branch — see
`gh-cli-patterns`, github-workflows):

```bash
git pull origin <default>                                   # in the <default> worktree
git merge origin/<default> --no-edit                       # in the feature worktree
```

## Merge Conflict Resolution

**NEVER assume newer is correct.** Analyze both versions.

1. **Understand** — read full file, check `git log --oneline -10 -- <file>`
2. **Analyze** — identify what each side changed and why, check compatibility
3. **Resolve** — use the resolution table below
4. **Verify** — run `pre-commit run --files <file>`, read resolved file

| Scenario | Resolution |
| --- | --- |
| Additive changes | Keep both |
| Same logic modified | Combine intent of both |
| One is a bug fix | Always include the fix |
| One is a refactor | Apply refactor, then add other change |
| Truly incompatible | Prefer branch's changes, add comment |

Escalate to human review for complex business logic, fundamental
contradictions, or security-sensitive code.

| Command | Purpose |
| --- | --- |
| `git diff --name-only --diff-filter=U` | List conflicted files |
| `git log --merge -p <file>` | Show commits causing conflict |
| `git show :1:<file>` | Common ancestor version |
| `git show :2:<file>` | HEAD (your branch) version |
| `git show :3:<file>` | Incoming (their branch) version |
| `git merge --abort` | Abort and return to pre-merge state |

## Related Skills

- **sync-main** (git-workflows) — Syncs the repo's default branch and merges into current or all PR branches
- **refresh-repo** (github-workflows) — PR status and default-branch sync
- **prune-branches** (github-workflows) — Stale branch and worktree cleanup
- **pr-stacks** (github-workflows) — the sanctioned exception to "never branch from feature branches": layering a PR stack
- **gh-cli-patterns** (github-workflows) — Canonical default-branch detection (trunk vs git-flow)
- **pr-standards** (github-workflows) — PR creation guards, issue linking, and review standards
- **git-flow-next** (git-workflows) — Dedicated git-flow-next guide, worktree setup, and promotion steps

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', ...

698461 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 →