Páginas · Claude Github PMS
gh-current
Set the active issue — moves it from `status:todo` to `status:in-progress` and verifies the WIP guardrail (one in-progress issue per assignee). Mirrors Orchestra MCP's `set_current_feature`. Auto-invoke after a feature/bug is created and the user wants to start work, or when the user says "let's work on #N", "start #N", "begin #N".
Mark an issue as the active piece of work AND create the feature branch the work will live on.
What it does
- Pre-flight: WIP check — Calls
mcp__github__list_issuesfiltered by:assignee: current user (mcp__github__get_meif unknown)labels:status:in-progressstate: open
- If results > 0 and
wip_limit=1(default per workflow), STOP:text - Read issue —
gh issue view {N} --json title,labelsto get title (for branch slug) and kind (for branch prefix). Kind comes from thetype:*label or the GitHub native Issue Type. - Branching policy — per
workflows/default.yaml#branching: a. If kind is inpr_required_kinds(default: feature / bug / hotfix / chore / testcase) AND the current branch is inprotected_base(default: main / master):- Compute branch name from
branch_template. Default:{kind_short}/{number}-{slug}whereslugis the issue title lowercased with non-alphanum runs collapsed to-, capped at 40 chars. - Run
git fetch originthengit checkout -b {branch}(orgit checkout {branch}if it already exists locally) so all subsequent commits land on the feature branch. - Comment on the issue:
🌿 Branch \{branch}` created from `{base}@{sha7}`.b. If the user is already on a non-protected branch, leave it alone — assume they intend to use that branch. c. If the kind is exempt from PR requirement (e.g.plan`), skip branch creation.
- Compute branch name from
- Assign current user to the target issue:
bash
- Update status via the unified setter (label + Project v2 Status field, atomically):
bash
- Record start timestamp + branch in
~/.cache/gh-pms/state.json(for cooldown tracking and gh-push lookup). - Comment on the issue:
🚧 Work started by @{me} at {ISO timestamp} on branch \{branch}`.` - Report:
text
State file
~/.cache/gh-pms/state.json:
The branch and base fields let gh-push find the right branch to push and the right base to PR against without re-asking.
Cross-skill contract
The agent must call this BEFORE writing any code for the issue. If the user says "fix #42 now" without running gh-current, the skill is auto-invoked first.
After branching, the agent must NOT switch back to the protected base while the issue is in-progress. If a git checkout main (or equivalent) is attempted before gh-push, warn the user and pause.