원클릭으로
merge-pr
Merge a GitHub PR, watch CI/CD pipeline, and check if publishable packages need a release.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Merge a GitHub PR, watch CI/CD pipeline, and check if publishable packages need a release.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
| name | merge-pr |
| description | Merge a GitHub PR, watch CI/CD pipeline, and check if publishable packages need a release. |
| disable-model-invocation | true |
| argument-hint | ["pr-number"] |
| allowed-tools | Bash(gh *, git *, curl *, sleep *), Read, Agent |
Merge PR #$ARGUMENTS, monitor the CI/CD pipeline, and flag if a package release is needed.
gh pr view $ARGUMENTS --json title,body,state,mergeable,reviewDecision,statusCheckRollup,headRefName,baseRefName
gh pr merge $ARGUMENTS --merge --delete-branch
Use --merge (merge commit) by default. If the PR is a single commit, --squash is also fine.
After merge, build-push.yml triggers on push to main. Watch it:
# Find the run triggered by this merge
sleep 5
gh run list --branch main --limit 1 --json databaseId,status,conclusion,name,headSha -q '.[0]'
Then watch it to completion:
gh run watch <run-id>
If the run succeeds: Report success. Tests passed and the merge is complete.
If the run fails:
gh run view <run-id> --log-failed
Each publishable package has its own tag prefix (see .github/workflows/publish.yml):
# CLI: last release and changes since
LAST_CLI_TAG=$(git tag -l 'arkeon-v*' --sort=-v:refname | head -1)
CLI_CHANGES=$(git diff --name-only "$LAST_CLI_TAG"..HEAD -- packages/arkeon/src/cli/ packages/arkeon/package.json | head -5)
# SDK: last release and changes since
LAST_SDK_TAG=$(git tag -l 'sdk-v*' --sort=-v:refname | head -1)
SDK_CHANGES=$(git diff --name-only "$LAST_SDK_TAG"..HEAD -- packages/sdk-ts/src/ packages/sdk-ts/package.json | head -5)
If any of these have changes, tell the user:
arkeon-v0.X.X or sdk-v0.X.X"publish.yml workflow fires on release.published and handles the rest automaticallyIf nothing changed, skip this step silently.
If the merged PR body contains Fixes #N, clean up the issue label:
# Extract issue number from PR body
ISSUE_NUM=$(gh pr view $ARGUMENTS --json body -q '.body' | grep -oP 'Fixes #\K\d+' | head -1)
if [ -n "$ISSUE_NUM" ]; then
gh issue edit "$ISSUE_NUM" --remove-label "in-review" 2>/dev/null || true
fi
This is best-effort — the issue gets closed automatically by GitHub via the Fixes keyword, but the label should be cleaned up too.
Check if a worktree exists for this PR's branch:
BRANCH=$(gh pr view $ARGUMENTS --json headRefName -q '.headRefName')
# Check common worktree patterns
ls -d .claude/worktrees/*/ 2>/dev/null | while read wt; do
WT_BRANCH=$(git -C "$wt" branch --show-current 2>/dev/null)
if [ "$WT_BRANCH" = "$BRANCH" ]; then
echo "Found worktree for this PR: $wt"
fi
done
If a worktree is found, ask the user if they want to clean it up:
git worktree remove <path>
Do NOT auto-remove — the user or another agent may still be using it.
Start the local development environment (embedded Postgres + Meilisearch + API) and run e2e tests.
Initialize a repo as an Arkeon knowledge base and build a knowledge graph from its documents.
Build, test, version-bump, and publish the arkeon npm package from main.
Find and create relationships between entities across different spaces in the graph.
Fix a GitHub issue in an isolated worktree, test, commit, and open a PR.
Review docs for staleness after feature work. Compare each doc against the codebase, flag stale content, and update or delete.
SOC 직업 분류 기준