AGENT SKILL
git-workflow
[AUTO-INVOKE] MUST be invoked BEFORE creating git commits, PRs, or code reviews. Covers Conventional Commits, PR templates, review requirements, and AI-assisted development rules. Trigger: any task involving git commit, git push, PR creation, or code review.
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
01 前言 Front Matter
- name
- git-workflow
- description
- [AUTO-INVOKE] MUST be invoked BEFORE creating git commits, PRs, or code reviews. Covers Conventional Commits, PR templates, review requirements, and AI-assisted development rules. Trigger: any task involving git commit, git push, PR creation, or code review.
02 资源文件 23
- 参考文档.mcp.json120 B
- 其他archives/honest.egg167 B
- 其他archives/honest.jar167 B
- 其他archives/honest.odp167 B
- 其他archives/honest.ods167 B
- 其他archives/honest.odt167 B
- 资产文件archives/honest.pptx167 B
- 其他archives/honest.tar.gz10.0 KB
- 其他archives/honest.tgz10.0 KB
- 其他archives/honest.whl167 B
- 其他archives/honest.xlam167 B
- 资产文件archives/honest.xlsx167 B
- 其他bin/run101 B
- 参考文档bom.md90 B
- 其他bundle.skill388 B
- 参考文档config.yaml200 B
- 参考文档package.json154 B
- 其他pyproject.toml200 B
- 资产文件report.docx238 B
- 脚本scripts/check.sh5.9 KB
- 脚本scripts/neighbours.js165 B
- 脚本scripts/neighbours.py549 B
- 脚本scripts/neighbours.sh1.9 KB
03 SKILL.md 正文
Git Collaboration Standards
Language Rule
- Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.
Commit Rules
Use Conventional Commits format: <type>: <short description>
| Type | When to use |
|---|---|
feat: |
New feature or contract |
fix: |
Bug fix |
refactor: |
Code restructure without behavior change |
test: |
Add or update tests |
docs: |
Documentation changes |
chore: |
Build config, dependency updates, toolchain |
security: |
Security fix or hardening |
Commit Workflow
- Run
git diffto review all changes before staging - Stage specific files — avoid
git add .to prevent committing.envor artifacts - Write concise commit message describing the why, not the what
- Never add
Co-Authored-Bylines — commit messages should only contain the description - Only commit — never
git pushunless explicitly requested - Never push directly to main/master — always use feature branches
Branch Naming
| Pattern | Example |
|---|---|
feat/<name> |
feat/staking-pool |
fix/<name> |
fix/reentrancy-guard |
refactor/<name> |
refactor/token-structure |
PR Requirements
Every PR must include:
| Section | Content |
|---|---|
| Change description | What was changed and why |
| Test results | forge test output (all pass) |
| Gas impact | forge test --gas-report diff for changed functions |
| Deployment impact | Does this affect deployed contracts? Migration needed? |
| Review focus | Specific areas that need careful review |
Code Review Rules
| Scenario | Requirement |
|---|---|
| Standard changes | Minimum 1 maintainer approval |
| Security-related changes | Minimum 2 maintainer approvals |
| AI-generated code | Must pass manual review + forge test before merge |
| Contract upgrades | Requires full team review + upgrade simulation on fork |
AI Assistance Rules
- AI-generated code must pass
forge testbefore committing - Always review AI output for: correct import paths, proper access control, gas implications
- Include relevant file paths and test cases in AI prompts for better results
- Run
forge fmtafter AI generates code to ensure consistent formatting