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

ASecurity

Git recipes, worktree management, push sequences, branch verification, and conflict resolution patterns.

5 stars
0 votes
0 copies
0 views
Added 10/4/2026
ai-agentsshellbashgit

Security Analysis

A100/100

Scanned 10/4/2026

$npx -y skills add juan294/cc-rpi --skill git-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Workflow?

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

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

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"
description: "Git recipes, worktree management, push sequences, branch verification, and conflict resolution patterns."
---

# Git Workflow

## Push Sequence

Keep working branches and worktrees local. Finish applicable tests, coverage,
typechecks, lint, build and deployment preflight locally, resolve failures,
and integrate completed work locally into the documented integration branch.
Inspect workflow and deployment triggers before the single authorized push of
that completed branch. Never create Vercel Preview deployments or publish
working branches/PRs for experimentation. If an integration push would create a
Preview, stop before pushing and use only a documented, non-destructive bypass.
Production publication remains separately and explicitly authorized. Read-only
inspection of existing runs and deployments is allowed.

Commit intended files locally before pulling. Fetch and inspect the remote
integration tip before final local integration; if it moved, reconcile locally
and repeat the applicable gates. Do not rebase through uncommitted work.

```bash
git branch --show-current
git add <files> && git commit -m "msg"
git fetch origin
# Inspect origin/<integration-branch>; integrate and verify locally.
# Only after trigger inspection and authorization:
git push origin <integration-branch>
```

## Empty Repositories

Wrong -- `git log` and `git diff HEAD` fail on a repo with no commits yet:

```bash
git log -1
git diff HEAD
```

Right -- check for a HEAD first:

```bash
git rev-parse HEAD 2>&1 || echo "no commits yet -- skip log/diff HEAD"
```

## First Publication

Working branches have no remote upstream because they remain local. Do not
create feature, temporary, or remediation PRs. The orchestrator integrates
completed work locally and publishes only the documented integration branch
once, subject to the remote-budget and production authorization boundaries.

## Push with Tag

Wrong -- pushes ALL local tags, fails if any old tag exists on remote:

```bash
git push --tags
```

Right -- after release authorization, push only the named release tag:

```bash
git push origin main
# Observe required main CI passing for the exact pushed SHA before the tag:
git push origin v1.0.0
```

## Branch Verification

Wrong -- assume branch from conversation context:

```bash
git commit -m "feat: add feature"
```

Right -- verify branch before every commit:

```bash
git branch --show-current && git commit -m "feat: add feature"
```

## Worktree Management

Use absolute worktree paths or the tool's explicit per-call working directory.
Do not infer cwd or branch from an earlier shell call. Before cleanup, establish that this task owns the
worktree and branch, all source changes are integrated, and plans, handoffs,
ignored evidence and untracked files are preserved outside the disposable tree.
A clean `git status` alone cannot prove ignored artifacts are preserved.

```bash
git worktree list --porcelain
git -C /absolute/path/to/worktree status --short --untracked-files=all
git -C /absolute/path/to/worktree ls-files --others --ignored --exclude-standard
git merge-base --is-ancestor <working-branch> <integration-branch>
# Proceed only after ownership, preservation and integration are confirmed.
git worktree remove /absolute/path/to/worktree && git branch -d <working-branch>
```

If removal or `-d` refuses, retain the worktree/branch and investigate. A squash
merge does not preserve ancestry; record equivalent integrated content and
preserve the original branch instead of defaulting to force deletion. Never
remove a foreign worktree or delete every branch returned by a listing.

## Cleanup After Merge

Remove only the verified task-owned worktree using the procedure above. Report
retained artifacts and branches with their reasons. Other active worktrees and
unmerged branches are expected to survive. No remote branch cleanup is needed
for branches that were never published.

## Conflict Resolution

Wrong -- plain checkout fails on unmerged files:

```bash
git checkout -- conflicted-file.ts
```

Right -- inspect `git status` and the conflicting contents first. Resolve the intended combination; preserve untracked collisions outside the worktree before retrying. Never delete unknown files:

```bash
git checkout --ours file.ts    # keep yours
git checkout --theirs file.ts  # keep incoming
git rebase --abort             # cancel entirely
# Preserve the untracked collision at a verified unique recovery path first.
```

Attribution

juan294juan294
View sourceSee grades on GitHubMore from juan294 →
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 →