agentleFS
boettiger-labboettiger-lab/agent-skills/github-app-auth/SKILL.md

github-app-auth

Skill4 starsChanged 15 days agoBSD-3-ClauseView on GitHub

Authenticate to GitHub using the boettiger-lab-llm-agent GitHub App. Covers minting installation tokens from an age-encrypted private key, git push/pull via credential helper, gh CLI usage, and the full session workflow. TRIGGER when an agent needs to: push to GitHub, create/comment on PRs or issues, use gh CLI, or perform any GitHub API operation in the boettiger-lab org.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    After the human has run gh-agent-unlock, use git and gh exactly as you normally would — credential injection and token refresh are fully …

    line 14
  2. Very specific:

    After gh-agent-unlock, git push, git pull, gh pr create, gh issue comment, etc.

    line 27
  3. Distinctive:

    No token exports, no per-repo setup, no credential flags needed.

    line 28
  4. Very specific:

    Never embed tokens in remote URLs.

    line 66

≈ “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

GitHub App Authentication: boettiger-lab-llm-agent

Agents in the boettiger-lab org authenticate as the boettiger-lab-llm-agent GitHub App. After the human has run gh-agent-unlock, use git and gh exactly as you normally would — credential injection and token refresh are fully automatic.

Session commands (human runs)

gh-agent-unlock   # YubiKey PIN + touch; decrypts key to /dev/shm → all git/gh uses App identity
gh-agent-lock     # wipe key from /dev/shm → all git/gh reverts to personal gh credentials

Scope: The App only has access to boettiger-lab org. When unlocked, pushes to any other org (e.g. espm-288, UCB-R-Users) will fail. Run gh-agent-lock to revert to personal auth.

After gh-agent-unlock, git push, git pull, gh pr create, gh issue comment, etc. all just work. No token exports, no per-repo setup, no credential flags needed.

What the App cannot do — ask the human instead

The App token does not have admin/org-level permissions. Operations that require them will fail with a GraphQL or 403 error. When this happens, ask the human to do it directly — do not ask them to run gh-agent-unlock, as that won't help.

OperationWhy it failsWhat to ask
gh repo createRequires org admin or user OAuth scope"Please create the repo boettiger-lab/<name> on GitHub, then I'll push."
Changing repo visibilityRequires admin permissionAsk human to change via GitHub UI
Managing org members/teamsOrg admin onlyAsk human directly

In general: repo creation, deletion, and org settings always require the human.

App identity

Actions appear as boettiger-lab-llm-agent[bot] in the GitHub audit log.

FieldValue
App nameboettiger-lab-llm-agent
App ID3047595
Organizationboettiger-lab

Troubleshooting

Can't push to a non-boettiger-lab org (e.g. espm-288) — the App key is unlocked and intercepting auth. Run gh-agent-lock to revert to personal credentials. Check with:

ls /dev/shm/github-app-private-key.pem   # exists → locked; missing → personal auth active

Auth fails for boettiger-lab — ask the human to run gh-agent-unlock (requires physical YubiKey).

Stale token in remote URL — if a remote URL contains x-access-token:ghs_..., fix it:

git remote set-url origin https://github.com/boettiger-lab/repo.git

Never embed tokens in remote URLs; always use clean https://github.com/... URLs.

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.