Team Manager reference: Workflow
In the kit: .github/skills/team-manager/references/workflow.md.
-
This file as plain text, at
https://letitglow.app/ahg/kit/raw/.github/skills/team-manager/references/workflow.md - Everything in the kit
Copy it into ChatGPT or another assistant
Read the plain text first
Team Manager reference: Workflow
Part of the team-manager skill. Read this only when the task reaches these sections.
Workflow
Step 1: Identify User & Org Context
- Call #tool:mcp_github_github_get_me to get the authenticated username.
- Detect the current organization from the workspace repo's owner (e.g.,
accesswatchinaccesswatch/my-repo). - Load preferences from
.github/accessibility-agents/preferences.md(the user creates it fromdocs/reference/preferences.example.md) if available:- If that file does not exist, read
.github/agents/preferences.md(the older location) and suggest moving it: VS Code loads every.mdfile in.github/agents/as a custom agent. - Read
teams.onboarding_teams-- default teams to add new members to. - Read
teams.onboarding_repos-- default repos to add new members to. - Read
teams.offboarding_checklist-- any extra steps for departures. - Read
teams.role_policy-- preferred default role (memberormaintainer).
- If that file does not exist, read
- Fetch the list of teams in the org with
gh api orgs/{org}/teams --paginate. (#tool:mcp_github_github_get_teams returns only the teams one user belongs to.)
Step 2: Operation Modes
Mode A: Add Member to Team
Flow:
Identify the GitHub username and target team(s).
If team is ambiguous, list matching teams for selection.
Determine role: Member (default) or Maintainer (can manage team settings).
Check if user is already in the team.
Preview:
About to add @{username} to {org}/{team-name} as {role}. This grants them access to all repos this team can reach: - {repo-name} ({permission}) - {repo-name} ({permission}) Proceed? [Yes / Change role / Cancel]Add on confirmation. Confirm: "@{username} added to {team} as {role}."
Add to Multiple Teams:
- Show a checklist of teams with current membership status.
- Single confirmation for all additions.
- Execute and report.
Mode B: Remove Member from Team
Flow:
Identify the GitHub username and target team(s).
Show the user's current teams and roles.
Preview with warning:
About to remove @{username} from {org}/{team-name}. This will revoke their inherited access to: - {repo-name} (unless they have direct collaborator access) Note: Direct repo collaborator access is NOT affected by this -- use @repo-admin to remove that separately. Proceed? [Yes / Cancel]Remove on confirmation. Confirm with timestamp.
Mode C: Onboarding Workflow
When the user says "onboard @alice" or "set up @newdev":
Onboarding Checklist:
Onboarding @{username} to {org}
Step 1: Org Membership
[ ] Verify @{username} has a GitHub account
[ ] Send org invitation (if not already a member)
[ ] Wait for invitation acceptance
Step 2: Team Assignment
[ ] Add to: {`teams.onboarding_teams` from preferences, e.g., "engineering", "all-contributors"}
[ ] Role: Member (escalate to Maintainer only if team leadership)
Step 3: Repository Access
[ ] Teams above grant access to: {list repos with permissions}
[ ] Additional direct repo access (if needed beyond teams): {ask user}
Step 4: Verify
[ ] Confirm @{username} can see the expected repos
[ ] Point them to: CONTRIBUTING.md, SETUP.md, team docs
Step 5: Communication
[ ] Post welcome comment / mention in onboarding issue (optional)
- Walk through each step interactively.
- For steps that require action, perform them after confirmation.
- For steps that require information (which extra repos?), use #tool:ask_questions.
- Save the completed checklist as a record.
Mode D: Offboarding Workflow
When the user says "offboard @alice" or "remove @alice from everything":
Offboarding Checklist:
Offboarding @{username} from {org}
Step 1: Discover All Access
Searching...
Teams: {list all teams @username belongs to}
Direct repo collaborator access: {list repos with direct grants}
Open PRs authored: {count} -- needs attention
Open issues assigned: {count} -- needs reassignment
Pending reviews requested: {count} -- needs reassignment
Step 2: Remove Team Membership
[ ] Remove from: team-a, team-b, team-c
(This revokes inherited access to: {list repos})
Step 3: Remove Direct Collaborator Access
[ ] Remove from: repo-a, repo-b (direct grants)
Step 4: Handle Open Work
[ ] Reassign {N} open issues
[ ] Reassign {N} pending reviews
[ ] Note {N} open PRs (they'll stay open until closed/merged)
Step 5: Org Membership
[ ] Remove from organization (optional -- removes all remaining access)
This is irreversible without sending a new invitation.
- Discover all access before doing anything.
- Show the complete picture before removing anything.
- Single confirmation to proceed with team and repo access removal.
- Separate confirmation for org removal (more destructive).
- Export the offboarding record.
Safety: Never auto-close or auto-reassign issues/PRs -- only report them and let the user act.
Mode E: List Team Members
Flow:
- Fetch the team's members.
- Display in a table: username, role, GitHub profile link, last GitHub activity (approximate).
- Flag: teams with no maintainer, teams with only one member ("bus factor 1"), teams with members who haven't been active in 90+ days.
- Offer: "Add member, remove member, or change a role?"
Mode F: List All Teams
Flow:
- Fetch all teams in the org.
- Show: team name, member count, repos count, maintainer(s), permission level.
- Flag: empty teams (0 members), teams without a description, teams whose repos include very sensitive repos.
- Offer drill-down into any team.
Mode G: Team Permission Report
Flow:
- For a given team (or all teams), show every repo the team can access and the permission level.
- Cross-reference: are any repos missing from this team that should be there?
- Cross-reference: does this team have access to repos it shouldn't?
- Save the report as a workspace document.
Report Format:
# Team Permission Report -- {org} -- {date}
## Teams Overview
| Team | Members | Repos | Maintainer | Notes |
|------|---------|-------|------------|-------|
| engineering | 8 | 12 | @alice | |
| frontend | 4 | 5 | @bob | |
| infra | 2 | 8 | None | No maintainer |
## Per-Team Access
### engineering (8 members)
| Repository | Permission | Notes |
|------------|------------|-------|
| main-app | Write | |
| infra-config | Read | Consider: should eng have write? |
| billing-service | Write | |