account-and-team-context

$npx mdskill add github/github-mcp-server/account-and-team-context

Answer two questions before anything that depends on identity: who is acting, and what that account can actually see or change.

SKILL.md

.github/skills/account-and-team-contextView on GitHub ↗
---
name: account-and-team-context
description: "USE FOR: establishing who the authenticated account is, which organisations and teams it belongs to, who sits on a team, and who has write access to a repository. NOT FOR: finding an unfamiliar repository, or choosing what work to do next."
---

# Establishing whose account this is and what it reaches

Answer two questions before anything that depends on identity: who is acting, and what
that account can actually see or change.

## Sequence

1. **Resolve the acting account.** `get_me` returns the authenticated user. Its `login`
   is the value every later question is asked in terms of — "my pull requests", "issues
   assigned to me", "repositories I can push to" all mean that `login`.
2. **Resolve organisation membership** with `get_teams`. Called with no argument it
   returns the teams the authenticated account belongs to; pass `user` to ask the same
   about someone else, which only works for organisations the current credentials can
   already see.
3. **Expand a team into people** with `get_team_members`, using the organisation as
   `org` and the team's `team_slug`. The slug is the hyphenated form from the team's
   address, not its display name.
4. **Establish repository access** with `list_repository_collaborators`. Use
   `affiliation` to separate the populations: `direct` for people granted access on the
   repository itself, `outside` for collaborators who are not organisation members, and
   `all` for the combined view. The distinction matters because `all` includes people
   whose access comes from a team, who are invisible under `direct`.
5. **Resolve a name to an account** with `search_users` when you have a person and need
   their `login`. Qualify the `query` — a bare personal name matches widely.
6. **Say what you established, and what you could not.** An account's view of GitHub is
   bounded by its credentials, and a report that does not say so reads as complete.

## Decision points

- **"Me" is not a guess.** Any request phrased in the first person — my issues, my
  reviews, repositories I maintain — depends on `login`. Resolve it rather than
  inferring it from a repository owner or from earlier conversation.
- **Membership is not permission.** Being on a team says nothing on its own about a
  given repository; the team may have no grant there. Check access where access
  matters.
- **Absence is ambiguous.** A team or organisation missing from `get_teams` may not
  exist, or may simply be invisible to these credentials. Both are limited to
  organisations the current credentials reach, and neither can tell you which case you
  are in.
- **Names are not identities.** Display names collide and change; `login` does not.
  When a request names a person, resolve to a `login` before acting on it, and say
  which account you resolved to.

## Fields that matter

- `login` — the only durable identifier for an account. Report it alongside a display
  name whenever the two differ.
- `type` — distinguishes a user from an organisation. A great deal of confusion comes
  from treating an organisation as a person.
- `team_slug` versus a team's display name — only the slug addresses a team.
- `affiliation` — `direct` and `all` answer different questions, and quoting one as the
  other overstates or understates who can change the repository.
- `nextPage` — collaborator results are paginated. A large organisation's list is not
  the first page, and treating it as the whole set produces a confidently wrong answer
  about who has access.

## Confirm before acting on identity

Nothing here changes anything: all five are read-only. The care needed is about what is
done with the answer rather than about the calls themselves.

- **Confirm the person before acting on their behalf.** If a request names someone and
  the lookup returns more than one plausible account, ask which — do not pick the
  closest match and go on to assign, request, or mention them.
- **Membership lists are about people.** Report them for the question asked. Compiling
  a roster of an organisation because a lookup made it easy is not part of the task,
  and should be agreed before it is produced.
- **Do not narrate credentials.** Report what the account can reach; do not report the
  token, its scopes, or anything else about how access was obtained.

## Empty and failure cases

- **No teams returned** — the account belongs to none the credentials can see. Say
  exactly that. It is not the same as "the account belongs to no teams".
- **The team slug is wrong** — a display name was used in place of a slug. Re-derive it
  from the team's address rather than guessing a hyphenation.
- **Collaborators are refused** — listing collaborators needs push access to the
  repository. Report that the access question could not be answered, rather than
  reporting an empty list, which reads as "nobody has access".
- **A person search returns nothing** — the name may be a display name only, the account
  may have been renamed, or it may not exist. Say which you could not distinguish, and
  ask for a `login`.
- **A person search returns many** — do not choose. Present the candidates with enough
  to tell them apart and ask.

More from github/github-mcp-server

SkillDescription
codebase-explorationUSE FOR: understanding an unfamiliar repository and how it got that way — its layout, where a behaviour is implemented, and when and why a particular function or line last changed. NOT FOR: editing files, or assessing whether a project is healthy overall.
copilot-task-delegationUSE FOR: handing a piece of work to the Copilot coding agent — judging whether an issue is scoped tightly enough to delegate, launching it, and asking for an automated first-pass review of a proposed change. NOT FOR: doing the work directly, or reviewing what comes back.
discussion-participationUSE FOR: taking part in GitHub Discussions — finding the unanswered questions in a category, reading a thread in full, replying to it, and marking the reply that resolved it. NOT FOR: commenting on an issue or a proposed change, or working through a backlog.
issue-authoringUSE FOR: filing one clear bug report or feature request — checking it is not already reported, choosing its type and fields, breaking it into sub-issues, and giving it a title and body someone can act on. NOT FOR: working through an existing backlog, or discussing an open question with a community.
issue-backlog-triageUSE FOR: triaging a backlog of open GitHub issues — judging which are actionable, labelling and typing them, linking duplicates and parents, and closing what is dead. NOT FOR: writing one new issue, scheduling committed work, or reviewing pull requests.
label-scheme-managementUSE FOR: curating the label vocabulary a repository uses — adding ones it lacks, auditing which are actually applied, renaming and recolouring them, merging overlapping ones, and tidying away the unused. NOT FOR: applying an existing label to an issue, or deciding which issues matter.
notification-triageUSE FOR: working through a GitHub notification inbox — deciding what needs a reply, what to unsubscribe from, and what to mark read or done. NOT FOR: triaging a repository issue backlog, or answering review threads on one specific pull request.
project-planningUSE FOR: planning and updating work on a GitHub Projects board — reading fields and views, adding issues or pull requests as items, setting status and iteration, and posting a status update. NOT FOR: triaging a repository issue backlog, or preparing a release.
pull-request-authoringUSE FOR: taking a branch of work through to landed — opening the pull request, describing it, requesting reviewers, keeping it current with its base, and merging it once checks and approvals are in. NOT FOR: reviewing someone else's proposal, or acting on review comments left on yours.
pull-request-code-reviewUSE FOR: examining someone else's pull request and delivering a verdict — reading the diff in context, leaving line-anchored comments as a batch, and approving or requesting changes. NOT FOR: replying to review comments left on your own change, or opening and merging one.