merge-base-branch
Merge the chosen base branch into the current branch and finish with a clean lint, full test coverage, and successful build. Use when you want the branch fully reconciled with its parent and CI-quality checks passing locally.
Usage:
/merge-base-branch— Run the full workflow below
Prerequisites:
- Repository root must be a git checkout on a named branch (not detached HEAD).
- If the project uses Node/npm,
package.jsonmust define scriptslint,test:coverage, andbuild. Ifpackage.jsonis missing or any of those scripts is missing, report what is absent and STOP (do not merge or proceed without the mandated checks).
Instructions:
-
Current branch:
- Run
git branch --show-current. If detached HEAD, inform the user and STOP.
- Run
-
Determine base branch candidate, then let the user choose:
- First, if
.agentexists at the repo root, read it forbaseBranch=<value>. That value is the detected candidate (if present). - Else, infer from git: run
git merge-base --fork-point main HEAD,git merge-base --fork-point master HEAD, andgit merge-base --fork-point develop HEAD. Any branch name that returns a commit is a match. If exactly one matches, that is the detected candidate. If several match, choose by priority:main, thenmaster, thendevelop. If none match, detected candidate is unset. - Use
AskUserQuestionso the user picks the base branch to merge. Always includemainas an option. Include the detected candidate as an option when it is set and differs frommain. Includemasteranddevelopas additional options when they exist onorigin(or locally). Include a short label on each option (e.g. “Detected from history: develop”). Wait for the answer; the selected branch is<base-branch>.
- First, if
More from morphet81/cheat-sheets
translate-pdf
Translate a PDF document from one language to another. Extracts text to structured Markdown, translates it, and builds a new translated PDF. Requires a Python environment with pymupdf, markdown, and weasyprint.
80create-jira-ticket
Create a JIRA ticket from user instructions via acli. Uses project from the current branch when possible, lists project epics, recommends the best epic, asks confirmation before creating, uses ADF descriptions, and can attach Figma designs via the Jira integration.
80localise
Generate an HTML translation helper page for Lokalise. Use when the user provides English text (singular/plural) and wants translations across all 23 supported languages, rendered as an interactive HTML page with copy buttons. Triggers on phrases like "translate for Lokalise", "generate translations", "translation table", or when the user provides English strings and mentions languages/i18n/localization.
79update-jira-ticket
Compare the JIRA ticket description to changes made in the current branch and propose description edits and/or comments to keep the ticket accurate and well-documented.
79verify-test-cases
Verify test cases in all test files modified since branching out from base branch. Checks that test cases make sense, have no duplications, and provide meaningful coverage. Spawns parallel agents for multi-file analysis. After the user confirms test-case changes, runs coverage (npm test:coverage or Jest/Vitest fallback) and fixes tests until coverage passes.
79adb
Use ADB to interact with an Android device or emulator. Takes a screenshot, understands the screen, performs actions (tap, swipe, type, navigate), and loops until the mission is complete.
78