원클릭으로
repo-setup
Refresh /workspace/repo and prepare the correct branch. Load this before any situation skill.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Refresh /workspace/repo and prepare the correct branch. Load this before any situation skill.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | repo-setup |
| description | Refresh /workspace/repo and prepare the correct branch. Load this before any situation skill. |
| license | Apache-2.0 |
| metadata | {"audience":"autonomous-agents"} |
The target repository is already cloned by the container runtime at
/workspace/repo. Work directly in that checkout — do not create git
worktrees or clone a second copy of the target repo. Each issue/PR gets its
own container, so /workspace/repo is already isolated.
Enter the repository and refresh refs:
cd /workspace/repo
git fetch --all --prune
Determine the branch name:
issue-<number>-<slug> (e.g. issue-42-fix-login)BRANCH=$(gh pr view <number> --json headRefName --jq .headRefName)
Preserve in-progress follow-up work. If /workspace/repo is already on
the intended branch and has uncommitted changes, keep them and skip branch
reset/checkout. The previous event may have left in-progress changes that the
current follow-up event needs to continue. If there are uncommitted changes
on a different branch, stop and inspect before switching — do not risk
carrying changes to the wrong branch or discarding work.
git status --short
git branch --show-current
Prepare the branch in /workspace/repo if step 3 did not already find
the right branch with in-progress changes:
New issue — create or reset the issue branch from the default branch:
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name)
git switch -C <branch> "origin/$DEFAULT_BRANCH"
Existing PR — check out the PR branch:
gh pr checkout <number>
If gh pr checkout fails, fall back to:
git fetch origin "$BRANCH:$BRANCH" 2>/dev/null || true
git switch "$BRANCH"
git pull --ff-only origin "$BRANCH" 2>/dev/null || true
Run all subsequent commands from /workspace/repo.
git reset --hard or git clean -fd when there are uncommitted
changes unless the situation skill explicitly determines those changes are
disposable.~/dev/...,
but the target repo for this issue/PR stays /workspace/repo.Diagnose and fix failing CI on a PR. Capped at 3 attempts. Load repo-setup first.
Resolve a GitHub issue end-to-end — explore, plan, implement, clean up, and open a draft PR.
Review a pull request. Self-fix on own PRs, post a review on others'. Load repo-setup first.
Review the current branch's changes against intent. Returns a structured list of findings the caller can hand to a fix-applier, or an empty list when there's nothing to address. Use this for both self-review of your own work and reviewing someone else's PR.
Apply review findings as the smallest code changes, then commit and push. Used on the bot's own PRs.
Triage and respond to comments on a PR. Fix if actionable, reply either way. Load repo-setup first.