一键导入
finish
Merges completed work back to main through a protected-branch pull request workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Merges completed work back to main through a protected-branch pull request workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Set up a new git worktree and install dependencies.
Merges completed work back to main through a protected-branch pull request workflow.
Set up a new git worktree and install dependencies.
Prepares a Python package for PyPI release by updating the version, building, and verifying the distribution.
Prepare a release by updating the version, building, and verifying the distribution.
Verify that the codebase matches the desired end state described in a design document.
| name | finish |
| description | Merges completed work back to main through a protected-branch pull request workflow. |
You are starting out in a Git worktree folder. Work has been completed and it is time to merge this work back into the main branch via a pull request (branch protection is enabled on main).
$ARGUMENTS
Run /merge-main to fetch and merge the latest changes from main. This handles conflict resolution if any conflicts occur.
Install any new dependencies from the merge: run poetry install --with dev and pnpm --dir docs/ install --frozen-lockfile. Main is guaranteed to be in a good state, so if checks fail due to missing dependencies after the merge, it's because you need to install from the lockfile - NOT because dependencies need to be added.
Make sure all checks that would normally pass on CI pass locally. This means making sure pre-commit checks succeed on all files, and all tests pass.
docs/), as that's where pyproject.toml and the tests directory are located. Exit code 5 (no tests collected) is NOT acceptable - if you see this, you are likely in the wrong directory.finish-pr-workflow but errors show fix-cli-streaming), poetry environments are leaking between worktrees. This happens when VSCode activates a shared terminal environment. To fix: set python.terminal.activateEnvironment to false in VSCode settings to ensure poetry environments in different worktrees are hermetically sealed. Fix things if need be, and COMMIT ANY CHANGES YOU MAKE.Verify that the working state is completely clean (all work committed, nothing staged or unstaged). If there are uncommitted changes:
Find out the current branch by running the command git branch --show-current. Remember this as <completed-branch> for the following steps.
Push the branch to origin: git push -u origin <completed-branch>.
Before creating the PR, examine what's actually being merged:
git diff main..HEAD --stat to see the files that will changegit log main..HEAD --oneline to see commits on this branchCreate a pull request with a proper title and body:
gh pr create --base main --title "<descriptive title>" --body "<summary of actual changes>"--fill as it concatenates all commit messages, including those for changes already on mainEnable auto-merge on the PR with explicit commit message control:
bash gh pr merge <pr-number> --auto --squash --subject "<PR title>" --body "<PR body>"
Use the same title and body from step 7. This is critical because GitHub's default squash behavior concatenates ALL commit messages from the branch - including commits that are already on main (e.g., from cherry-picks or shared history). Without --subject and --body, the squash commit message will contain irrelevant or misleading content from commits whose changes aren't even in the diff.
This may fail for various reasons:
gh api repos/meksys-dev/mekara --method PATCH --field allow_auto_merge=true, then retry.Wait 10 seconds for CI checks to kick off, then wait for them to pass: sleep 10 && gh pr checks <pr-number> --watch.
Once checks pass, the PR should auto-merge. Verify the PR state with gh pr view <pr-number> --json state to confirm it merged (expect {"state":"MERGED"}). If the PR state is unexpected, wait to confirm next steps with the user instead of continuing.
Run cd ../main && git pull to update our local version of main
Update dependencies on main after the merge: run cd ../main && poetry install --with dev and cd ../main && pnpm --dir docs/ install --frozen-lockfile. This ensures the main environment is in sync with any new dependencies that were added during this PR.
Run /teardown-worktree to remove the virtual environment, delete the remote branch if it exists, and remove the worktree directory and local branch.