Back to Skills
Dev ToolsFreev0.1.0
npx skills add lovstudio/gh-access-skill

lovstudio:gh-access

Grant, revoke, and audit collaborator access on private GitHub repos โ€” by GitHub username or email address โ€” with read-only as the safe default.

Use when you want to share a private repo with a client or contractor without making the repo public.

Install

npx skills add lovstudio/gh-access-skill

Or clone directly:

git clone https://github.com/lovstudio/gh-access-skill \
          ~/.claude/skills/lovstudio-gh-access

Prerequisites

  • gh CLI authenticated (gh auth status)
  • Token scopes: repo (always), admin:org (for org-owned repos)
  • You must be a repo admin (personal repo) or org owner / repo admin (org repo)

What it does

                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  Client input:  โ”‚  alice                                       โ”‚
  "give these    โ”‚  bob@example.com                             โ”‚
  folks access"  โ”‚  carol@startup.io                            โ”‚
                 โ”‚  typo-user                                   โ”‚
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Resolve each identifier      โ”‚
                    โ”‚  โ€ข username โ†’ verify exists   โ”‚
                    โ”‚  โ€ข email โ†’ search by email    โ”‚
                    โ”‚           โ†’ org invite fallbackโ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚  Show resolution table, confirm           โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚  PUT /repos/{owner}/{repo}/collaborators  โ”‚
                โ”‚  (permission=pull by default)             โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                          Invitation emails sent

Subcommands

ModeWhat it does
grantInvite one or more people as collaborators with a chosen permission.
revokeRemove collaborators (idempotent โ€” safe to re-run).
listShow active collaborators + pending invitations for the repo.

Permission levels

LevelEffectWhen to use
pull (default)Read code, clone, open/comment on issues and PRsClients, reviewers, most external access
triagepull + manage issues/PRs (label, close)Trusted external collaborators
pushWrite to non-protected branchesContractors actively contributing code
maintainpush + manage repo settings (except destructive)Senior contractors
adminFull controlRare โ€” requires explicit confirmation

The skill defaults to pull and requires an explicit request to escalate.

Usage examples

Invite one client by email (org repo)

User: ๆŠŠ acme/internal-dashboard ๅผ€็ป™ client@acme.com๏ผŒๅช่ฏป
โ†’ Skill resolves client@acme.com:
    - If they have a GitHub account with that email โ†’ invite by username
    - If not โ†’ send org invite by email (pending until they create / link account)
โ†’ Permission: pull

Batch invite mixed list

User: ็ป™่ฟ™ๅ‡ ไธชไบบๅผ€ lovstudio/handoff-bundle ็š„ๆƒ้™:
      alice
      bob@startup.io
      carol-github

โ†’ Skill resolves all three, shows a table, asks to confirm,
  then issues 3 PUT calls with permission=pull.

List who has access

User: ่ฐ็Žฐๅœจ่ƒฝ่ฎฟ้—ฎ lovstudio/handoff-bundle?
โ†’ Skill shows:
    Active:    alice (pull), carol-github (push)
    Pending:   bob@startup.io (pull, invited 2d ago)

Revoke

User: ๆŠŠ alice ไปŽ lovstudio/handoff-bundle ่ธขๅ‡บๅŽป
โ†’ Skill confirms, then DELETEs the collaborator.

Resolution statuses

When processing a mixed list, each identifier ends up in one of these buckets:

StatusMeaningAction
user_okUsername verified on GitHubInvite directly
email_to_userEmail resolved to a public GitHub accountInvite that username
email_invitedEmail had no public account, org invite sentRecipient accepts via email
email_no_accountEmail, no GitHub account, personal repoSkip โ€” ask user for username
user_not_foundUsername doesn't exist (typo?)Skip, report

Safety defaults

  • Read-only (pull) unless explicitly overridden
  • Always show a resolution table before writing
  • Ask to confirm before batch revokes
  • Escalation to admin / maintain requires explicit secondary confirmation
  • Writes are sequential so partial failures are legible in the report

License

MIT

githubcollaboratoraccessinviteprivate-repopermissions