git-batch-commit
Intelligently detects when too many files are staged and automatically groups them by feature or functionality using Conventional Commits with user language preference
What this skill does
# Git Batch Commit Optimizer
This skill optimizes version control workflows by detecting when too many files are staged for commit and automatically organizing them into logical, feature-based batches with Conventional Commit messages.
## Capabilities
- **Smart Threshold Detection**: Automatically detects when staging area contains too many files (threshold-based analysis)
- **Intelligent File Grouping**: Groups files by feature/functionality, not just directory structure
- **Change Analysis**: Analyzes git diff to understand what each file modification does
- **Conventional Commits**: Generates commit messages following the standard (feat/fix/docs/refactor/chore/style/test/perf)
- **Language-Aware Messages**: Commit messages follow user's language preference (English/Chinese/etc.)
- **Multi-Batch Execution**: Executes multiple commits in logical sequence
## Input Requirements
Git repository state:
- Working directory with git repository
- Modified/staged/untrayed files ready for commit
- User language preference (defaults to English)
- Optional: Custom threshold for file count (default: 10 files)
- Optional: Specific Conventional Commit scope preferences
Formats accepted:
- Direct git status/diff output
- File paths with change descriptions
- Text description of changes made
## Output Formats
Results include:
- Analysis of file count and recommended batching strategy
- Grouped file sets by feature/functionality
- Conventional Commit messages for each batch (type/scope/description)
- Execution plan showing commit sequence
- Summary report of commits created
Output structure:
```json
{
"analysis": {
"total_files": 25,
"threshold": 10,
"requires_batching": true,
"recommended_batches": 3
},
"batches": [
{
"batch_id": 1,
"commit_type": "feat",
"scope": "authentication",
"files": ["auth.py", "login.py"],
"message": "feat(authentication): add OAuth2 login support"
}
],
"execution_summary": "Created 3 commits across feat, fix, and docs types"
}
```
## How to Use
**Example 1 - Auto-detect and batch:**
"Analyze my git staging area and create appropriate batch commits"
**Example 2 - With language preference:**
"Create batch commits in Chinese for all these staged files"
**Example 3 - Custom threshold:**
"Use a threshold of 15 files and batch my commits accordingly"
**Example 4 - Specific commit types:**
"Group these changes and use 'feat' and 'refactor' commit types"
## Scripts
- `git_analyzer.py`: Parses git status/diff, detects file counts, analyzes change types
- `batch_committer.py`: Groups files by feature, generates Conventional Commit messages, executes commits
- `commit_language.py`: Handles multilingual commit message generation
## Conventional Commit Types
**Standard Types Used:**
- **feat**: New feature or functionality
- **fix**: Bug fix
- **docs**: Documentation changes only
- **refactor**: Code restructuring without feature changes
- **chore**: Maintenance tasks (dependencies, configs)
- **style**: Code style/formatting (no logic change)
- **test**: Adding or updating tests
- **perf**: Performance improvements
**Scope Examples**: `(api)`, `(ui)`, `(auth)`, `(database)`, `(core)`
## Best Practices
1. **Review before execution**: Always review the proposed batches before committing
2. **Meaningful scopes**: Use clear, project-specific scopes for better commit history
3. **Atomic commits**: Each batch should represent a cohesive unit of change
4. **Language consistency**: Keep commit language consistent within a project
5. **Threshold tuning**: Adjust threshold based on project size and team preferences
6. **Feature grouping**: Prefer functional grouping over directory-based grouping
## Limitations
- Requires git repository in working directory
- Cannot automatically resolve conflicts between batches
- Scope detection depends on file naming conventions and change analysis
- Language detection may require explicit user preference
- Some complex refactorings may need manual grouping
- Does not handle pre-commit hooks automatically (user must ensure hooks pass)
## Configuration Options
Optional configuration via `git_batch_config.json`:
```json
{
"threshold": 10,
"default_language": "en",
"preferred_scopes": ["api", "ui", "core", "tests"],
"commit_types": ["feat", "fix", "docs", "refactor", "chore"],
"auto_execute": false
}
```
## Safety Features
- **Dry-run mode**: Preview batches before committing
- **Rollback support**: Can amend or reset if issues detected
- **Validation**: Checks for unstaged critical files
- **Conflict detection**: Warns about potential file dependencies across batches
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.