commit-work

Selectively stage and commit specific hunks of code changes by patch-based isolation.

Updated Oct 15, 2021
One-click install
npx skills add https://github.com/toqoz/config --skill commit-work-toqoz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-work
Source: https://github.com/toqoz/config/tree/main/home/agents/skills/commit-work
Command: npx skills add https://github.com/toqoz/config --skill commit-work-toqoz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the issue of mixed working trees where multiple unrelated changes are present, allowing you to create clean, atomic commits for specific tasks without accidentally including unfinished or unrelated work.

Core Features & Use Cases

  • Selective Staging: Uses patch surgery to stage only the specific hunks related to a single piece of work.
  • Branch Guardrails: Prevents accidental commits to protected branches like main or production.
  • Workflow Integration: Supports optional automated pushing and PR creation via GitHub CLI.
  • Use Case: You are working on a bug fix and a new feature simultaneously; use this skill to commit only the bug fix changes while leaving the feature work unstaged.

Quick Start

Ask the agent to commit the changes related to the specific task you just completed by describing the work clearly in your request.

Frequently Asked Questions about commit-work

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit only specific changes in a git working tree with mixed modifications?

To commit specific changes in a mixed git working tree, you can use patch-based staging to isolate logical work units. This approach selectively stages only the hunks related to a single task, leaving unrelated or unfinished work unstaged.

Can I prevent accidental commits to protected branches like main or production?

Yes, you can prevent accidental commits to protected branches like main or production by using branch guardrails. This feature enforces branch protection policies during the staging process to block unauthorized changes.

How do I isolate a bug fix for an atomic commit while leaving feature work unstaged?

To isolate a bug fix for an atomic commit while leaving feature work unstaged, use selective patch surgery to stage only the specific code hunks related to the bug fix. This separates logical work units for clean, reviewable commits.

Does selective git staging support automated pushing and pull request creation?

Yes, selective git staging supports automated pushing and pull request creation. This workflow integration utilizes GitHub CLI to optionally synchronize upstream and generate PRs after isolating your atomic commits.

What is the best way to create reviewable commits from unrelated code modifications?

The best way to create reviewable commits from unrelated code modifications is to isolate logical work units through patch-based staging. This selective staging technique ensures your version control history contains only atomic, focused changes.

Do I need GitHub CLI to automate pull request creation from isolated commits?

Yes, you need GitHub CLI to automate pull request creation from isolated commits. The automated upstream synchronization and PR creation workflow integration relies on the GitHub CLI to push and submit your selectively staged work.