Skip to content
Skills Library
Programming · Automation

git-workflow

/git-workflow

Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push.

Repository
kisune ↗
Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push.

Original author description

Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push.

How it works

  1. Purpose
  2. Activation Triggers
  3. Core Capabilities
  4. Workflow Example: Preventing Dangerous Operations
  5. Integration Points
  6. Best Practices
Original SKILL.md headings · 157 lines, 847 words
SKILL.md preview
---
name: git-workflow
description: "Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push."
allowed-tools: Bash, Read
---

# Git Workflow Skill

## Purpose

Manage git operations with best practices, generating meaningful commit messages, managing branches safely, creating comprehensive pull requests, and preventing common git mistakes.

## Activation Triggers

Activate this skill when:
- User says "commit my changes"
- User mentions "create a branch"
- User asks to "create a PR" or "pull request"
- User says "push to remote"
- Before any destructive git operation
- User mentions git or version control

## Core Capabilities

### 1. Smart Commits

**Goal:** Generate meaningful, consistent commit messages that explain WHY changes were made

**Process:**

1. **Analyze Changes** — Run `git status` and `git diff`
2. **Understand Intent** — What was added/modified/removed? What problem does this solve?
3. **Generate Commit Message** using format: `[type]: [concise description in present tense]`

**Commit Types:**
- `feat` or `feature` - New feature
- `fix` - Bug fix
- `refactor` - Code restructuring without behavior change
- `test` - Adding or updating tests
- `docs` - Documentation changes
- `chore` - Maintenance tasks (deps, config, etc.)
- `style` - Code formatting (no logic change)
- `perf` - Performance improvements

**Message Guidelines:**
- Present tense, imperative mood ("Add" not "Added")
- Focus on WHAT and WHY, not HOW
- Under 72 characters for first line
- No period at the end

**Good examples:**
```
feat: Add RSI indicator to market analysis
fix: Handle division by zero in position sizing
refactor: Extract strategy validation into separate function
```

**Avoid:** Vague messages ("updated files"), past tense ("Added new stuff"), or non-descriptive ("WIP", "asdfgh").

4. **Show and Confirm** — Present proposed message, list of files, and ask for approval
5. **Execute and Verify** — Stage files, commit, verify with `git log -1 --oneline`

### 2. Branch Management

**Naming Convention:** `[type]/[description]`

| Type | Purpose | Example |
|------|---------|---------|
| `feature/` | New features | `feature/user-authentication` |
| `fix/` | Bug fixes | `fix/login-timeout-error` |
| `refactor/` | Code restructuring | `refactor/payment-processing` |
| `experiment/` | Experimental work | `experiment/ml-price-prediction` |
| `hotfix/` | Urgent production fixes | `hotfix/security-vulnerability` |

**Key Operations:**
- Create: `git switch -c feature/name`
- Switch: `git switch feature/name`
- List: `git branch -v` (or `-a` for remote)
- Delete (safe): `git branch -d feature/old`
- Delete remote: `git push origin --delete feature/old`

**Safety:** Before pushing to main/master, warn the user and recommend creating a feature branch with a PR instead.

### 3. Pull Request Creation

**Process:**

1. **Analyze all commits:** `git log main..HEAD --oneline` and `git diff main...HEAD`
2. **Review changes** — overall purpose, key changes, breaking changes, what could break
3. **Generate PR description** using this template:

```markdown
## Why
[The problem this solves, and for whom]

## What changed
- [Key change 1]
- [Key change 2]

## Scope
[What this deliberately leaves out or doesn't touch]

## Blast radius
[What else could break: callers, stored data, config, other services]

## Verification
- `[command that was run]` → [its result, e.g. 48 passed]

## Related issues
Closes #[issue number]
```

List under Verification only what was actually run in this session, with its output. Nothing goes there as a tick.

4. **Tighten the prose** with `dev-workflow:deslop` (Why, What changed, Scope and Blast radius only; Verification output and issue links stay as they are).
5. **Create PR:** Use `gh pr create --title "[Type]: Brief description" --body "..."`
6. **Return PR URL** with next steps (request reviewers, monitor CI, address feedback)

### 4. Safety Checks

**Pre-Commit:**

1. **No Secrets** — Scan staged changes for `api_key`, `secret`, `password`, `token`. If found, warn and recommend `.gitignore` or environment variables. Abort by default.
2. **Tests Pass** — Run test suite. Block commit if tests fail.
3. **Large Commit Warning** — If 10+ files changed, suggest breaking into smaller commits.

**Pre-Push:**

1. **Branch Check** — If on main/master, warn and recommend feature branch + PR workflow.
2. **Force Push Warning** — If `--force` detected, issue critical warning about history rewriting, lost work, and broken PRs. Require explicit confirmation.

**Pre-Merge:**

1. Check for conflicts: `git merge --no-commit --no-ff [branch]` then `git merge --abort`
2. Verify CI status: `gh pr checks`
3. Confirm approvals: `gh pr view --json reviews`

## Workflow Example: Preventing Dangerous Operations

**User:** "Push my changes to main"

**Response:**
- Detect current branch is `main`
- Warn about risks: no code review, potential production breakage, no CI gate
- Recommend: create feature branch, push there, create PR, get review
- Offer alternatives: (1) Create branch + PR, (2) Run tests then push, (3) Cancel

## Integration Points

- Works with `review` skill for pre-commit reviews
- Works with `spec-driven-implementation` skill for commit messages during execution
- Works with `systematic-debug` skill to verify tests before commit

## Best Practices

1. **Commit Often** — Small, frequent commits over large, infrequent ones
2. **One Concern Per Commit** — Each commit represents one logical change
3. **Review Before Push** — Always review your own changes first
4. **Use Branches** — Never work directly on main
5. **Create PRs** — Always use pull requests, even for solo projects
6. **Keep History Clean** — Meaningful commits, not "WIP" or "fix"

Versions

RepositoryScoreLicence
This page · xbklairith/kisune100MIT
event4u-app/agent-config100MIT
lee-w/maigo100MIT
hakula139/plugins100MIT
ericrisco/rsc-harness100MIT
Sanit-mann/The-Insectoids100MIT
eliyce/paqad-ai100MIT
langfuse/langfuse100MIT
Muvon/octomind-tap100Apache-2.0

Database snapshot: 13.11.2026 · package version 6f065b58c6fb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90git-safety
    Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
  • 100git-feature-branch-sync
    Rebase vs merge a feature branch; force-push safely. TRIGGER when: syncing a feature branch with the default branch or deciding whether and how to force-push. DO NOT TRIGGER when: routine work on a clean branch, operating on shared/default branches (never force-push them), or…
  • 90Git Workflow
    Trunk-based git workflow for NXTG-Forge — branching strategy, commit conventions, PR practices, rebase/conflict resolution, and how the plugin's own hooks guard git operations. Use when creating a feature branch, writing a commit message or PR, rebasing onto main, resolving…
  • 90rebase-pr
    Rebase a PR branch onto main. Handles merge commits, conflicts (auto-resolve when possible), linting, force push. Use when user says "rebase", "rebase PR", "rebase branch".
  • 90dev10x:git
    Use before running git push or git rebase — so force-pushes to protected branches are blocked and non-interactive rebases run unattended without manual editor approval prompts. TRIGGER when: running git push or git rebase operations. DO NOT TRIGGER when: other git operations…
  • 100git-practices
    Git conventions for branches, commits, and pull requests. Load this skill whenever creating branches, writing commit messages, or opening PRs. Trigger on any git workflow operation — commits, branches, pull requests, or merge operations.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.