incremental-commits
Break multi-file changes into atomic commits ordered by dependency. Use for refactors, breaking API changes, or features touching 3+ files.
Best use case
incremental-commits is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Break multi-file changes into atomic commits ordered by dependency. Use for refactors, breaking API changes, or features touching 3+ files.
Teams using incremental-commits should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/incremental-commits/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How incremental-commits Compares
| Feature / Agent | incremental-commits | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Break multi-file changes into atomic commits ordered by dependency. Use for refactors, breaking API changes, or features touching 3+ files.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Incremental Commits When a feature touches multiple files, implement in **waves**. Each wave is one logical concern, one commit. This creates a clean git history that tells a story. ## The Pattern ``` Wave 1: Foundation (types, interfaces) ↓ Wave 2: Factories/Builders (functions that create instances) ↓ Wave 3: Contracts/APIs (public interfaces that use types) ↓ Wave 4: Infrastructure (utilities, converters, dependencies) ↓ Wave 5: Consumers (apps, UI, integrations) ``` Not every change needs all waves. A simple bugfix might be one wave. A cross-cutting refactor might need five. ## Wave Characteristics Each wave must be: | Property | Description | | ------------- | ---------------------------------------------- | | **Atomic** | One logical concern per wave | | **Buildable** | Code compiles after this wave (run type-check) | | **Focused** | Changes relate to ONE layer/concern | | **Complete** | No half-done work within a wave | ## Real Example: Schema Refactor This feature moved metadata from workspace to tables. Five waves: ### Wave 1: Types ``` feat(schema): add IconDefinition, CoverDefinition, and FieldMetadata types - Add IconDefinition discriminated union (emoji | external) - Add CoverDefinition discriminated union (external) - Add FieldMetadata with optional name/description to all field types - Update TableDefinition to use icon/cover instead of emoji/order ``` Files: `types.ts` only. Foundation for everything else. ### Wave 2: Factories ``` feat(schema): add optional name/description to field factory functions All factory functions (id, text, richtext, integer, real, boolean, date, select, tags, json) now accept optional name and description parameters. ``` Files: `factories.ts` only. Uses types from Wave 1. ### Wave 3: Contracts ``` feat(schema): remove emoji and description from WorkspaceSchema Workspace is now just a container with guid, id, name, tables, and kv. Visual metadata (icon, cover, description) now lives on TableDefinition. ``` Files: `contract.ts` only. API change using new types. ### Wave 4: Infrastructure ``` feat(schema): use slugify for human-readable SQL column names - Add @sindresorhus/slugify dependency - Add toSqlIdentifier() helper using slugify with '_' separator - SQLite columns now use field.name (or derived from key) instead of key ``` Files: `to-drizzle.ts`, `package.json`. Utility that uses field metadata. ### Wave 5: Consumers ``` feat(schema): update epicenter app to use TablesWithMetadata - WorkspaceSchema now accepts TablesSchema | TablesWithMetadata - Export new types from package index - Update app to create proper TableDefinition with metadata ``` Files: App files that consume the new types. ## The Workflow 1. **Plan waves before coding** - List files that need changes - Group by layer/concern - Order by dependency (foundations first) 2. **Implement one wave** - Make changes for that wave only - Resist temptation to "fix one more thing" 3. **Verify the wave** - Run type-check: `bun run tsc --noEmit` - Ensure no errors introduced 4. **Commit the wave** - Use conventional commit format - Message describes what this wave accomplishes - Body can list specific changes 5. **Repeat for next wave** ## When to Use Waves | Scenario | Waves? | Why | | ------------------------ | ------ | -------------------------- | | Single file bugfix | No | One change, one commit | | Add new type + factory | Maybe | Could be 1-2 waves | | Refactor across 5+ files | Yes | Need logical grouping | | Breaking API change | Yes | Types → API → Consumers | | Add dependency + use it | Yes | Infra wave then usage wave | ## Anti-Patterns ### Giant Commit ``` refactor: update schema system - Add new types - Update factories - Change contracts - Add slugify - Update app ``` Problem: One monolithic commit. Can't bisect, can't revert partially, no story. ### Micro Commits ``` feat: add IconDefinition type feat: add CoverDefinition type feat: add FieldMetadata type feat: update IdFieldSchema feat: update TextFieldSchema ... ``` Problem: Too granular. 20 commits for one logical change. Noise. ### Wrong Order ``` Wave 1: Update app to use new types ❌ Wave 2: Add the types ❌ ``` Problem: Wave 1 won't compile. Bottom-up, not top-down. ## Dependency Order Heuristic When deciding wave order, ask: "What does this file import?" ``` types.ts → imports nothing (foundation) factories.ts → imports types.ts contract.ts → imports types.ts converters.ts → imports types.ts, may add deps app/ → imports everything above ``` Files that import nothing come first. Files that import everything come last. ## Branch Strategy For multi-wave work: ```bash # Create feature branch git checkout -b feat/my-feature # Wave 1 # ... make changes ... git add <files> && git commit -m "feat(scope): wave 1 description" # Wave 2 # ... make changes ... git add <files> && git commit -m "feat(scope): wave 2 description" # ... continue waves ... # When done, all waves are individual commits on the branch # PR shows clean history of how the feature evolved ``` ## Quick Reference Before starting: - [ ] List all files that need changes - [ ] Group by layer (types, factories, contracts, infra, consumers) - [ ] Order by dependency For each wave: - [ ] Change only files in this wave - [ ] Run type-check - [ ] Commit with descriptive message - [ ] Move to next wave After all waves: - [ ] Final type-check - [ ] Run tests if applicable - [ ] Create PR with clean commit history
Related Skills
xlsx-to-csv
Convert XLSX spreadsheets (single or multi-sheet) to CSV files you can read and grep. Use whenever you need to process an .xlsx report from Xero, Cryptio, bank exports, or any tool that delivers spreadsheet output.
xero-mcp
Use the Xero MCP server — obtain/refresh OAuth2 bearer tokens, troubleshoot authentication, and pick up other operational notes for working with Xero MCP tools. Use when Xero MCP tools fail with authentication errors, when the bearer token has expired (tokens last ~30 min), before starting any Xero workflow, or for general guidance on Xero MCP usage.
xero-browser
General Xero browser automation notes. Use when automating any Xero page with agent-browser — covers non-standard UI patterns, waiting, and dropdown menus.
test-running
Run tests according to repository guidelines. Use after linting passes, before staging changes.
task-orchestration
Orchestrate the complete development workflow for implementing sub-tasks from a task list. Use for end-to-end feature implementation with quality controls.
task-implementation
Implement a single sub-task from a task list. Use when working on feature development with existing task lists.
task-generation
Generate a detailed task list from a PRP. Use after a PRP is created and ready for implementation planning.
subagent-authoring
Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.
slow-command-running
Pipe long running commands through tee(1) to allow watching output and repeated analyses without rerunning
skill-authoring
Create and maintain Claude Code skills following Anthropic best practices. Use when building new skills, refactoring existing ones, or ensuring skills follow official guidelines for structure, naming, progressive disclosure, and testing.
safe-rm
Safely delete files / directories without asking for permission
prp-generation
Generate a Product Requirements Prompt (PRP) from a feature description. Use when starting work on a new feature.