yd-claude-auth-sync

yd-claude-auth-sync is a skill for Claude Code from LeeYudok/agents-scaffold. It costs 127 tokens per session (1,246 once invoked), scanned B, original, MIT.

A tool for copying a Claude Code login from one computer to registered computers or servers over SSH. It transfers only the specified Claude authentication value without displaying the token.

In plain words
What is it for?
Use it to synchronize Claude Code authentication after logging in on one computer, preview the target hosts, and update their credentials securely.
Why use it?
It avoids logging in separately on every machine while reducing the chance of exposing credentials in terminal output or logs. Other stored authentication values are left in place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the yd-skills-personal plugin — 9 skills shipped together

Good fit Use it to synchronize Claude Code authentication after logging in on one computer, preview the target hosts, and update their credentials securely.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeyudok/agents-scaffold/yd-claude-auth-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeeYudok/agents-scaffold --skill yd-claude-auth-sync
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/agents-scaffold

Made for: Claude Code.

Or install yd-skills-personal, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for yd-claude-auth-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-claude-auth-sync/github.svg)](https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-claude-auth-sync)
Your own site
<a href="https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-claude-auth-sync"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-claude-auth-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for yd-claude-auth-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-claude-auth-sync"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-claude-auth-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00127 $0.01246
Opus 5.5 $0.00051 $0.00498
Sonnet 5.5 $0.00025 $0.00249
Haiku 4.5 $0.00013 $0.00125

Measured today against content hash 2412360b04bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

yd-claude-auth-sync scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/sync_auth.py, tests/test_sync_auth.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 ~/.config/yd-claude-auth-sync/hosts
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/yd-skills-personal/skills/yd-claude-auth-sync/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

yd-claude-auth-sync

역할

Claude Code 를 여러 호스트에서 쓸 때, 한 곳에서 로그인하면 나머지가 같은 로그인을 쓰게 만든다. 원본은 지금 PC 이고 대상은 사용자가 등록한 호스트다.

토큰을 다루는 스킬이다. 아래 위생 규칙이 기능보다 먼저다.

위생 규칙

  • 토큰 값을 화면·로그·argv 에 내지 않는다. 스크립트는 토큰을 ssh 표준입력으로만 넘긴다. 확인할 때도 값 대신 구독 종류·만료 시각·파일 크기만 본다.
  • security ... -w·cat .credentials.json 을 단독으로 실행하지 않는다. 출력이 그대로 대화에 남는다. 필요하면 파이프 안에서 JSON 키 이름만 뽑는다.
  • 옮기는 값은 claudeAiOauth 하나다. 키체인에는 MCP 서버 로그인(mcpOAuth)도 함께 있는데, 이 PC 전용이라 옮기지 않는다. 대상 파일에 있던 다른 키는 그대로 둔다.
  • 호스트 목록은 저장소 밖에 둔다. 이 저장소는 공개다. 호스트 이름·주소·사용자 경로를 스킬 문서나 커밋에 적지 않는다.
  • 사용자가 토큰을 채팅에 붙여 넣으면 쓰지 말고, 다시 발급하라고 권한다.

준비 (처음 한 번)

호스트 목록 파일을 만든다. 한 줄에 ssh 별칭 하나다. # 뒤는 주석이다.

mkdir -p ~/.config/yd-claude-auth-sync
$EDITOR ~/.config/yd-claude-auth-sync/hosts   # 별칭을 한 줄씩
chmod 600 ~/.config/yd-claude-auth-sync/hosts

경로는 YD_CLAUDE_AUTH_HOSTS 로 바꿀 수 있다. 각 별칭은 ssh <별칭> 이 비밀번호 없이 되어야 한다(스크립트는 BatchMode=yes 로 접속한다).

워크플로

1. 원본 확인

python3 <skill>/scripts/sync_auth.py --dry-run

원본 요약(구독 종류, access token 만료 시각)과 대상 호스트를 보여 준다. 원본은 macOS 면 키체인 Claude Code-credentials, 리눅스면 ~/.claude/.credentials.json 이다. 원본이 없으면 이 PC 에서 claude 로 먼저 로그인한다. 로그인은 브라우저 승인이 필요하므로 사용자가 직접 한다.

2. 맞추기와 확인

python3 <skill>/scripts/sync_auth.py --verify
python3 <skill>/scripts/sync_auth.py --host <별칭> --verify   # 한 호스트만
python3 <skill>/scripts/sync_auth.py --verify-only            # 쓰지 않고 확인만

호스트마다 결과가 한 줄씩 나온다.

  • same — 이미 같은 로그인이다. 아무것도 쓰지 않는다.
  • updated (backup .credentials.json.bak-<시각>) — 기존 파일을 시각 접미사로 백업하고 새로 썼다. 새 파일은 권한 600 이고, 임시 파일에 쓴 뒤 바꿔 끼워 중간에 끊겨도 깨진 파일이 남지 않는다.
  • verify ok — 그 호스트에서 claude -p 가 응답했다. claude 없음 이면 그 호스트에 설치부터 한다.

하나라도 실패하면 종료 코드는 1 이다. 실패한 호스트는 별칭과 ssh 접속부터 확인한다.

한계

  • 같은 refresh token 을 여러 호스트가 나눠 쓴다. access token 이 만료되면 먼저 갱신한 호스트가 새 refresh token 을 받는다. 나머지는 로그인이 풀릴 수 있다. 그러면 갱신한 호스트를 원본으로 다시 돌리거나, 원래 PC 에서 다시 로그인하고 돌린다.
  • 갱신 충돌을 피하려면 claude setup-token 으로 1년짜리 토큰을 받아 호스트마다 CLAUDE_CODE_OAUTH_TOKEN 으로 주는 방법이 있다. 토큰 발급은 브라우저 승인이 필요해 사용자가 직접 한다. 이 스크립트는 그 경로를 다루지 않는다.
  • 대상은 파일로 인증을 읽는 호스트(리눅스)다. 대상이 macOS 면 claude 가 키체인을 읽으므로 파일을 써도 반영되지 않는다.
  • 원격에 python3 가 있어야 한다. 병합 스크립트가 원격에서 돈다.

Read the full file on GitHub · 71 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 71 lines · 127 tokens per session scan B 2412360b04bc

Subscribe to this mod's changes

yd-claude-auth-sync is a skill published in the GitHub repository LeeYudok/agents-scaffold (36 stars, last pushed today), licensed MIT. It adds 127 tokens to every session and 1,246 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.