Plan commits as reviewable work units and split oversized changes into chained PRs. Trigger: before committing, commit splitting, a change over 400 changed lines, stacked or chained PRs, review slices, keeping tests and docs with the code.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Aval Work Units?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/alvaroofernaandez-aval-work-units)
---
name: aval-work-units
description: "Plan commits as reviewable work units and split oversized changes into chained PRs. Trigger: before committing, commit splitting, a change over 400 changed lines, stacked or chained PRs, review slices, keeping tests and docs with the code."
---
## Activation contract
Load before the first commit of a task and again when the running diff nears 400 changed lines. It decides what goes in each commit and, when the change is too big, how it becomes a chain of PRs. Opening the PR itself is `aval-pr`.
## Hard rules
- **One commit, one work unit.** A commit is a deliverable behaviour, fix, migration or docs unit that a reviewer can read and verify alone. The repo builds and its tests pass after every commit.
- **Tests and docs travel with the code** they verify or explain, in the same commit. Never a `tests` or `docs` commit that trails the behaviour.
- **Conventional Commits**: `type(scope): outcome`, English, imperative, the outcome and not the file list. Types: `feat fix docs refactor perf test build ci chore revert`; `!` marks a breaking change.
- **No AI attribution**: no `Co-Authored-By`, no "generated with" line.
- **Stage files explicitly.** Never `git add -A`; check `git diff --cached --stat` before each commit.
- **Rollback is clean.** Reverting the commit removes the unit and nothing unrelated.
- **Over 400 changed lines (additions plus deletions, generated goldens excluded) the change is split into chained PRs**, unless a maintainer accepts `size:exception`.
- **The budget shapes the slicing, never the code.** Never delete comments, docs or tests, or compress code, to fit 400. Make one honest slicing pass; if no cohesive split fits, stop, keep the best one and report the real count with a `size:exception` recommendation.
## Split examples
| Weak split | Work-unit split |
| --- | --- |
| `add models`, `add services`, `add tests` | `feat(auth): validate tokens, with tests`, then `feat(auth): use validation in login, with tests` |
| `update docs` at the end | docs inside the commit of the behaviour they describe |
| one commit per file type | one commit per behaviour, whatever files it touches |
## How to split a big change
1. List the work units before coding when a plan forecasts more than 400 lines.
2. Order them so each depends only on earlier ones: foundation, behaviour, surface, docs.
3. Each PR holds one unit or a few cohesive ones, about 60 minutes of review.
4. Pick a chain and keep it:
| Chain | Use when | Base of PR n |
| --- | --- | --- |
| Stacked to main | each slice can land alone | PR n-1's branch; retarget to `main` after the parent merges |
| Feature branch | the feature must land whole | a tracker branch; the tracker PR stays draft until the last child merges |
5. Name branches `feat/<feature>-01-<unit>`, `-02-...`. A polluted diff is a base bug: retarget or rebase until only the unit shows.
6. Every child PR carries the chain block from `aval-pr/templates/pr.md`: position, base, depends on, follow-up, with the current PR marked in the list.
## Evidence per unit
Record in the commit body or the PR: the focused test command and its result, and the files or behaviour a revert would remove.
## Commands
```bash
git diff --cached --stat # what this commit holds
git diff --shortstat main...HEAD # running size of the branch
git log --oneline main..HEAD # the story so far
```