Help us improve
Share bugs, ideas, or general feedback.
From feature-lifecycle
Commits changes on a feature branch and merges into local main after tests pass. All operations are local — never pushes or pulls. Use when the user wants to commit and merge, finish a feature branch, land a feature, merge to main, or complete a branch.
npx claudepluginhub gravity9-tech/claude_code_marketplace_demo --plugin feature-lifecycleHow this skill is triggered — by the user, by Claude, or both
Slash command
/feature-lifecycle:commit-and-mergeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Commit all changes on the current feature branch with a conventional commit message, run the test suite, and merge into the local main/master branch with `--no-ff`.
Verifies tests pass, determines base branch, then guides integration via local git merge, GitHub PR creation, keeping branch, or discard with execution and cleanup.
Use when implementation is finished, tests are green, and you need to decide how to land the work - presents structured integration paths for local merge, pull request, deferral, or abandonment
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Share bugs, ideas, or general feedback.
Commit all changes on the current feature branch with a conventional commit message, run the test suite, and merge into the local main/master branch with --no-ff.
All operations are LOCAL ONLY. Never run git push, git pull, git fetch, or any command that contacts a remote repository.
Run:
git branch --show-current
Confirm the current branch is a feature branch (not main or master). If already on main/master, stop and inform the user:
"You're on the main branch. Switch to a feature branch first."
Extract the ticket key from the branch name. Feature branches follow the format feature/KEY-123-description. The ticket key is the uppercase prefix with number (e.g., PROJ-123).
If no ticket key can be parsed from the branch name, ask the user with AskUserQuestion:
"What's the Jira ticket key for this commit? (e.g., PROJ-123)"
Run:
git status --porcelain
If there are no changes (working tree clean, nothing staged), skip to Step 4 (there may be existing unpushed commits to merge).
Show the user a summary of what will be committed:
Stage all changes:
git add -A
Generate a short description (under 50 characters) summarizing the changes. Examine the diff to understand what was done:
git diff --cached --stat
Commit with conventional commit format:
git commit -m "feat(TICKET-KEY): <short description>"
Use the appropriate prefix based on the changes:
feat — new feature or functionalityfix — bug fixrefactor — code restructuring without behavior changetest — adding or updating tests onlydocs — documentation onlychore — maintenance, config, dependenciesReport: Committed: feat(KEY-123): <description>
Discover the project's test command by reading CLAUDE.md, package.json, Makefile, or similar project configuration files.
Run the full test suite.
If tests fail:
If tests pass:
All tests passingBefore merging, ask the user with AskUserQuestion:
"Tests are passing. Has the code review been completed and approved?"
Options: "Yes, merge to main" and "No, stop here"
If the user says no, stop and report:
"Commit and tests complete. Branch is ready to merge after review."
Determine whether the repository uses main or master:
git rev-parse --verify main 2>/dev/null && echo main || echo master
Store the current feature branch name, then switch to the default branch:
git checkout <default-branch>
Do NOT run git pull — all operations are local only.
Merge with no fast-forward to preserve the feature branch history:
git merge --no-ff <feature-branch> -m "Merge <feature-branch> into <default-branch>"
If merge succeeds:
Merge complete!
Branch: <feature-branch> → <default-branch>
Commit: feat(KEY-123): <description>
Tests: All passing
If merge conflicts occur:
git diff --name-only --diff-filter=U
git merge --abort
git checkout <feature-branch>
"Merge conflicts detected in: [file list]. The merge has been aborted and you're back on your feature branch. Resolve conflicts manually or rebase before retrying."
Do NOT attempt to auto-resolve conflicts.
--no-ff to keep feature branch history visible in the git log