Agent skill
git-workflow
Conventional commits, PR creation, and quality gate verification
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/coding-andreibesleaga-gabbe-5
SKILL.md
Git Workflow Skill
Goal
Create well-structured commits following Conventional Commits spec, pass all quality gates before pushing, and create a descriptive PR for human review.
Steps
-
Verify quality gates (all must pass before committing)
bash[test command] # All tests pass [typecheck command] # No type errors [lint command] # No lint errors [security_scan] # No new critical/high CVEs (on dependency changes)If any fail: fix them before continuing. Do NOT commit with failing gates.
-
Stage changes
bashgit status # Review what's changed git diff # Review the actual changes git add [specific files] # Never: git add -A (risk of including .env or build artifacts) -
Write a Conventional Commit message
Format:
<type>(<scope>): <subject>Type When to use featNew feature fixBug fix docsDocumentation only styleFormatting, no logic change refactorCode restructure, no behavior change testAdding or fixing tests choreBuild process, tooling, deps perfPerformance improvement secSecurity fix depsDependency updates Good examples:
feat(auth): add OAuth2 Google login with refresh tokens fix(api): resolve N+1 query in users list endpoint sec(deps): update lodash 4.17.20 -> 4.17.21 (CVE-2021-23337) test(domain): add unit tests for Order aggregate invariants refactor(application): extract CreateOrderUseCase from OrderControllerBad examples (avoid):
fix stuff # No scope, no description WIP # Work in progress should not be committed update code # No context temp # Never commit temporary code -
Create the commit
bashgit commit -m "feat(auth): add email verification flow - Add email_verified_at column to users table - Send verification email on registration - Add /auth/verify endpoint - Block login for unverified accounts Closes #42" -
Create a feature branch (if working on main without a branch)
bashgit checkout -b feat/[issue-number]-[brief-description] # Example: git checkout -b feat/42-email-verification -
Push and create PR
bashgit push origin [branch-name] # Create PR with gh CLI (preferred): gh pr create \ --title "feat(auth): add email verification flow" \ --body "$(cat <<'EOF' ## Summary - Add email verification requirement for new user accounts - Users must verify email before they can log in ## Changes - Database: adds `email_verified_at` column to users - API: adds `POST /auth/verify` endpoint - Auth: blocks unverified accounts from login ## Test Plan - [ ] Run unit tests: `[test command]` - [ ] Test registration flow end-to-end - [ ] Test that unverified users cannot log in - [ ] Verify verification email is sent ## Breaking Changes None — existing verified users are not affected. ## Security Notes Verification tokens expire after 24 hours. EOF )" -
Post-PR checklist
- Add reviewers if team is set up for it
- Link to the relevant task in project/tasks.md or issue tracker
- Update task status in project/tasks.md → DONE (or IN_REVIEW)
- Add entry to AUDIT_LOG.md
Branch Naming Conventions
feat/[issue]-[description] # New features
fix/[issue]-[description] # Bug fixes
refactor/[description] # Refactoring
chore/[description] # Tooling, deps
sec/[description] # Security fixes
docs/[description] # Documentation
Constraints
- NEVER push directly to main/master — always use feature branches
- NEVER commit without all quality gates passing
- NEVER include .env files, credentials, or build artifacts in commits
- PR title must be a valid Conventional Commit message
Output Format
Commit created + PR URL. Report: "Committed: [message]. PR: [URL]. All [N] quality gates passed."
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?