common-git
Git commit messages, PR workflow, and branching strategy using Conventional Commits and Semantic Versioning. Use when creating commits, pull requests, or managing Git workflow.
- License 许可
- MIT
- 最近更新
- 2026-03-16
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- common-git
- description
- Git commit messages, PR workflow, and branching strategy using Conventional Commits and Semantic Versioning. Use when creating commits, pull requests, or managing Git workflow.
02 资源文件 1
- 参考文档reference.md1.8 KB
03 SKILL.md 正文
Git Conventions
This skill defines Git commit and PR conventions.
Commit Message Format
Use Conventional Commits format:
<type>(<scope>): <subject>
<body>
Types
- feat: New feature for the user
- fix: Bug fix for the user
- docs: Documentation changes
- style: Code formatting (no logic changes)
- refactor: Code refactoring (no behavior changes)
- test: Adding or updating tests
- chore: Build process, dependencies, tooling
- BREAKING CHANGE: Introduces breaking changes
Examples
feat(groups): add active coupon support
Implements the ability to assign a single active public coupon to a group.
This replaces the previous visibility-based approach.
Closes #123
fix(stripe): correct webhook signature validation
The webhook signature was not being validated correctly due to
incorrect header parsing. This fix ensures proper validation.
refactor(repository): separate read and write repositories
Implements CQRS pattern by splitting IBoehringerRepository into
separate read and write interfaces for better optimization.
Commit Guidelines
- Separate subject from body with a blank line
- Limit subject line to 50 characters
- Capitalize subject line
- No period at end of subject
- Use imperative mood ("add" not "added")
- Wrap body at 72 characters
- Explain what and why, not how
Pull Request Workflow
PR Title
Follow same convention as commits:
feat(groups): add collaborative group ownership
PR Description Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Changes Made
- Added X functionality
- Updated Y component
- Fixed Z issue
## Screenshots (if applicable)

## Checklist
- [ ] Code follows project conventions
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Build passes locally
- [ ] No breaking changes (or documented)
Merge Strategy
Use Squash and Merge to keep main branch clean:
- All commits in PR squashed into single commit
- Commit message follows conventional commits
- History remains linear and readable
Branching Strategy
Trunk-Based Development
- main - Production-ready code
- feature/ - Feature branches (short-lived)
- fix/ - Bug fix branches (short-lived)
Branch Naming
feature/add-group-coupons
fix/stripe-webhook-validation
refactor/split-repositories
docs/update-architecture-adr
Workflow
- Create branch from
main - Make small, frequent commits
- Push to remote frequently
- Open PR when ready
- Get approval from team member
- Squash and merge to
main - Delete feature branch
- Tag release if deploying
Tagging Releases
Use Semantic Versioning:
vMAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Examples tag
# Create tag
git tag -a v2.1.0 -m "Release v2.1.0 - Add group coupons feature"
# Push tag
git push origin v2.1.0
Summary
- Conventional Commits for all commits
- Squash and merge for PRs
- Trunk-based development on main
- Semantic versioning for releases
- Short-lived branches (delete after merge)
- Descriptive PR titles and descriptions
When working with Git:
- Use conventional commits format
- Write descriptive commit messages
- Create focused, small PRs
- Get code reviews before merging
- Squash and merge to main
- Delete branches after merge
- Tag releases with semantic versioning
04 同仓库更多 Skills
python-testing
Mandatory testing conventions including AAA pattern, test naming, assertions, and mocks. Use for unit, integration, or E2E tests with pytest, unittest, pytest-asyncio, or Playwright.
python-architecture
Module structure and architecture patterns for this Python RAG/LangGraph project. Use when adding new nodes to the LangGraph pipeline, extending the RAG retrieval layer, modifying the LLM client, or organizing new source modules under src/.
common-testing-conventions
Mandatory testing conventions including AAA pattern, test naming, and assertions for Python with pytest. Use when writing unit tests, integration tests, or verifying mock interactions for any module in this project.
common-security
Security guardrails covering OWASP Top 10 adapted to this Python/LangGraph/Streamlit project. Use when reviewing code for security, handling API keys and secrets, validating user inputs, guarding against prompt injection, or configuring Streamlit safely.
common-observability
Logging patterns for this Python/LangGraph/Streamlit project. Use when configuring structured logging, adding log statements to LangGraph nodes, debugging pipeline execution, or reviewing what should and should not be logged.