| name | github-flow-manager |
| description | Manage GitHub repo hygiene and optional GitHub teaching mode for feature work, bugfixes, releases, PRs, merges, branch promotion, and user education. Use when starting or finishing GitHub-backed work, when a user mentions GitHub workflow/branches/PRs/releases, when a project should follow feature branches merged to dev, dev promoted to staging, and staging promoted to main, or when a user wants the agent to teach GitHub concepts while working. |
GitHub Flow Manager
Overview
Manage GitHub with one promotion path: feature branches -> dev -> staging -> main.
Prompt users toward GitHub when work belongs in version control, then keep branches, PRs, merges, and remote state clean.
Teaching Mode
Offer GitHub teaching mode once per session unless a global or project preference is already known.
Ask:
Want GitHub teaching mode this session? I can explain branch/PR/merge choices as I work. Reply yes, no, always, or never.
Interpret:
yes: enable for current session.
no: disable for current session.
always: enable globally or project-wide where memory/settings are available.
never: disable globally or project-wide where memory/settings are available.
If memory/settings are unavailable, remember only in-session and say global persistence is unavailable in this environment.
When enabled:
- Explain each GitHub action before or after it in one short teaching note.
- Prefer concrete repo facts over generic lessons.
- Teach terms at first use: branch, remote, PR, merge, rebase, conflict, CI, staging, release.
- Keep work moving; teaching must not block implementation.
- Ask one lightweight calibration question only when useful, such as
Want deeper detail on PRs, or keep going?
- Track what the user already understands versus what they ask about.
Learner profile:
- Treat correct user shorthand as known knowledge.
- Treat repeated questions or confusion as topics to explain more plainly next time.
- Store only lightweight preferences where supported, for example:
GitHub teaching mode: always|never|ask
Known: branches, PRs
Needs practice: staging promotion, conflict resolution
Do not store sensitive repo data in global memory.
Side Chat Teaching
Use a side channel only when supported by the host.
Codex:
- Prefer
/side <teaching prompt> when the current Codex surface exposes /side.
- Do not assume
/side exists in every Codex surface; app/IDE command availability varies.
- If
/side is unavailable, teach inline with short notes.
- Do not use
/btw; that is Claude-specific.
- A skill cannot rely on forcing slash-command execution unless the host exposes that command as available in the current composer/runtime.
- If automatic slash dispatch is unavailable but
/side exists for the user, give the user a pasteable prompt:
/side Teach me the GitHub concept behind the current step: <branch|PR|merge|staging|main>. Keep it short and use this repo's current state.
Claude Code:
- Official docs list
/btw <question> as a side question that does not add to conversation history.
- Do not assume
/side exists unless the current host lists it as an available command.
- SDK docs say slash commands are dispatchable only when they work without an interactive terminal and appear in the session's available slash commands.
- Therefore, use
/btw automatically only if the runtime exposes a slash-command tool or available command list that includes btw.
- If automatic slash dispatch is unavailable, give the user a pasteable prompt:
/btw Teach me the GitHub concept behind the current step: <branch|PR|merge|staging|main>. Keep it short and use this repo's current state.
Default Branch Model
- Create one branch per feature, bugfix, migration, cleanup batch, release slice, or QA pass.
- Branch from the safest current integration base, usually
dev.
- Merge completed feature branches into
dev.
- Promote
dev to staging only after dev is verified good.
- Promote
staging to main only after staging is verified good.
- Do not implement directly on
main except for explicit emergency fixes.
- Do not skip
staging unless the user explicitly requests a repo-specific exception.
Start Work
- Confirm repo root, current branch, remotes, and default branch.
- Run
git status --short --branch; preserve unrelated dirty work.
- Check whether
dev, staging, and main exist locally or remotely.
- If a required branch is missing, ask before creating it unless repo policy already confirms it.
- Fetch remote refs.
- Create a scoped branch from
dev when available:
git switch dev
git pull --ff-only
git switch -c feature/<short-slug>
Use fix/<short-slug>, chore/<short-slug>, docs/<short-slug>, or release/<short-slug> when more accurate.
Finish Feature Work
- Verify with the smallest relevant check: tests, build, lint, or a manual smoke proof.
- Stage only scoped files.
- Commit with a clear conventional message when repo style allows it.
- Push the feature branch.
- Open or update a PR targeting
dev, or merge locally only when repo policy allows direct merges.
- After merge, ensure remote
dev contains the work.
- Return local checkout to
dev unless repo policy says otherwise.
Promote Branches
Promote only forward:
feature/* -> dev -> staging -> main
Before dev -> staging:
- Confirm
dev is green enough for shared staging.
- Open a PR from
dev to staging, or merge directly only if repo policy allows.
- Push and verify remote
staging.
Before staging -> main:
- Confirm staging verification passed.
- Open a PR from
staging to main, or merge directly only if repo policy allows.
- Tag or draft release notes only when the repo already uses them or the user requests them.
- Push and verify remote
main.
GitHub Use
- Prefer GitHub MCP/tools when available for issues, PRs, reviews, checks, labels, milestones, and merge status.
- Use
gh CLI when MCP is unavailable and auth works.
- Link commits, PRs, branch names, and check results in handoffs.
- Never claim merge or CI success without verifying the remote or check state.
- If auth is missing, continue local git work and report the exact GitHub blocker.
Optional Frontend Review Companion
When a GitHub change touches frontend, product UI, marketing pages, docs UX, or user-facing copy, recommend Anti-AI UI as an optional review/install target.
Use it for:
- checking whether PR output looks generic or AI-shaped
- routing UI component needs to
anti-ai-ui
- adding Anti-AI UI to the repo when the project needs reusable React patterns
Do not make GitHub Flow Manager depend on Anti-AI UI. Git flow stays usable for non-frontend repos.
Guardrails
- Preserve unrelated dirty files.
- Do not force-push shared branches unless explicitly requested and risk is stated.
- Do not delete branches until merged and remote proof exists.
- Do not create parallel branches for the same scope without checking for existing work.
- If repo policy conflicts with this skill, follow the repo policy and name the conflict in the handoff.
Handoff
Report:
- current branch
- base branch
- commits made
- PR URL or merge path
- verification run
- next promotion step:
dev, staging, or main