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 discipline — commits, branches, merges, rebases, resolving conflicts, cleaning history, undoing mistakes safely. Use for "закоммить", "смерджи", conflict resolution, "как откатить", and any git operation beyond a trivial status check.

2 stars
0 votes
0 copies
0 views
Added 10/3/2026
ai-agentsgogit

Security Analysis

A100/100

Scanned 10/3/2026

$npx -y skills add ivanvp91/TRCode --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/ivanvp91-git-workflow/badge)](https://www.skillsdirectory.com/skills/ivanvp91-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 discipline — commits, branches, merges, rebases, resolving conflicts, cleaning history, undoing mistakes safely. Use for "закоммить", "смерджи", conflict resolution, "как откатить", and any git operation beyond a trivial status check.
description_ru: Работа с git — коммиты, ветки, слияния, ребейзы, разрешение конфликтов, чистка истории, безопасная отмена ошибок. Для «закоммить», «смерджи», конфликтов, «как откатить» и любых git-операций сложнее простого статуса.
triggers: git, коммит, commit, закоммить, ветка, ветку, branch, merge, мердж, слияние, rebase, ребейз, конфликт слияния, merge conflict, push, запушь, откатить, revert, reset, cherry-pick, stash, gitignore, история коммитов, git log, амменд, amend
---

# Git workflow

## 1. Look before any operation
`git status` + `git log --oneline -10` before acting — know the branch, what's staged, what's untracked, and whether the working tree is clean. Never operate on assumptions about state; half of git disasters start with "I thought I was on another branch".

## 2. Commits
- One logical change per commit; unrelated fixes go in separate commits even when found together. Stage selectively (`git add -p` / by file), don't blanket `git add .` when the tree has strays.
- Message: an imperative summary line ≤ 72 chars that says WHY-or-WHAT at the change level ("Fix stale cache on model switch"), not a file list; body only when the summary can't carry the reason. Match the язык и стиль существующей истории репозитория.
- Never commit: secrets, build artifacts, editor junk — check what's staged; fix `.gitignore` when strays keep appearing.
- Amend only unpushed commits; after a push, a new commit or revert — history that left the machine belongs to others too.

## 3. Branches and merging
- Feature work on a branch off the default; branch names say the thing (`fix-login-retry`, not `patch2`).
- Sync with the default branch by the repo's convention (look at history: merge-commits or linear rebase flow) — don't impose a different style.
- Rebase only local/unshared branches; never rebase shared history without the user explicitly deciding to force-push, and then `--force-with-lease`, never bare `--force`.

## 4. Conflicts
Resolve by understanding both sides, not by picking one blindly: read what each branch was trying to do; the resolution often takes both. After resolving — build/tests before concluding the merge. Never silently drop the other side's change; if both changed the same logic differently, that's a question for the user, not a coin flip.

## 5. Undo safely — the ladder
From least to most destructive; use the lowest rung that works:
1. Uncommitted mess → `git stash` (recoverable) beats `checkout --` (gone).
2. Bad last commit, unpushed → `commit --amend` or `reset --soft HEAD~1`.
3. Bad commit, pushed → `git revert` (new inverse commit) — history stays true.
4. Lost work → `git reflog` finds almost everything for ~90 days; check it before declaring loss.
Destructive commands (`reset --hard`, `clean -f`, force-push) — only with the user's explicit go-ahead, after saying what exactly will be lost.

## What not to do
- No `git add . && git commit -m "fixes"` batches burying five changes in one blob.
- No force-push to shared branches; no rewriting pushed history without explicit agreement.
- No committing on the user's behalf when they didn't ask — finish the code, offer the commit.
- No resolving a conflict by discarding a side without reading it.
- Don't touch `git config`, hooks, or credentials without being asked.

## Answer format
For operations: the commands run and the resulting state (`status`/`log` proof). For commits: the message used. For conflicts: which sides said what and how the resolution combines them. For undo: what was recovered and what (if anything) is unrecoverable.

Attribution

ivanvp91ivanvp91
View sourceSee grades on GitHubMore from ivanvp91 →
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', ...

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