con un clic
create-mr
// Creates a GitLab Merge Request for the current branch by auto-generating a structured description from the branch diff and pushing with GitLab push options.
// Creates a GitLab Merge Request for the current branch by auto-generating a structured description from the branch diff and pushing with GitLab push options.
Use when given a Figma URL or node and asked to translate it into MEGA Android Jetpack Compose code, before writing any UI code. Triggers include "implement this Figma", "build this design", "translate Figma to Compose", or any message containing a figma.com link plus a request for Compose / Android UI. Encodes MEGA's Core-UI component mapping, design-token rules, and the rule that existing screens MUST be located before any new code is written.
Upload new Android strings to Weblate. Extracts new strings added in the current branch (compared to develop) from strings_shared.xml, writes them to the transifex/weblate/strings.xml file, runs the upload script, then optionally uploads a screenshot and maps it to the uploaded strings via the Weblate API.
Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9
Analyze a UI screenshot and identify which MEGA core-ui library components match the visible elements. Extracts component metadata from the sources.jar and performs text + visual matching against component screenshots.
Create, update, and refactor Android Compose screens with Navigation3 destinations. Creates stateless Screen composables, Destination files (NavKey + EntryProviderScope extension), and registers destinations in FeatureDestination classes. Supports simple and parameterized NavKeys, navigation callbacks, metadata, and assisted ViewModel injection. Does NOT create ViewModels (use /viewmodel for that).
Android PR Code Review skill. Performs a comprehensive code review on the current Git repository's PR or specified code changes. Covers all review dimensions including architecture, Kotlin code quality, Android platform best practices, performance, security, and testability — along with a standardized output format. Can also be used as a standalone reference for Android review standards.
| name | create-mr |
| description | Creates a GitLab Merge Request for the current branch by auto-generating a structured description from the branch diff and pushing with GitLab push options. |
| triggers | ["/create-mr","push mr","create mr","open mr"] |
Generate a structured MR description and push the current branch to GitLab, creating a Merge Request automatically.
/create-mr # Push current branch and auto-generate description
/create-mr --title "AND-1234 My fix" # Override MR title
/create-mr --base develop # Override target branch (default: develop)
/create-mr --branch kg/AND-1234-my-feature # Create and switch to a new branch (explicit name)
/create-mr --branch kg AND-1234 my feature # Create and switch to a new branch (auto-slugified)
/create-mr --draft # Create as draft MR
/create-mr --squash # Force squash on merge (overrides default)
/create-mr --no-squash # Force no squash on merge (overrides default)
/create-mr --wip-label # Explicitly add "WIP" label (same as default)
/create-mr --no-wip-label # Skip the default "WIP" label
| Argument | Description | Example |
|---|---|---|
--title <title> | Override MR title (default: latest commit message) | --title "AND-1234 Fix login" |
--base <branch> | Target branch for the MR (default: develop) | --base main |
--branch <name> | Create a new branch using an explicit full name | --branch kg/AND-1234-my-feature |
--branch <prefix> <JIRA> [desc] | Create a new branch, auto-slugified from prefix + JIRA + description | --branch kg AND-1234 my feature → kg/AND-1234-my-feature |
--draft | Create MR as draft | |
--squash | Force squash on merge, regardless of target branch | |
--no-squash | Force no squash on merge, regardless of target branch | |
--wip-label | Explicitly add the "WIP" label | |
--no-wip-label | Skip adding the "WIP" label |
--branch was passed)If --branch <value> was provided, determine the branch name as follows:
/ (e.g. kg/AND-1234-my-feature) → use it as-is as the branch name.kg AND-1234 my feature) → treat as <prefix> <rest>:
kg)AND-1234 my feature)<prefix>/<slug> where slug = rest lowercased with spaces replaced by hyphens (e.g. kg/AND-1234-my-feature)Then run:
git checkout -b "<branch-name>"
git checkout "<branch-name>" instead and inform the user.Detect whether the current working directory is inside a git worktree by running:
git rev-parse --is-inside-work-tree && git worktree list --porcelain
If the output of git worktree list shows that the current directory is a linked worktree (i.e. it is not the main worktree):
--branch was passed, use that name (already resolved in Step 0).git branch "<branch-name>" "<current-worktree-HEAD-commit>"
git checkout "<branch-name>"
This ensures worktree-internal branches (which are temporary) are never used as MR source branches.
Run:
git status --porcelain
If the output is non-empty (uncommitted changes exist):
git add -A
git commit -S -m "<user-provided message>"
# List available secret keys
gpg --list-secret-keys --keyid-format=long
# Set the signing key and enable auto-signing
git config --global user.signingkey <KEY_ID>
git config --global commit.gpgsign true
Ask the user to configure their GPG key and then re-run /create-mr.Run:
git log develop..HEAD --pretty="format:%H %s %G?"
The %G? field reports signature status per commit:
G — good signatureU — good signature, unknown keyX / Y / R — expired or revoked key (treat as warning, still proceed)B — bad signature (halt)N — no signature (halt)If any commit shows N or B:
git rebase --exec "git commit --amend --no-edit -S" develop
After re-signing, ask the user to re-run /create-mr.If all commits are signed (no N or B), continue to Step 2.
Run:
git branch --show-current
git log develop..HEAD --oneline
--title was not provided).Run:
echo "=== COMMITS ===" && git log develop..HEAD --oneline && echo "=== DIFF ===" && git diff develop...HEAD
Analyze the output and extract:
*Test.kt, *Spec.kt, _test, .spec)+) for //TODO, // TODO, #TODO, FIXME, or HACK markersWrite the description in this exact format:
#### Summary
<1-3 sentence overview of what this MR does and why. Explain how it differs from the current implementation>
#### Key Changes
- <change 1>
- <change 2>
#### Benefits
- <benefit 1>
- <benefit 2>
#### Cons / Risks (if any)
- <con or risk — omit this section entirely if none>
#### TODOs for Next MR
- <//TODO or FIXME items found, or "None">
#### Why are we making this change?
#### What features are impacted?
#### If the MR has more than 10 files, please provide a valid reason.
## Screenshot/Screen-recording comparisons
| Before | After |
|--------|-------|
| | |
## Resources
[Android MR Checklist](https://confluence.developers.mega.co.nz/display/MOB/Android+MR+Checklist)
## Gitlab MR shortcuts
- jenkins rebuild - Run build again
- deliver_qa - Send build to firebase
Documentation: [Android CI/CD Pipeline Commands](https://confluence.developers.mega.co.nz/pages/viewpage.action?pageId=37651416)
Closes <Jira Ticket Number>
Writing guidelines:
Run git push using the Bash tool with GitLab push options.
Important: GitLab push options do not support literal newline characters and will fail with fatal: push options must not have new line characters. Always build the description as a single-line string with \n (backslash-n) in place of every newline:
DESCRIPTION='#### Summary\n<text>\n\n#### Key Changes\n- item 1\n- item 2'
git push --set-upstream origin "<current branch>" \
-o merge_request.create \
-o "merge_request.title=<title>" \
-o "merge_request.description=${DESCRIPTION}" \
-o "merge_request.target_branch=<base>" \
-o "merge_request.label=WIP"
Rules for building DESCRIPTION:
\n'"'"'If --draft was passed, append -o merge_request.draft to the command.
Squash behaviour (in priority order):
--squash was passed → append -o merge_request.squash--no-squash was passed → do not append squash-o merge_request.squashWIP label behaviour (in priority order):
--no-wip-label was passed → do not append the label option--wip-label explicitly passed) → append -o "merge_request.label=WIP"The merge_request.label push option can be repeated to add multiple labels; only WIP is added by this skill. The label must already exist in the GitLab project (it does for this repo).
git push output.