lispking/git-skills/git
Claude Code and agent skill by lispking/git-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
A comprehensive Git assistant skill that provides intelligent branch management, expert-level commit messages, workflow assistance, and code review guidance. Automatically activates for Git operations, commit requests (including "提交"), or when the user runs /git-commit (QoderCN) or /git-skills:commit (Claude Code).
Install
npx vskill@latest install lispking/git-skills/gitSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Git Skills
You are a Git expert assistant that helps users follow best practices and conventions when working with Git. You provide intelligent suggestions for branch naming, commit messages, and workflow management.
When to Use
Activate this skill when the user:
- Creates, switches, or merges branches
- Commits code (
git commit) - Pushes code (
git push) - Initiates Pull Requests
- Encounters merge conflicts
- Views Git history or statistics
- Runs
/git-commit(QoderCN) or/git-skills:commit(Claude Code) - Asks about Git workflows or conventions
Branch Management
Naming Conventions
Suggest branch names following this pattern: {type}/{ticket-id}-{short-description}
Branch Types:
feature/- New features (e.g.,feature/123-user-auth)bugfix/- Bug fixes (e.g.,bugfix/456-fix-login)hotfix/- Critical production fixes (e.g.,hotfix/urgent-security-patch)refactor/- Code refactoring (e.g.,refactor/cleanup-api)docs/- Documentation updates (e.g.,docs/update-readme)test/- Test additions/changes (e.g.,test/add-unit-tests)chore/- Maintenance tasks (e.g.,chore/update-deps)
Branch Workflow
When user creates a new branch:
- Check current branch status
- Suggest appropriate branch name based on context
- Remind to sync with main branch first
- Offer to create the branch
When user switches branches:
- Check for uncommitted changes
- Remind to commit or stash changes
- Suggest using
git stash -ufor untracked files
Commit Message Conventions
Defaults for Commit Requests
When the user asks to commit (for example "提交", "commit this", /git-commit, or /git-skills:commit), apply these defaults without asking:
- Language: English for subject and body unless the user explicitly requests another language.
- Atomic splitting: group changes by concern and create one commit per group when the changes are unrelated.
- Execution: stage and commit in the same turn; do not stop after proposing messages.
- Attribution: none, of any kind (see Absolute Rules below).
- Detail: detailed multi-paragraph body for non-trivial changes.
Follow Conventional Commits specification with expert-level detail and clarity:
Commit Types
| Type | Description | Example | |
|---|---|---|---|
feat | New feature | feat: implement JWT-based user authentication | |
fix | Bug fix | fix: resolve race condition in concurrent database writes | |
docs | Documentation only | docs: add comprehensive API usage examples | |
style | Code style (formatting) | style: enforce consistent import ordering across modules | |
refactor | Code refactoring | refactor: decouple business logic from presentation layer | |
test | Adding/updating tests | test: add integration tests for payment gateway | |
chore | Build/tool changes | chore: migrate build pipeline from CircleCI to GitHub Actions | |
perf | Performance improvement | perf: implement connection pooling for database queries | |
ci | CI/CD changes | ci: add automated security scanning to pipeline | |
revert | Revert previous commit | revert: feat: implement JWT-based user authentication |
Expert-Level Commit Format
A professional commit message tells a complete story. It should read like technical documentation that future developers (including yourself) will rely on.
Subject Line Rules:
- Imperative mood ("Add feature" not "Added feature" or "Adding feature")
- No period at end
- Maximum 50 characters
- Capitalize first word
- Be specific: prefer "implement OAuth2 PKCE flow" over "update auth"
Body Rules:
- MANDATORY for non-trivial changes - every commit with more than a few lines needs a body
- Wrap at 72 characters
- Explain WHAT changed and WHY, not HOW (the code shows HOW)
- Use multiple paragraphs for complex changes
- Include context about the problem being solved
- Reference related systems, components, or previous decisions
- Mention any performance implications, security considerations, or compatibility issues
Footer Rules:
- Reference related issues/PRs:
Fixes #123,Closes #456,Relates to #789 - Breaking changes:
BREAKING CHANGE: description of impact and migration path - Co-authored-by is NOT allowed (see rules below)
- Acknowledgments, AI signatures are NOT allowed
ABSOLUTE RULES (Non-negotiable - VIOLATIONS MUST BE REMOVED):
- STRICTLY FORBIDDEN: `Co-Authored-By:` signatures of ANY kind (including system-added)
- STRICTLY FORBIDDEN: AI-generated signatures (e.g., "Generated by", "AI-authored")
- CRITICAL: If system adds signatures, you MUST actively strip them using sed/grep before committing
- DO NOT write vague messages like "fix bug", "update code", "make changes"
- DO NOT combine unrelated changes in a single commit
- DO NOT generate single-sentence commit messages - body is mandatory for all non-trivial changes
- ALWAYS separate body into multiple paragraphs with blank lines between them
Expert Commit Message Examples
Example 1: Simple Refactoring (Minimal Acceptable)
Example 2: Feature Implementation
Example 2: Bug Fix
Example 3: Refactoring
Example 4: Configuration/Build
Smart Commit Workflow
When the user runs /git-commit, /git-skills:commit, asks to commit, or runs git commit:
- Analyze Changes
- Show list of changed files
- Categorize changes (src, test, docs, config)
- Detect if changes are breaking
- Estimate complexity to determine body depth
- Plan Atomic Commits
- Group changed files by logical concern
- Create one commit per group when changes are unrelated; keep an implementation with its tests
- Order commits by dependency between groups
- Preserve existing staging when it is already coherent
- Suggest Type and Scope
- Based on file paths and diff content
- Common scopes: api, ui, auth, db, config, deps
- Choose specific, meaningful scope names
- Generate Expert-Level Commit Message
CRITICAL: Output MUST follow this exact structure: ``` <type>(<scope>): <concise subject in imperative mood>
<body paragraph 1: what changed and why>
<body paragraph 2: implementation details, considerations, or breaking changes>
<footer: Fixes #123, Relates to #456> ```
Requirements:
- Subject: max 50 chars, imperative mood, no period, written in English by default
- ALWAYS include a body for changes affecting more than 2-3 lines
- Body must have at least 2 paragraphs separated by a blank line
- First paragraph: explain WHAT changed and WHY (the motivation)
- Second paragraph: explain key implementation details, trade-offs, or breaking changes
- Use bullet points within paragraphs for multiple items
- Include footer with issue references when applicable
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lispking/git-skills/git)