merge-queue
Enqueue a PR into the merge queue after CI is green and reviews are resolved.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Enqueue a PR into the merge queue after CI is green and reviews are resolved.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Write Markdown documentation that picks the right Diátaxis type (tutorial, how-to, reference, background), derives matching title and summary fragments, and passes a global-English and anti-slop polish. Trigger when the user asks to "draft a doc", "write a how-to", "draft a reference", "write a background page", "rewrite this in the house voice", "summary for this page", "title for this page", "polish for non-native readers", "this reads like AI", "remove AI tells / slop", "what type of doc is this", or "polish the README or landing page". Skip this skill for content-rule fixes (line length, heading hygiene, readability) — those are enforced by `mdsmith check`.
Security-review methodology specialized for mdsmith - the Go Markdown linter/formatter and its surfaces (CLI binary, the mdsmith lsp language server, the VS Code extension, the Obsidian plugin, the npm/PyPI/Homebrew/Flatpak distribution wrappers, and the Git merge-driver/pre-merge-commit hooks). Use this skill whenever the user asks for a security review, threat assessment, vulnerability audit, or PR security sign-off on mdsmith or any of its components - even when they name only one surface (e.g. review the VS Code extension, audit the LSP server, check this PR for security problems). Also use when reviewing code that parses untrusted Markdown, resolves the include and catalog path directives, statically lints the build recipe directive, or wires mdsmith into an editor or CI pipeline. Prefer this over a generic code review for anything mdsmith-related: it encodes the project's attack surface and current defenses so reviews stay consistent and accurate.
Build the mdsmith.dev Hugo site, serve it locally, and run the Playwright end-to-end suite or drive it interactively. The same `serve.sh` entrypoint is used by Playwright's webServer, the CI job, and this skill, so the site rendered here is byte-identical to what CI and production render. Trigger when the user asks to "test the site", "run playwright", "drive the install picker", "screenshot the homepage", "check the Windows command swap", or "run the e2e suite".
Push changes, monitor CI, and address review comments until the PR is clean. Run after creating or updating a PR, or when CI fails or reviewers leave comments.
Pick the next plan to start work on. Reads PLAN.md from origin/main, cross-references open PRs and existing branches, reads each non-completed plan's `depends-on:` frontmatter, filters out plans whose dependencies are not yet completed, splits the rest into "structurally important" (other plans depend on them) and "quick wins" (smaller-model plans), presents the top 4, then creates a branch, opens a draft PR, and dispatches an implementation Agent at the model the plan declares. Use when asked to "pick a plan", "start the next plan", "what plan should I work on", "begin a new plan", or "open a draft PR for plan N".
Run `mdsmith check` on Markdown files in the current workspace and surface lint diagnostics. Useful without the `mdsmith-lsp` plugin — gives the same findings in a text report. Trigger when the user asks to "check my markdown", "run mdsmith check", "lint these files", or "show lint errors".
| name | merge-queue |
| description | Enqueue a PR into the merge queue after CI is green and reviews are resolved. |
| user-invocable | true |
| allowed-tools | Bash(gh pr:*), Bash(gh run:*), Bash(gh api:*) |
| argument-hint | [PR number] |
Enqueue a PR into the label-driven merge queue
(jeduden/merge-queue-action).
Run each fenced Bash block as its own Bash call.
Do not combine commands into one shell invocation,
and do not prefix commands with inline environment
or shell variable assignments. Allowed-tools
matching checks the command prefix, so changing
that prefix can cause an otherwise-allowed gh
command to be blocked.
If a PR number was passed as an argument, use it. Otherwise detect it from the current branch:
gh pr view --json number -q '.number'
Note the number as $PR. Then get the repo
owner and name for API calls:
gh pr view "$PR" --json headRepositoryOwner \
-q '.headRepositoryOwner.login'
Note as $OWNER. Then:
gh pr view "$PR" --json headRepository \
-q '.headRepository.name'
Note as $REPO.
Verify the PR is eligible for the merge queue.
The base branch must be main and the PR must
not be cross-repository:
gh pr view "$PR" --json baseRefName,isCrossRepository \
-q '.baseRefName + " " + (.isCrossRepository | tostring)'
Stop if the base branch is not main or
isCrossRepository is true. The merge queue
workflow only runs for same-repo PRs targeting
main.
Confirm CI is green, no review threads are unresolved, and a high-effort code review leaves nothing to fix before enqueuing.
Check CI:
gh pr checks "$PR" --json name,state,bucket
gh pr checks returns two fields worth reading.
state is one of SUCCESS, FAILURE,
IN_PROGRESS, QUEUED, SKIPPING. bucket
collapses those into pass, fail, pending,
skipping.
Every check must show bucket = pass. Stop if
any check is pending, fail, or otherwise
non-pass.
Check for unresolved review threads:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
pageInfo { hasNextPage }
nodes { isResolved }
}
}
}
}' -f owner="$OWNER" -f repo="$REPO" -F pr="$PR"
Count entries where isResolved is false. Also
check pageInfo.hasNextPage — if true, there
are more than 100 threads and you must paginate
before trusting the count.
Stop if the count is greater than zero. Run
/gh-pr-fixup first to address the remaining
threads.
Run a final high-effort code review and auto-apply its fixes:
/code-review xhigh --fix
If the review changes any files, the branch is not
ready — run /gh-pr-fixup to commit, push, and
re-run CI before enqueuing. If it makes no changes,
the review is clean; proceed.
queue labelgh pr edit "$PR" --add-label queue
The action moves the PR through three labels:
| Label | Meaning |
|---|---|
queue | PR is waiting to be picked up |
queue:active | PR is in the current batch |
queue:failed | CI failed or merge conflict found |
Check the current label:
gh pr view "$PR" --json labels \
-q '.labels[].name'
Check the merge queue workflow run for the PR's head branch (repo-wide listing would return unrelated PRs when multiple are queued):
gh pr view "$PR" --json headRefName \
-q '.headRefName'
Note the branch as $BRANCH, then:
gh run list --workflow merge-queue.yml \
--branch "$BRANCH" --limit 1
If the label changes to queue:failed, read the
action's comment on the PR for the failure cause:
gh pr view "$PR" --comments
Fix the issue, push, then swap labels to re-enter the queue:
gh pr edit "$PR" --remove-label queue:failed
gh pr edit "$PR" --add-label queue
The PR is merged when gh pr view "$PR" shows
state MERGED. Report success and the merge
commit SHA:
gh pr view "$PR" --json state,mergeCommit \
-q '.state + " " + .mergeCommit.oid'