nonameplum/agent-skills
Overview
This skill provides step-by-step guidance for maintaining a strict linear Git workflow using rebases, feature branches, and fast-forward merges. It enforces protected main branch rules and safe commit-rewriting policies for AI-assisted changes. The goal is clear, reviewable history and predictable CI/PR integration.
How this skill works
The skill inspects branch workflows and prescribes commands and rules: create feature/fix/chore branches from main, rebase frequently on origin/main, and resolve conflicts locally. It enforces never merging main into feature branches, requires fast-forward-only merges into main, and specifies when force-push with --force-with-lease is appropriate after rewriting history. It also provides a decision checklist for when an AI agent may rewrite commits.
When to use it
- When creating a new feature, fix, or chore branch from main
- Before and after rebasing work on a feature branch
- When preparing a branch for code review or CI validation
- When deciding whether to rewrite or squash commits produced by AI edits
- When finalizing a pull request to be fast-forward merged into main
Best practices
- Always use the Git CLI for explicit control and reproducibility
- Create small, atomic commits with imperative verbs and clear bodies for complex changes
- Rebase frequently: git fetch && git rebase origin/main or git pull --rebase origin main
- Never merge main into a feature branch; avoid merge commits and squash merges
- After rewriting published branch history, push with git push --force-with-lease (never force-push main)
Example use cases
- Start a feature branch: git checkout -b feature/payment origin/main, develop, rebase on origin/main before PR
- CI fails after rebase: resolve conflicts locally, run tests, and push --force-with-lease
- AI refactor changed APIs: follow checklist to decide whether to reword/squash commits to match final code
- Review-ready PR: ensure branch is rebased onto latest origin/main and request human review before fast-forward merge
- Recover noisy local history: git rebase -i origin/main to squash WIP/fixup commits, then push --force-with-lease
FAQ
Force-push is allowed only on non-main branches after you rewrite history; always use git push --force-with-lease and communicate with collaborators.
Can I ever merge main into my feature branch?
No. Merging main into feature branches creates merge commits and breaks linear history—always rebase onto origin/main instead.
When should an AI agent rewrite commits?
Only when commits no longer accurately describe the code, fragment a single logical change, duplicate work, or obscure intent; otherwise do not rewrite history.
12 skills
This skill guides you through maintaining a linear Git workflow with rebases, feature branches, and fast-forward merges.
This skill guides Swift functional architecture with immutability, pure functions, and DI via functions to improve testability and maintainability.
This skill helps you implement type-safe Swift state machines with enum states and action-based transitions for robust concurrency and lifecycle flows.
This skill provides comprehensive Embedded Swift documentation for microcontrollers and bare-metal development, guiding setup, usage, and advanced topics for
This skill helps you generate, structure, and format Swift DocC documentation and tutorials from code comments and articles.
This skill helps you master Swift syntax and language features with concise, reference-backed guidance covering basics to concurrency.
This skill helps you implement Core Bluetooth central and peripheral workflows, ensuring poweredOn state, proper discovery, connection, and GATT operations.
This skill helps you share and persist app state across components with observable changes and safe mutation.
This skill helps you integrate HealthKit data access and workflows across iPhone, Apple Watch, iPad, and visionOS.
This skill helps you reason about and implement controlled, testable dependencies in Swift apps using a structured environment-inspired approach.
This skill helps Swift developers adopt robust snapshot testing with views, images, and custom formats across XCTest and Swift testing workflows.
This skill helps you simplify and empower Swift navigation across SwiftUI, UIKit, and AppKit with ergonomic tooling and practical guidance.