agentleFS
a-novel-kita-novel-kit/stack/.agents/skills/check-access/SKILL.md

check-access

Skill2 starsChanged 4 days agoMITView on GitHub

Know what the operator's GitHub roles, tokens and accounts allow, check before an operation a base contributor may lack, and state what is missing instead of trying. Load before approvals, merges past a gate, releases, privileged labels, repository or org settings, secrets, Google Cloud, Bitwarden or Discord, and when a call fails with 403, 404 or a missing secret.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write lets anyone approve and label, but review-gate counts an approval, or a privileged label such as allow-dependency-change, only from a …

    line 36
  2. Distinctive:

    Write on an organization's project board, granted per project.

    line 44
  3. Distinctive:

    Run a check at the first operation that needs it, and reuse the answer for the session.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Check access

An agent acts with the developer's own gh token, secrets and accounts, so it holds exactly their access. Most members are developers, and many operations in these skills need more. Before such an operation, check that the developer holds what it needs. When they do not, tell them what is missing and who holds it, then stop. The gates are deliberate: never retry, borrow another credential, fork, switch tools or ask for a broader token scope to get past one.

Roles

Each role is a GitHub team per repository class: service, platform, infra, library, workflows or meta. A member joins the area teams they work in.

RoleTeamAdds
Developerdevelopers-<class>Write: push branches, open pull requests, label, dispatch workflows, re-run jobs
Opsdevelopers-infra and a Google accountProduction: gcloud reads, OpenTofu state, the services' namespaces, secret versions
Maintainermaintainers-<class>Maintain: approvals that review-gate counts
Ownerowners-<class>Admin: ruleset bypass, approve-pr on their own pull requests, the release environment
Corecore, owner of both organizationsAdmin everywhere, org settings and teams, Bitwarden, Discord admin

A role covers its class's repositories only; elsewhere the member reads. Every tier also holds Write on its org's bot-comment dispatcher, a-novel/.github or a-novel-kit/stack, so any member posts bot comments. Pull requests are for collaborators, so a developer opens them only where they can write, and a fork is refused. The stack repository is library class.

Write lets anyone approve and label, but review-gate counts an approval, or a privileged label such as allow-dependency-change, only from a maintainer, an admin or the [Agent] App. An agent never applies a privileged label: it records a reviewer's decision.

Core hands some access out one by one, whatever the role:

  • Tokens in a-novel secrets: DISCORD_READER_TOKEN, DISCORD_WRITER_TOKEN, and the service secrets a repository's .a-novel/secrets.yaml declares.
  • Write on an organization's project board, granted per project.
  • A planned downtime, which core schedules.

Each developer creates their own read:packages token for GitHub Packages, as the developer guide shows.

Check before acting

Run a check at the first operation that needs it, and reuse the answer for the session.

AccessCheckHolds when
Teamsgh api user/teams --jq '.[] | .organization.login + "/" + .slug'the team is listed
Role on a repositorygh api repos/<owner>/<repo> --jq .permissionspush, maintain or admin is true
Org ownergh api user/memberships/orgs/<org> --jq .roleadmin
Token scopesgh auth statusthe scope is listed
Local secreta-novel secrets lsthe id is listed
Packages tokengrep -q '//npm.pkg.github.com/:_authToken' ~/.npmrcit succeeds
Google Cloudgcloud auth list --filter=status:ACTIVE --format='value(account)'an @agorastoryverse.com account
Project boardgh api graphql -f query='{organization(login:"<org>"){projectV2(number:<n>){viewerCanUpdate}}}'true

A missing tool, such as gcloud, means the access is missing too. A scope is not a role: gh auth refresh -s admin:org helps an org owner only, and a 403 or a 404 from a missing role is no scope problem.

When access is missing

Tell the developer which role or grant the step needs, that they lack it, and who holds it. Hand the step over as a request to that holder, never as a command the developer cannot run: "needs a maintainer's review", "core cuts the release". When the developer asks for such a command, answer with what is missing instead. Carry on with the parts of the task that do not depend on the step.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.