Repo Management
Intro
repo-management gives agents a provider-neutral workflow for routine
repository stewardship: inspect open issues and change requests, plan
safe actions, merge only ready work, commit local changes, and push.
Use it when the user asks to check all open issues or PRs, clean up a
repo, reconcile repository state, merge ready work, commit and push, or
perform repo-maintenance across providers.
Overview
The default workflow is plan-first and guarded:
- Call
detect_repo_provider(project_root, remote) to identify the
remote platform and available local CLI.
- Call
inspect_repo_state(project_root) to inspect branch, dirty
state, upstream, ahead/behind status, remotes, and provider support.
- Call
list_repo_issues() and list_repo_change_requests() for the
current provider when supported.
- Call
plan_repo_reconcile(scope) to build a concrete action plan.
- Apply only actions that pass the safety rules below. Use
run_repo_reconcile(dry_run=false) for guarded batch work, or call
the narrow mutating tools directly.
When the task involves branch policy, review judgment, or release work,
also follow the local git-workflow, code-review, and
release-semver skill guidance.
/pk-repo-reconcile is the user command for the same workflow. Without
extra arguments it means scope=all: local git state, open issues,
open change requests, and push readiness. Users may narrow it with
issues, prs, local, or push.
Provider support
| Provider |
Detection |
Read support |
Mutating support |
| GitHub |
github.com remotes |
gh issue list, gh pr list |
issue comments/close, PR merge, commit, push |
| GitLab |
gitlab.com or REPO_PROVIDER=gitlab |
capability report, local git |
local commit/push only |
| Gitea |
REPO_PROVIDER=gitea |
capability report, local git |
local commit/push only |
| Forgejo / Codeberg |
codeberg.org or REPO_PROVIDER=forgejo |
capability report, local git |
local commit/push only |
| Bitbucket Cloud |
bitbucket.org remotes |
capability report, local git |
local commit/push only |
| Azure DevOps |
dev.azure.com or visualstudio.com remotes |
capability report, local git |
local commit/push only |
| SourceHut |
git.sr.ht remotes |
capability report, local git |
local commit/push only |
Unsupported provider actions must return structured evidence instead
of pretending the work is complete. Agents should still commit and push
local changes through git when the repository policy allows it.
MCP tools
| Tool |
Purpose |
detect_repo_provider(project_root, remote) |
Detect remote host, owner/repo, provider, and local CLI availability. |
inspect_repo_state(project_root, include_remote) |
Inspect branch, dirty state, upstream, ahead/behind, remotes, and provider capabilities. |
list_repo_issues(state, limit) |
List open issues when the provider adapter supports it. |
list_repo_change_requests(state, limit) |
List open PRs/MRs/change requests when supported. |
plan_repo_reconcile(scope, dry_run) |
Produce the action plan and blockers without mutating. |
resolve_repo_issue(id, resolution, comment, close, confirmation) |
Comment and optionally close a supported issue. |
merge_change_request(id, method, auto_queue, confirmation) |
Merge or queue a supported ready change request. |
commit_local_changes(paths, message, checks) |
Run optional checks, stage paths, and commit local changes. |
push_current_branch(remote, branch) |
Push the current branch to its remote. |
run_repo_reconcile(dry_run, max_items, commit_message, push) |
Apply the guarded batch workflow. |
Gotchas
- Do not close issues without evidence. A close action needs a
linked merged change, a duplicate reference, a clear no-repro
disposition, or explicit user instruction.
- Do not merge drafts or WIP change requests. Draft state is a hard
blocker even if checks are green.
- Do not bypass branch protection. Never force-push, override
required reviews, skip required checks, or bypass merge queues.
- Do not assume GitHub-only behavior. Detect the provider first and
return unsupported evidence for adapters that are not configured.
- Do not treat listing as resolving. If issues or change requests
remain open, report the plan or blocker that remains.
- Do not push unrelated local work blindly. Inspect
git status
and commit only the intended paths or the current complete worktree
when the user asked for all local changes.
- Do not run mutating batch actions without a dry-run plan.
run_repo_reconcile(dry_run=false) should report the plan it applied
and every command result.
- Do not hide external auth failures. Missing
gh, glab, tea,
bb, az, or hut authentication is an actionable blocker, not a
successful no-op.
- Do not assume a reused gateway sees newly exported credentials. A
long-lived daemon cannot inherit later shell environment changes. Configure
an owner-only token file for refreshable GitHub CLI authentication.
Full reference
Safety policy
The skill is deliberately conservative:
- No force pushes.
- No direct API bypass of provider protection rules.
- No draft/WIP merge.
- No issue close without a comment or explicit resolution evidence.
- Mutating issue and merge tools require exact confirmation tokens:
close-issue:<id> and merge-change-request:<id>.
- Provider-specific actions are serialized by the caller; batch tools
return per-action evidence.
Scope names
plan_repo_reconcile() and /pk-repo-reconcile accept these scopes:
| Scope |
Includes |
all |
local, push, issues, and change requests |
local |
dirty state and commit readiness |
push |
ahead/behind and push readiness |
issues |
open issue listing and resolution candidates |
prs |
open pull requests, merge requests, or provider change requests |
change-requests |
Alias for prs |
Provider notes
GitHub is the first fully mutating adapter because the gh CLI is
common in aibox environments and enforces provider-side checks. GitLab,
Gitea, Forgejo/Codeberg, Bitbucket Cloud, Azure DevOps, and SourceHut
are first-class provider identities in the schema and detection layer;
their remote issue and change-request mutation paths return
unsupported until the matching local CLI or API credential contract is
implemented.
Long-lived gateway GitHub authentication
The gateway daemon and direct stdio servers continue to support normal gh
authentication through GH_TOKEN, GITHUB_TOKEN, GH_ENTERPRISE_TOKEN,
GITHUB_ENTERPRISE_TOKEN, and the GitHub CLI config or keyring.
For a long-lived daemon that must observe token rotation without a restart,
set PROCESSKIT_GITHUB_TOKEN_FILE to a regular file owned by the gateway user
with mode 0600. The file must contain only the token. GitHub Enterprise may
use PROCESSKIT_GITHUB_ENTERPRISE_TOKEN_FILE instead. The file is read
immediately before every gh call and injected only into that child process.
Direct token environment variables take precedence.
Token values are never added to MCP arguments, command results, diagnostics,
the gateway catalog, or tracked MCP configuration. A shared daemon has one
GitHub identity; use isolated daemons when clients require separate identities.
1---2name: repo-management3description: >4 Reconcile repository issues, pull requests, merge requests, local git5 state, commits, and pushes across GitHub, GitLab, Gitea, Forgejo,6 Codeberg, Bitbucket, Azure DevOps, and SourceHut.7metadata:8 source: https://skillmd.com/skills/projectious-work/repo-management9 processkit:10 apiVersion: processkit.projectious.work/v211 id: SKILL-repo-management12 version: "1.0.0"13 created: 2026-05-15T00:00:00Z14 category: devops15 layer: null16 provides:17 primitives: []18 mcp_tools:19 - detect_repo_provider20 - inspect_repo_state21 - list_repo_issues22 - list_repo_change_requests23 - plan_repo_reconcile24 - resolve_repo_issue25 - merge_change_request26 - commit_local_changes27 - push_current_branch28 - run_repo_reconcile29 assets: []30 commands:31 - name: pk-repo-reconcile32 args: "scope (optional: all, issues, prs, local, push)"33 description: "Plan and apply guarded repository reconciliation across issues, change requests, local commits, and pushes."34---3536# Repo Management3738## Intro3940`repo-management` gives agents a provider-neutral workflow for routine41repository stewardship: inspect open issues and change requests, plan42safe actions, merge only ready work, commit local changes, and push.43Use it when the user asks to check all open issues or PRs, clean up a44repo, reconcile repository state, merge ready work, commit and push, or45perform repo-maintenance across providers.4647## Overview4849The default workflow is plan-first and guarded:50511. Call `detect_repo_provider(project_root, remote)` to identify the52 remote platform and available local CLI.532. Call `inspect_repo_state(project_root)` to inspect branch, dirty54 state, upstream, ahead/behind status, remotes, and provider support.553. Call `list_repo_issues()` and `list_repo_change_requests()` for the56 current provider when supported.574. Call `plan_repo_reconcile(scope)` to build a concrete action plan.585. Apply only actions that pass the safety rules below. Use59 `run_repo_reconcile(dry_run=false)` for guarded batch work, or call60 the narrow mutating tools directly.6162When the task involves branch policy, review judgment, or release work,63also follow the local `git-workflow`, `code-review`, and64`release-semver` skill guidance.6566`/pk-repo-reconcile` is the user command for the same workflow. Without67extra arguments it means `scope=all`: local git state, open issues,68open change requests, and push readiness. Users may narrow it with69`issues`, `prs`, `local`, or `push`.7071### Provider support7273| Provider | Detection | Read support | Mutating support |74|---|---|---|---|75| GitHub | `github.com` remotes | `gh issue list`, `gh pr list` | issue comments/close, PR merge, commit, push |76| GitLab | `gitlab.com` or `REPO_PROVIDER=gitlab` | capability report, local git | local commit/push only |77| Gitea | `REPO_PROVIDER=gitea` | capability report, local git | local commit/push only |78| Forgejo / Codeberg | `codeberg.org` or `REPO_PROVIDER=forgejo` | capability report, local git | local commit/push only |79| Bitbucket Cloud | `bitbucket.org` remotes | capability report, local git | local commit/push only |80| Azure DevOps | `dev.azure.com` or `visualstudio.com` remotes | capability report, local git | local commit/push only |81| SourceHut | `git.sr.ht` remotes | capability report, local git | local commit/push only |8283Unsupported provider actions must return structured evidence instead84of pretending the work is complete. Agents should still commit and push85local changes through git when the repository policy allows it.8687### MCP tools8889| Tool | Purpose |90|---|---|91| `detect_repo_provider(project_root, remote)` | Detect remote host, owner/repo, provider, and local CLI availability. |92| `inspect_repo_state(project_root, include_remote)` | Inspect branch, dirty state, upstream, ahead/behind, remotes, and provider capabilities. |93| `list_repo_issues(state, limit)` | List open issues when the provider adapter supports it. |94| `list_repo_change_requests(state, limit)` | List open PRs/MRs/change requests when supported. |95| `plan_repo_reconcile(scope, dry_run)` | Produce the action plan and blockers without mutating. |96| `resolve_repo_issue(id, resolution, comment, close, confirmation)` | Comment and optionally close a supported issue. |97| `merge_change_request(id, method, auto_queue, confirmation)` | Merge or queue a supported ready change request. |98| `commit_local_changes(paths, message, checks)` | Run optional checks, stage paths, and commit local changes. |99| `push_current_branch(remote, branch)` | Push the current branch to its remote. |100| `run_repo_reconcile(dry_run, max_items, commit_message, push)` | Apply the guarded batch workflow. |101102## Gotchas103104- **Do not close issues without evidence.** A close action needs a105 linked merged change, a duplicate reference, a clear no-repro106 disposition, or explicit user instruction.107- **Do not merge drafts or WIP change requests.** Draft state is a hard108 blocker even if checks are green.109- **Do not bypass branch protection.** Never force-push, override110 required reviews, skip required checks, or bypass merge queues.111- **Do not assume GitHub-only behavior.** Detect the provider first and112 return unsupported evidence for adapters that are not configured.113- **Do not treat listing as resolving.** If issues or change requests114 remain open, report the plan or blocker that remains.115- **Do not push unrelated local work blindly.** Inspect `git status`116 and commit only the intended paths or the current complete worktree117 when the user asked for all local changes.118- **Do not run mutating batch actions without a dry-run plan.**119 `run_repo_reconcile(dry_run=false)` should report the plan it applied120 and every command result.121- **Do not hide external auth failures.** Missing `gh`, `glab`, `tea`,122 `bb`, `az`, or `hut` authentication is an actionable blocker, not a123 successful no-op.124- **Do not assume a reused gateway sees newly exported credentials.** A125 long-lived daemon cannot inherit later shell environment changes. Configure126 an owner-only token file for refreshable GitHub CLI authentication.127128## Full reference129130### Safety policy131132The skill is deliberately conservative:133134- No force pushes.135- No direct API bypass of provider protection rules.136- No draft/WIP merge.137- No issue close without a comment or explicit resolution evidence.138- Mutating issue and merge tools require exact confirmation tokens:139 `close-issue:<id>` and `merge-change-request:<id>`.140- Provider-specific actions are serialized by the caller; batch tools141 return per-action evidence.142143### Scope names144145`plan_repo_reconcile()` and `/pk-repo-reconcile` accept these scopes:146147| Scope | Includes |148|---|---|149| `all` | local, push, issues, and change requests |150| `local` | dirty state and commit readiness |151| `push` | ahead/behind and push readiness |152| `issues` | open issue listing and resolution candidates |153| `prs` | open pull requests, merge requests, or provider change requests |154| `change-requests` | Alias for `prs` |155156### Provider notes157158GitHub is the first fully mutating adapter because the `gh` CLI is159common in aibox environments and enforces provider-side checks. GitLab,160Gitea, Forgejo/Codeberg, Bitbucket Cloud, Azure DevOps, and SourceHut161are first-class provider identities in the schema and detection layer;162their remote issue and change-request mutation paths return163`unsupported` until the matching local CLI or API credential contract is164implemented.165166### Long-lived gateway GitHub authentication167168The gateway daemon and direct stdio servers continue to support normal `gh`169authentication through `GH_TOKEN`, `GITHUB_TOKEN`, `GH_ENTERPRISE_TOKEN`,170`GITHUB_ENTERPRISE_TOKEN`, and the GitHub CLI config or keyring.171172For a long-lived daemon that must observe token rotation without a restart,173set `PROCESSKIT_GITHUB_TOKEN_FILE` to a regular file owned by the gateway user174with mode `0600`. The file must contain only the token. GitHub Enterprise may175use `PROCESSKIT_GITHUB_ENTERPRISE_TOKEN_FILE` instead. The file is read176immediately before every `gh` call and injected only into that child process.177Direct token environment variables take precedence.178179Token values are never added to MCP arguments, command results, diagnostics,180the gateway catalog, or tracked MCP configuration. A shared daemon has one181GitHub identity; use isolated daemons when clients require separate identities.