guillemroca/agent-skills-android/git-workflow-and-versioning
Claude Code and agent skill by guillemroca/agent-skills-android
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when managing branches, commits, versioning, and release workflows for Android projects, or when cutting a release, choosing a version bump, tagging, or writing a changelog. Covers trunk-based development, atomic commits, versionCode/versionName derived from tags, semver for library modules, changelogs and Play release notes, and signing configurations.
Install
npx vskill@latest install guillemroca/agent-skills-android/git-workflow-and-versioningSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as guillemroca/agent-skills-android/git-workflow-and-versioning.
Git Workflow and Versioning
Overview
Trunk-based development: keep main always deployable, use short-lived feature branches (1–3 days), and make atomic commits that address one logical concern. Android versioning requires managing versionCode (monotonic integer for Play Store) and versionName (human-readable semver).
When to Use
- Starting a new feature branch
- Making commits during development
- Preparing a release
- Managing version numbers, tagging a release, or writing a changelog / Play "What's new"
- Publishing a library module (AAR/Maven) that other code depends on
- Reviewing branch strategy or merge approach
- Setting up signing configurations
Skip when: The project has an established, documented git workflow.
Core Process
Step 1: Trunk-Based Development
- Branch strategy:
- Branch rules:
mainis always green (CI passes)- Feature branches are short-lived (1–3 days max)
- Delete branches after merge
- No long-lived feature branches — use feature flags instead
- Release branches are cut from
main, not from feature branches
Step 2: Atomic Commits
- Each commit addresses one logical concern:
- Commit message format:
- First line: imperative, under 72 characters ("Add", "Fix", "Update", "Remove")
- Blank line
- Body: explain why, not what (the diff shows what)
- Reference issue numbers:
Fixes #42
Step 3: Change Sizing
- Target ~100 lines per commit:
| Size | Lines | Review Time | Action | |
|---|---|---|---|---|
| Small | < 50 | Minutes | Merge quickly | |
| Medium | 50–200 | ~30 min | Standard review | |
| Large | 200–500 | Hours | Consider splitting | |
| Too Large | > 500 | Days | Must split |
- Split strategies:
- Refactoring separate from feature work
- Data layer separate from UI layer
- Tests in the same commit as the code they test (not separate)
Step 4: Save-Point Pattern
- Commits as checkpoints:
Step 5: Android Versioning
- Version management in `build.gradle.kts`:
- Versioning strategy:
For an app, MAJOR is a product call (redesign, dropped minSdk); semver is a strict contract only for published library modules (Step 6). Whatever the strategy, versionCode must exceed every value ever uploaded — when switching strategies, offset the new scheme above the last upload.
- Derive versions from the release tag, don't hand-edit them. CI passes them as Gradle properties; local builds get safe defaults:
The tag, the artifact, and the changelog can then never disagree, and two branches can't both hand-bump to the same versionCode.
Step 6: Release & Versioning
- Tag every release — an immutable, reproducible point in history, on the exact commit that was built:
- Keep a human changelog.
CHANGELOG.mdin Keep a Changelog style: newest on top, grouped byAdded / Changed / Fixed / Deprecated / Removed / Security, phrased around user impact — not dumped commit messages. Write the entry in the same PR as the change, not reconstructed at release time.
- Play Store "What's new" per locale — a short, user-facing summary per release (Play Console limits it to 500 characters per language). Keep the text in the repo so it's reviewed in the PR; the path depends on your upload tool (e.g.
distribution/whatsnew/whatsnew-en-USfor ther0adkll/upload-google-playGitHub Action,src/main/play/release-notes/en-US/default.txtfor Gradle Play Publisher). Automating the upload isci-cd-and-automation; rollout isshipping-and-launch.
- Published library modules (AAR/Maven) follow strict semver: removing or changing a public signature — or behaviour consumers rely on (Hyrum's Law, see
api-and-interface-design) — is MAJOR; additive API is MINOR; fixes are PATCH. Deprecate in a minor, remove in the next major (seedeprecation-and-migration). Catch accidental breaks with the Kotlin binary-compatibility-validator plugin:
The .api diff is the review signal: removals or changed signatures mean MAJOR, additions only mean MINOR.
Step 7: Signing Configuration
- Release signing setup:
- Signing rules:
- Keystore file NEVER in git (store securely, backup separately)
- Signing credentials in
local.propertiesor CI secrets - Use Google Play App Signing for production (Google manages the upload key)
- Debug keystore is auto-generated (don't commit it)
Step 8: Pre-Commit Checks
- Before committing:
Step 9: Git Worktrees for Parallel Work
- Use worktrees when working on multiple features:
Common Rationalizations
| Shortcut | Why It Fails | |
|---|---|---|
| "I'll squash it all at the end" | Squashed commits lose context. Atomic commits are reviewable and revertable. | |
| "The feature branch will only take a week" | Week-long branches drift from main and create merge conflicts. Use feature flags. | |
| "versionCode doesn't matter" | Play Store rejects uploads with non-increasing versionCode. Plan the strategy early. | |
| "I'll fix the commit message later" | Rewriting history after push is destructive. Write good messages the first time. | |
| "I'll just bump versionName in build.gradle.kts" | Hand edits drift from the tag, and parallel branches collide on the same versionCode. Derive both from the tag/CI. | |
| "It's a small library change, bump the patch" | Diff size is irrelevant; consumers' code is. If apiCheck shows a removed or changed signature, it's a major. | |
| "The changelog is just the commit log" | Commits are for developers; the changelog and "What's new" are for users, curated by impact. | |
| "We'll write the changelog at release time" | By then the impact is reconstructed from memory and half is missing. Write the entry with the change. |
Red Flags
- Long-lived feature branches (> 3 days)
- Kitchen-sink commits (> 500 lines, multiple concerns)
- Commit messages that only say "fix" or "update"
- Keystore or signing credentials in git
- versionCode not monotonically increasing
- No CI check on
mainbranch - Force-push to
main versionName/versionCodehand-edited in build files, out of sync with the release tag- A release build with no tag, or a tag not on the commit that was built
- A library module's public API changed with no
.apidump diff in the PR, orapiCheckdisabled - A breaking library change shipped under a minor or patch bump
- A release with no
CHANGELOG.mdentry, or placeholder "What's new" text
Verification
- [ ] Feature branches are short-lived (1–3 days)
- [ ] Commits are atomic (one logical concern each)
- [ ] Commit messages explain why, not what
- [ ] versionCode increases with every release
- [ ] Signing credentials not in git
- [ ]
mainbranch always passes CI - [ ] Pre-commit:
./gradlew test && ./gradlew assembleDebugpasses
For every release:
- [ ] Release commit tagged (
git tag -a vX.Y.Z) and the tag pushed;versionName/versionCodecame from the tag/CI, not a hand edit - [ ]
CHANGELOG.mdhas a curated entry for this version, grouped by impact - [ ] Play "What's new" text exists for every shipped locale, within the 500-character limit
- [ ] Library modules:
./gradlew apiCheckpasses; the bump matches the.apidiff (removal/change → major, addition → minor, none → patch)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git-workflow-and-versioning/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/guillemroca/agent-skills-android/git-workflow-and-versioning)