auth-environments
Skill80 starsChanged 26 days agoApache-2.0View on GitHub
Sign Claude Code in to a chosen Claude subscription on every linked T3 fleet host (grok-bot, beep-worker, dankserver, tbk-worker, tom-pc-1-wsl). Use when a Claude account hits its weekly limit, when `bun run beep accounts` shows the fleet's account used up, or on `/auth-environments`. Opens each host's OAuth page and a masked KDE code dialog together and verifies the admitted account.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- explorations/AGENTS.mdAGENTS.md
- adhdSkill
- alchemy-domainSkill
- alchemy-providerSkill
- atom-reactivity-specialistSkill
- browser-qa-loopSkill
- closeoutSkill
- codex-findingsSkill
- crispenSkill
- delete-commentSkill
- effect-first-developmentSkill
- exploreSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- jsdoc-annotation-specialistSkill
- motion-evidence-reviewSkill
- onepassword-secret-refsSkill
- ontology-architectSkill
- ontology-conceptualizerSkill
- ontology-curatorSkill
- ontology-foundational-auditorSkill
- ontology-mapperSkill
- ontology-requirementsSkill
- ontology-scoutSkill
- ontology-validatorSkill
- operator-handoffSkill
- orchestrateSkill
- plasma-sensitive-entrySkill
- portlessSkill
- qa-session-opsSkill
- quality-review-fix-loopSkill
- reflectSkill
- remote-development-agentsSkill
- schema-first-developmentSkill
- shadcnSkill
- sparql-expertSkill
- teachSkill
- turborepoSkill
- unslopSkill
- update-harnessesSkill
- yeetSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Run it in the foreground with a long timeout (about 25 minutes).
- Very specific: line 73
Add a newly linked host to HOSTS in the script with its canonical wrapper.
- Distinctive: line 74
Never put IPs, tailnet names or environment ids here: the repository is public.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Auth environments
Moves the Claude Code login on the fleet hosts to an account with quota left. Claude only: it is the one provider with several subscriptions. The script does the SSH, OAuth and code handoff. You pick the account and watch the result.
1. Pick the account
bun run beep accounts # weekly headroom per Claude account
bun .claude/skills/auth-environments/scripts/auth_env.ts statusstatus lists the account each host is signed in to now. A host that cannot
be reached within the 10 s ssh connect timeout prints [host] unreachable:
<reason>, shows unreachable in the summary, and makes the run exit 1; the
other hosts are still checked. Choose the account
with the most weekly headroom; if it is not obvious, ask the operator with
AskUserQuestion. Leave the local DankStation login alone unless the operator
asks: a local switch is plain claude auth login.
The browser decides the account. The OAuth page admits whichever claude.ai
account the default browser is signed in to; --email is only a hint. Before
the login run, tell the operator which account the browser must hold. If it
holds a different one, they either switch it or pick that account instead.
2. Log in
bun .claude/skills/auth-environments/scripts/auth_env.ts login --email <account>Run it in the foreground with a long timeout (about 25 minutes); it serializes
hosts. Name the hosts or pass --force to limit or repeat the run. For each
host it:
- opens a 1-hour per-host SSH ControlMaster (socket
cm-auth-<host>) through the host's canonical wrapper. YubiKey hosts need one touch per hour, and the script says when. Initializes the dankserver agent if it is missing; - skips a host already on the account;
- starts
claude auth login --claudeaiin a remote PTY and, the moment the URL appears, opens the browser tab and the masked KDE dialog together (plasma-sensitive-entry pipe helper). The operator authorizes and pastes the code into the dialog, and the code goes only to the remote PTY; - reopens both after a rejected code (three attempts in all) and stops on cancel or timeout;
- re-reads
claude auth statusand prints a summary, flagging any host that landed on a different account than requested.
Announce before the run: "a browser tab and a KDE dialog will open per host; touch the YubiKey when it blinks". Never ask for the code in chat.
3. After
- A host flagged
expected <account>signed in with the browser's account. Fix the browser session and rerun with--force <host>. - Running Claude sessions on a host may hold the old token. New T3 threads and turns pick up the new login.
- Logins last about 30 days (
loginExpiresAt); expect to rerun this skill. - Add a newly linked host to
HOSTSin the script with its canonical wrapper. Never put IPs, tailnet names or environment ids here: the repository is public. The routes are in remote-development-agents.
Verification
bun test ./.claude/skills/auth-environments/scripts/auth_env.test.tsDoes 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.

