work-unit-commits
O que ela faz
Esta skill ajuda sua IA a decidir o que vai em cada commit ou pull request. É para desenvolvedores que querem alterações que os revisores consigam entender uma peça de cada vez.
Quando usar
- ✓Quando você está dividindo uma funcionalidade em partes revisáveis antes de commitar.
- ✓Quando uma alteração está ficando grande e pode precisar virar vários pull requests.
- ✓Quando você quer que cada commit conte uma história clara pelo seu diff e pela sua mensagem.
Link da skill
https://github.com/Gentleman-Programming/gentle-ai/blob/main/internal/assets/skills/work-unit-commits/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Planeje como dividir esta funcionalidade em commits que um revisor consiga acompanhar um por um.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill orienta a IA a agrupar as alterações por comportamento ou entrega, e não por tipo de arquivo. Testes e documentação ficam no mesmo commit do código que verificam, e cada commit deve fazer sentido por si só.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
When to Use
Load this skill when deciding what belongs in each commit or PR.
Use it for:
- Splitting a feature into reviewable work.
- Preparing commits before opening a PR.
- Turning a large change into chained or stacked PRs.
- Keeping reviewer cognitive load healthy.
- Committing ODD work units in reviewable slices.
Critical Rules
| Rule | Requirement |
|---|---|
| Commit by work unit | A commit represents a deliverable behavior, fix, migration, or docs unit. |
| Do not commit by file type | Avoid models, then services, then tests if none works alone. |
| Keep tests with code | Tests belong in the same commit as the behavior they verify. |
| Keep docs with the user-visible change | Docs belong with the feature or workflow they explain. |
| Tell a story | A reviewer should understand why each commit exists from its diff and message. |
| Future PR-ready | Each commit should be a candidate chained PR when the change grows. |
| Budget is not code-golf | Never shrink a diff by deleting comments, blank lines, docs, or tests, or by compressing code, to fit the review budget (400 by default, or the session review_budget_lines). Slice by work unit or report the overage. |
Work Unit Checklist
Before committing, confirm:
- The commit has one clear purpose.
- The repo still makes sense after applying only this commit.
- Tests or docs for this unit are included when relevant.
- Rollback is reasonable without reverting unrelated work.
- Focused test command and exact result are recorded.
- Runtime harness command/scenario and exact result are recorded, or explicit
N/Aexplains why no runtime boundary exists. - Rollback boundary names the exact files/behavior removable without unrelated work.
- The commit message explains the outcome, not the file list.
Split Examples
| Weak split | Better work-unit split |
|---|---|
add models |
feat(auth): add token validation domain model and tests |
add services |
feat(auth): wire token validation into login flow |
add tests |
Tests included with each behavior commit |
update docs |
Docs included with the user-facing change they explain |
PR Relationship
Use work-unit commits as the foundation for chained PRs:
- Build the smallest independent work unit.
- Include verification for that unit.
- Commit it with a Conventional Commit message.
- If the PR approaches 400 changed lines, promote commits or groups of commits into chained PRs.
ODD Relationship
Organic Driven Development (ODD) commits substantial work in reviewable slices on the feature branch, not one commit per task:
- Commit work units in reviewable slices of about 400 authored changed lines, branch first when on the default branch, with tests and docs alongside the behavior and a Conventional Commit message. A unit whose Risk line names a high-risk item gets its own commit so native review can take it alone, and the last slice closes the feature.
- The native review candidate is that commit, or the PR slice it belongs to when review is deferred, against the previous reviewed boundary. It is never a TODO checkbox and never the accumulated feature branch.
- The running authored line count from work-unit commits feeds the delivery-strategy vocabulary:
ask-on-risk,auto-chain,single-pr,exception-ok. - The ODD feature document records the commit that holds each task as evidence and, once a delivery strategy applies, the chosen chain strategy and slice boundaries (which commits each PR holds).
Commands
# Review the story before committing
git diff --stat
git diff --cached --stat
# Check recent commit style
git log --oneline -5
Perguntas frequentes
Devo agrupar commits por tipo de arquivo?
Não. A skill diz para evitar commits organizados como modelos, depois serviços, depois testes.
Onde ficam os testes?
Os testes ficam no mesmo commit do comportamento que verificam.
Ela pode reduzir uma alteração para caber em um limite de revisão?
Não. A skill diz para nunca apagar comentários, testes ou documentação, nem comprimir código, só para caber em um orçamento.
Detalhes
Descrição original do autor
Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.
Popularidade
- Estrelas no GitHub
- 8,2 mil
- Posição no ranking
- #12558
- Licença
- MIT
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
branch-pr
8,2 milAjuda seu agente a preparar branches e pull requests que seguem as regras de contribuição do próprio projeto de destino, e não um modelo genérico.
chained-pr
8,2 milAjuda seu agente a dividir uma alteração grande, com mais de 400 linhas, em uma cadeia de pull requests menores e revisáveis, que se sustentam por conta própria.
cognitive-doc-design
8,2 milEnsina seu agente a escrever guias, READMEs e revisões fáceis de percorrer e de lembrar, começando pela resposta e agrupando os detalhes.
comment-writer
8,2 milAjuda seu agente a escrever comentários curtos, cordiais e diretos para pull requests, revisões, respostas em issues e mensagens em chats de equipe.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.