Skip to content
Back to skills

Github Repos

ASecurity

Ask for the owner if not given: a team (`<org>/<team>`) or a user (`<user>`, optionally scoped to an `<org>`).

  • 261 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
toolsgogitapi

Works with

  • api

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add fredrikaverpil/dotfiles --skill github-repos --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Repos?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Repos
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fredrikaverpil-github-repos/badge)](https://www.skillsdirectory.com/skills/fredrikaverpil-github-repos)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: github-repos
description:
  Find GitHub repos owned by a user or a team, via team permissions, repo
  ownership or CODEOWNERS entries
---

# GitHub repos

Ask for the owner if not given: a team (`<org>/<team>`) or a user (`<user>`,
optionally scoped to an `<org>`).

## Team

Non-archived repos in `<org>` where `<team>` is admin, or where a CODEOWNERS
file lists `@<org>/<team>`:

```sh
{
  gh api --paginate orgs/<org>/teams/<team>/repos \
    --jq '.[] | select(.role_name == "admin" and (.archived | not)) | .full_name'
  gh search code '@<org>/<team>' --owner <org> \
    --filename CODEOWNERS --limit 1000 --json repository,path \
    --jq '.[] | select(.path | IN("CODEOWNERS", ".github/CODEOWNERS", "docs/CODEOWNERS")) | .repository.nameWithOwner'
} | sort -u
```

- `<team>` is the team slug, as in its URL.
- `role_name` is one of `admin`, `maintain`, `push`, `triage`, `pull`; widen
  the filter if the user asks for more than admin.

## User

Non-archived repos owned by `<user>`, or where a CODEOWNERS file in `<org>`
lists `@<user>`:

```sh
{
  gh repo list <user> --no-archived --limit 1000 \
    --json nameWithOwner --jq '.[].nameWithOwner'
  gh search code '@<user>' --owner <org> \
    --filename CODEOWNERS --limit 1000 --json repository,path \
    --jq '.[] | select(.path | IN("CODEOWNERS", ".github/CODEOWNERS", "docs/CODEOWNERS")) | .repository.nameWithOwner'
} | sort -u
```

- Drop the code search when no `<org>` is given; `--owner <user>` covers only
  repos the user owns, which the first command already lists.
- Add `--source` to `gh repo list` to leave out forks.

## Caveats

- `--filename` matches loosely (e.g. `codeowners_test.go`); hence the `path`
  filter.
- Code search matches text: `@<user>` also hits `@<user>-bot`, `@<org>/<team>`
  also hits `@<org>/<team>-leads`. Check doubtful hits in the CODEOWNERS file.
- Code search covers default branches only and may lag; the team and repo APIs
  are exact.
- Code search skips archived repos, so CODEOWNERS hits are already non-archived.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.