Orchestrate a comprehensive git workflow from code review through PR creation, leveraging specialized agents for quality assurance, testing, and deployment readiness. This workflow implements modern g
Add this skill
npx mdskills install sickn33/git-pr-workflows-git-workflowOrchestrates multi-agent git workflow with quality checks, testing, and PR creation through detailed phases
1---2name: git-pr-workflows-git-workflow3description: "Orchestrate a comprehensive git workflow from code review through PR creation, leveraging specialized agents for quality assurance, testing, and deployment readiness. This workflow implements modern g"4---56# Complete Git Workflow with Multi-Agent Orchestration78Orchestrate a comprehensive git workflow from code review through PR creation, leveraging specialized agents for quality assurance, testing, and deployment readiness. This workflow implements modern git best practices including Conventional Commits, automated testing, and structured PR creation.910[Extended thinking: This workflow coordinates multiple specialized agents to ensure code quality before commits are made. The code-reviewer agent performs initial quality checks, test-automator ensures all tests pass, and deployment-engineer verifies production readiness. By orchestrating these agents sequentially with context passing, we prevent broken code from entering the repository while maintaining high velocity. The workflow supports both trunk-based and feature-branch strategies with configurable options for different team needs.]1112## Use this skill when1314- Working on complete git workflow with multi-agent orchestration tasks or workflows15- Needing guidance, best practices, or checklists for complete git workflow with multi-agent orchestration1617## Do not use this skill when1819- The task is unrelated to complete git workflow with multi-agent orchestration20- You need a different domain or tool outside this scope2122## Instructions2324- Clarify goals, constraints, and required inputs.25- Apply relevant best practices and validate outcomes.26- Provide actionable steps and verification.27- If detailed examples are required, open `resources/implementation-playbook.md`.2829## Configuration3031**Target branch**: $ARGUMENTS (defaults to 'main' if not specified)3233**Supported flags**:34- `--skip-tests`: Skip automated test execution (use with caution)35- `--draft-pr`: Create PR as draft for work-in-progress36- `--no-push`: Perform all checks but don't push to remote37- `--squash`: Squash commits before pushing38- `--conventional`: Enforce Conventional Commits format strictly39- `--trunk-based`: Use trunk-based development workflow40- `--feature-branch`: Use feature branch workflow (default)4142## Phase 1: Pre-Commit Review and Analysis4344### 1. Code Quality Assessment45- Use Task tool with subagent_type="code-reviewer"46- Prompt: "Review all uncommitted changes for code quality issues. Check for: 1) Code style violations, 2) Security vulnerabilities, 3) Performance concerns, 4) Missing error handling, 5) Incomplete implementations. Generate a detailed report with severity levels (critical/high/medium/low) and provide specific line-by-line feedback. Output format: JSON with {issues: [], summary: {critical: 0, high: 0, medium: 0, low: 0}, recommendations: []}"47- Expected output: Structured code review report for next phase4849### 2. Dependency and Breaking Change Analysis50- Use Task tool with subagent_type="code-reviewer"51- Prompt: "Analyze the changes for: 1) New dependencies or version changes, 2) Breaking API changes, 3) Database schema modifications, 4) Configuration changes, 5) Backward compatibility issues. Context from previous review: [insert issues summary]. Identify any changes that require migration scripts or documentation updates."52- Context from previous: Code quality issues that might indicate breaking changes53- Expected output: Breaking change assessment and migration requirements5455## Phase 2: Testing and Validation5657### 1. Test Execution and Coverage58- Use Task tool with subagent_type="unit-testing::test-automator"59- Prompt: "Execute all test suites for the modified code. Run: 1) Unit tests, 2) Integration tests, 3) End-to-end tests if applicable. Generate coverage report and identify any untested code paths. Based on review issues: [insert critical/high issues], ensure tests cover the problem areas. Provide test results in format: {passed: [], failed: [], skipped: [], coverage: {statements: %, branches: %, functions: %, lines: %}, untested_critical_paths: []}"60- Context from previous: Critical code review issues that need test coverage61- Expected output: Complete test results and coverage metrics6263### 2. Test Recommendations and Gap Analysis64- Use Task tool with subagent_type="unit-testing::test-automator"65- Prompt: "Based on test results [insert summary] and code changes, identify: 1) Missing test scenarios, 2) Edge cases not covered, 3) Integration points needing verification, 4) Performance benchmarks needed. Generate test implementation recommendations prioritized by risk. Consider the breaking changes identified: [insert breaking changes]."66- Context from previous: Test results, breaking changes, untested paths67- Expected output: Prioritized list of additional tests needed6869## Phase 3: Commit Message Generation7071### 1. Change Analysis and Categorization72- Use Task tool with subagent_type="code-reviewer"73- Prompt: "Analyze all changes and categorize them according to Conventional Commits specification. Identify the primary change type (feat/fix/docs/style/refactor/perf/test/build/ci/chore/revert) and scope. For changes: [insert file list and summary], determine if this should be a single commit or multiple atomic commits. Consider test results: [insert test summary]."74- Context from previous: Test results, code review summary75- Expected output: Commit structure recommendation7677### 2. Conventional Commit Message Creation78- Use Task tool with subagent_type="llm-application-dev::prompt-engineer"79- Prompt: "Create Conventional Commits format message(s) based on categorization: [insert categorization]. Format: <type>(<scope>): <subject> with blank line then <body> explaining what and why (not how), then <footer> with BREAKING CHANGE: if applicable. Include: 1) Clear subject line (50 chars max), 2) Detailed body explaining rationale, 3) References to issues/tickets, 4) Co-authors if applicable. Consider the impact: [insert breaking changes if any]."80- Context from previous: Change categorization, breaking changes81- Expected output: Properly formatted commit message(s)8283## Phase 4: Branch Strategy and Push Preparation8485### 1. Branch Management86- Use Task tool with subagent_type="cicd-automation::deployment-engineer"87- Prompt: "Based on workflow type [--trunk-based or --feature-branch], prepare branch strategy. For feature branch: ensure branch name follows pattern (feature|bugfix|hotfix)/<ticket>-<description>. For trunk-based: prepare for direct main push with feature flag strategy if needed. Current branch: [insert branch], target: [insert target branch]. Verify no conflicts with target branch."88- Expected output: Branch preparation commands and conflict status8990### 2. Pre-Push Validation91- Use Task tool with subagent_type="cicd-automation::deployment-engineer"92- Prompt: "Perform final pre-push checks: 1) Verify all CI checks will pass, 2) Confirm no sensitive data in commits, 3) Validate commit signatures if required, 4) Check branch protection rules, 5) Ensure all review comments addressed. Test summary: [insert test results]. Review status: [insert review summary]."93- Context from previous: All previous validation results94- Expected output: Push readiness confirmation or blocking issues9596## Phase 5: Pull Request Creation9798### 1. PR Description Generation99- Use Task tool with subagent_type="documentation-generation::docs-architect"100- Prompt: "Create comprehensive PR description including: 1) Summary of changes (what and why), 2) Type of change checklist, 3) Testing performed summary from [insert test results], 4) Screenshots/recordings if UI changes, 5) Deployment notes from [insert deployment considerations], 6) Related issues/tickets, 7) Breaking changes section if applicable: [insert breaking changes], 8) Reviewer checklist. Format as GitHub-flavored Markdown."101- Context from previous: All validation results, test outcomes, breaking changes102- Expected output: Complete PR description in Markdown103104### 2. PR Metadata and Automation Setup105- Use Task tool with subagent_type="cicd-automation::deployment-engineer"106- Prompt: "Configure PR metadata: 1) Assign appropriate reviewers based on CODEOWNERS, 2) Add labels (type, priority, component), 3) Link related issues, 4) Set milestone if applicable, 5) Configure merge strategy (squash/merge/rebase), 6) Set up auto-merge if all checks pass. Consider draft status: [--draft-pr flag]. Include test status: [insert test summary]."107- Context from previous: PR description, test results, review status108- Expected output: PR configuration commands and automation rules109110## Success Criteria111112- ✅ All critical and high-severity code issues resolved113- ✅ Test coverage maintained or improved (target: >80%)114- ✅ All tests passing (unit, integration, e2e)115- ✅ Commit messages follow Conventional Commits format116- ✅ No merge conflicts with target branch117- ✅ PR description complete with all required sections118- ✅ Branch protection rules satisfied119- ✅ Security scanning completed with no critical vulnerabilities120- ✅ Performance benchmarks within acceptable thresholds121- ✅ Documentation updated for any API changes122123## Rollback Procedures124125In case of issues after merge:1261271. **Immediate Revert**: Create revert PR with `git revert <commit-hash>`1282. **Feature Flag Disable**: If using feature flags, disable immediately1293. **Hotfix Branch**: For critical issues, create hotfix branch from main1304. **Communication**: Notify team via designated channels1315. **Root Cause Analysis**: Document issue in postmortem template132133## Best Practices Reference134135- **Commit Frequency**: Commit early and often, but ensure each commit is atomic136- **Branch Naming**: `(feature|bugfix|hotfix|docs|chore)/<ticket-id>-<brief-description>`137- **PR Size**: Keep PRs under 400 lines for effective review138- **Review Response**: Address review comments within 24 hours139- **Merge Strategy**: Squash for feature branches, merge for release branches140- **Sign-Off**: Require at least 2 approvals for main branch changes141
Full transparency — inspect the skill content before installing.