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
In this repository18 other files it gives its agents.
- boettiger-lab-stackSkill
- cng-datasetsSkill
- disclose-tool-useSkill
- duckdb-spatialSkill
- gdal-spatialSkill
- github-rulesetsSkill
- html-figuresSkill
- human-communication-consentSkill
- k8s-never-force-deleteSkill
- nrp-kubernetesSkill
- nrp-s3Skill
- oci-artifactsSkill
- pod-resourcesSkill
- python-envSkill
- reproducible-reportsSkill
- stacked-pr-squash-mergeSkill
- stac-navigationSkill
- writing-voiceSkill
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
- Very specific: line 14
After the human has run gh-agent-unlock, use git and gh exactly as you normally would — credential injection and token refresh are fully …
- Very specific: line 27
After gh-agent-unlock, git push, git pull, gh pr create, gh issue comment, etc.
- Distinctive: line 28
No token exports, no per-repo setup, no credential flags needed.
- Very specific: line 66
Never embed tokens in remote URLs.
≈ “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.
Files
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 credentialsScope: 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.
| Operation | Why it fails | What to ask |
gh repo create | Requires org admin or user OAuth scope | "Please create the repo boettiger-lab/<name> on GitHub, then I'll push." |
| Changing repo visibility | Requires admin permission | Ask human to change via GitHub UI |
| Managing org members/teams | Org admin only | Ask 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.
| Field | Value |
| App name | boettiger-lab-llm-agent |
| App ID | 3047595 |
| Organization | boettiger-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 activeAuth 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.gitNever embed tokens in remote URLs; always use clean https://github.com/... URLs.
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
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.

