Commit
Pre-commit workflow and commit guidelines.
Pre-commit Checklist
Before making ANY commit:
- Run the
lint skill's workflow — all checks must pass with zero issues (abort if
any issues remain). Follow the lint skill — full check, no --tools filtering.
- All tests must pass (
uv run lintro tst)
- Where applicable, Docker builds pass
Commit Requirements
- Every commit MUST be signed/verified
- Use semantic commit prefixes:
fix:, feat:, chore:, docs:, refactor:,
test:, build:, ci:, perf:, style:
- Commit messages MUST be in imperative mood ("Add feature" not "Added feature")
Commit Granularity
Make incremental, logical commits rather than one large commit:
- Group related changes (e.g., all logging for one subsystem)
- Separate concerns (e.g., bug fixes vs features vs docs)
- Each commit should be independently reviewable and revertable
- Use judgment: 1 commit per file is too granular, 1 commit for everything is too coarse
Good groupings:
feat(logging): add subprocess execution logging (one component)
feat(logging): add config parsing logging (related files)
docs: add debugging guide (documentation separate from code)
Bad groupings:
- One commit with 11 files touching 4 different concerns
- 11 separate commits for a cohesive feature
Branch Context Awareness
When working on a new extension or feature branch where all files are new:
- Every file should show as "A" (added), never "M" (modified)
- If you see "M" on files that should be new, the commit history needs fixing
- This indicates commits were made in the wrong order or need restructuring
When modifying an existing codebase:
- "M" (modified) is expected and correct
- Focus on logical grouping of related changes
Restructuring Commits
If commits are poorly structured (too large, wrong groupings, or showing modified when
should be added):
- Find the commit before the problematic ones:
git log --oneline
- Soft reset to that point:
git reset --soft <good-commit>
- Unstage all changes:
git reset HEAD
- Re-add and commit in logical groups with proper messages
- Verify with
git status that file statuses (A/M) are correct
Usage
When asked to commit:
Run the lint skill's workflow — abort if any issues remain (follow the lint
skill — full check, no --tools filtering)
- Raycast extensions: run
uv run lintro fmt/chk first, then npm run lint per
the raycast skill (Raycast rules take precedence)
- Other projects without lintro: use the appropriate lint command from the
lint skill
Run tests - abort if any failures:
- Projects with lintro:
uv run lintro tst
- Raycast extensions: run Vitest if the extension has tests configured (
bun test
or the extension's test script); otherwise manual smoke test via bun run dev
(see the raycast skill)
- Other projects: use appropriate test command
- When authoring or modifying a Raycast extension, use the
raycast skill for
toolchain-specific guidance
Check Docker if applicable
Review changes with git status to plan logical groupings
Stage and commit in logical groups with signed, semantic, imperative messages:
git add <related-files>
git commit -S -m "feat: add user authentication"
Repeat steps 4-5 for each logical group of changes
Examples
Good commit messages:
fix: resolve null pointer in user service
feat: add dark mode toggle
chore: update dependencies
docs: improve API documentation
refactor: simplify authentication flow
Bad commit messages:
fixed bug (not semantic, past tense)
WIP (not descriptive)
updates (not semantic, not specific)
1---2name: commit3description: Pre-commit workflow and commit guidelines. Use when asked to commit changes. Requires passing lint and tests, signed commits, semantic prefixes, imperative mood.4---56# Commit78Pre-commit workflow and commit guidelines.910## Pre-commit Checklist1112Before making ANY commit:13141. Run the `lint` skill's workflow — all checks must pass with zero issues (abort if15 any issues remain). Follow the `lint` skill — full check, no `--tools` filtering.162. All tests must pass (`uv run lintro tst`)173. Where applicable, Docker builds pass1819## Commit Requirements2021- Every commit MUST be signed/verified22- Use semantic commit prefixes: `fix:`, `feat:`, `chore:`, `docs:`, `refactor:`,23 `test:`, `build:`, `ci:`, `perf:`, `style:`24- Commit messages MUST be in imperative mood ("Add feature" not "Added feature")2526## Commit Granularity2728Make incremental, logical commits rather than one large commit:2930- Group related changes (e.g., all logging for one subsystem)31- Separate concerns (e.g., bug fixes vs features vs docs)32- Each commit should be independently reviewable and revertable33- Use judgment: 1 commit per file is too granular, 1 commit for everything is too coarse3435Good groupings:3637- `feat(logging): add subprocess execution logging` (one component)38- `feat(logging): add config parsing logging` (related files)39- `docs: add debugging guide` (documentation separate from code)4041Bad groupings:4243- One commit with 11 files touching 4 different concerns44- 11 separate commits for a cohesive feature4546## Branch Context Awareness4748When working on a new extension or feature branch where all files are new:4950- Every file should show as "A" (added), never "M" (modified)51- If you see "M" on files that should be new, the commit history needs fixing52- This indicates commits were made in the wrong order or need restructuring5354When modifying an existing codebase:5556- "M" (modified) is expected and correct57- Focus on logical grouping of related changes5859## Restructuring Commits6061If commits are poorly structured (too large, wrong groupings, or showing modified when62should be added):63641. Find the commit before the problematic ones: `git log --oneline`652. Soft reset to that point: `git reset --soft <good-commit>`663. Unstage all changes: `git reset HEAD`674. Re-add and commit in logical groups with proper messages685. Verify with `git status` that file statuses (A/M) are correct6970## Usage7172When asked to commit:73741. Run the `lint` skill's workflow — abort if any issues remain (follow the `lint`75 skill — full check, no `--tools` filtering)76 - Raycast extensions: run `uv run lintro fmt/chk` first, then `npm run lint` per77 the `raycast` skill (Raycast rules take precedence)78 - Other projects without lintro: use the appropriate lint command from the79 `lint` skill802. Run tests - abort if any failures:81 - Projects with lintro: `uv run lintro tst`82 - Raycast extensions: run Vitest if the extension has tests configured (`bun test`83 or the extension's test script); otherwise manual smoke test via `bun run dev`84 (see the `raycast` skill)85 - Other projects: use appropriate test command86 - When authoring or modifying a Raycast extension, use the `raycast` skill for87 toolchain-specific guidance883. Check Docker if applicable894. Review changes with `git status` to plan logical groupings905. Stage and commit in logical groups with signed, semantic, imperative messages:9192 ```bash93 git add <related-files>94 git commit -S -m "feat: add user authentication"95 ```96976. Repeat steps 4-5 for each logical group of changes9899## Examples100101Good commit messages:102103- `fix: resolve null pointer in user service`104- `feat: add dark mode toggle`105- `chore: update dependencies`106- `docs: improve API documentation`107- `refactor: simplify authentication flow`108109Bad commit messages:110111- `fixed bug` (not semantic, past tense)112- `WIP` (not descriptive)113- `updates` (not semantic, not specific)