yd-agents-mem

yd-agents-mem is a skill for Claude Code, Codex from LeeYudok/doksam-skills. It costs 171 tokens per session (2,081 once invoked), scanned B, original, MIT.

A backup and restore workflow for coding-agent memory, instructions, skills, agent files, and settings. It mirrors these files between a computer and a GitLab repository so they can be shared or restored on another machine.

In plain words
What is it for?
Use it after changing global instructions, project memory, skills, agents, settings, or hooks; to pull changes from another host; or to restore the setup on a new machine.
Why use it?
It prevents important agent configuration from being lost or staying different across hosts. It also provides a way to receive changes made on another machine.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Codex.

Good fit Use it after changing global instructions, project memory, skills, agents, settings, or hooks; to pull changes from another host; or to restore the setup on a new machine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeyudok/doksam-skills/yd-agents-mem
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/doksam-skills --skill yd-agents-mem
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/doksam-skills

Made for: Claude Code, Codex.

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-agents-mem

README.md
[![agentmods](https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-agents-mem/github.svg)](https://agentmods.dev/skills/leeyudok/doksam-skills/yd-agents-mem)
Your own site
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/yd-agents-mem"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-agents-mem/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-agents-mem

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/yd-agents-mem"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-agents-mem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,081 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.00171 $0.02081
Opus 5.5 $0.00068 $0.00832
Sonnet 5.5 $0.00034 $0.00416
Haiku 4.5 $0.00017 $0.00208

Measured 12d ago against content hash 25b337c5a5ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

yd-agents-mem 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/scan_secrets.py, tests/test_scan_secrets.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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

ln -sfn ~/.agents/skills/find-skills ~/.gemini/config/skills/find-skills
skills/yd-agents-mem/SKILL.md · 108 lines

How it starts

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

yd-agents-mem — 에이전트 자산 백업

에이전트 4종(claude·codex·gemini·antigravity)의 메모리와 설정을 agents-mem 레포에 호스트별로 미러한다. 이 스킬은 언제 무엇을 돌리는지만 정한다. 동작 원리와 디렉터리 신뢰 등급의 원본은 레포의 CLAUDE.md 다. 둘이 어긋나면 레포가 옳다.

항목 값
레포 전역 지침(~/.claude/CLAUDE.md)의 agents-mem 항목이 가리키는 GitLab 레포
로컬 경로 그 레포의 클론 (아래 명령의 $AGENTS_MEM_DIR)
미러 위치 hosts/<이 호스트>/ — 호스트명은 AGENTS_MEM_HOST → LocalHostName → hostname -s
전역 지침 공통본 shared/claude/global/ (CLAUDE.md·infra-.md·ref-.md, 3-way 동기화)
상시 이슈 agents-mem 레포의 "메모리 미러 동기화(상시)" 이슈

언제 돌리나

상황 할 일
전역 지침(~/.claude/CLAUDE.md·infra-*.md·ref-*.md)을 고쳤다 동기화 + 커밋
프로젝트 메모리(~/.claude/projects/*/memory/)를 추가·수정했다 동기화 + 커밋
전역 스킬·에이전트·settings.json·훅을 바꿨다 동기화 + 커밋
다른 호스트에서 전역 지침을 바꿨다고 들었다 git pull 후 동기화
새 머신이다 복원 (아래)

세션 끝에 몰아서 하지 않는다. 고친 직후 돌려야 다른 호스트·다른 에이전트가 바로 받는다.

동기화

레포 루트에서 실행한다.

cd "$AGENTS_MEM_DIR"
git pull -q
scripts/sync_memory.sh --dry-run     # 무엇이 바뀌는지 먼저 본다
scripts/sync_memory.sh
git status --short | head -30
  • sync_memory.sh 는 먼저 sync_global.sh 로 전역 지침을 공통본과 3-way 로 맞추고, 이어서 자기 호스트 디렉터리만 미러한다. 충돌 경고가 나오면 멈추고 해당 파일을 사용자에게 보여준다. 양쪽 다 그대로 남아 있으므로 손으로 합친다.
  • 원천 어디에도 없는 파일은 경고만 하고 지우지 않는다. 미러가 유일본일 수 있다. 진짜 지울 것인지는 사용자가 정한다.
  • 심링크 자산(doksam-skills 를 가리키는 스킬·에이전트)은 내용을 복사하지 않고 links.tsv 에 대상 경로만 남긴다. 스킬 내용의 원본은 doksam-skills 레포다.

커밋

  1. 시크릿 스캔을 먼저 한다. 걸리면 커밋하지 않고 멈춘다. 걸린 줄을 출력하지 않는다 — 진짜 토큰이면 값이 터미널과 로그에 남는다. 건수와 파일 이름만 본다.

    git add -- hosts/<호스트> shared
    python3 <스킬경로>/scripts/scan_secrets.py --staged
    

    스캐너는 스테이징된 추가 줄만 보고 파일:줄 [패턴] 과 건수만 낸다. 자격증명 파일 (oauth_creds·auth.json)과 다른 호스트 디렉터리(hosts/<다른 호스트>/·hosts/_legacy-shared/) 변경도 이름만으로 막는다. exit 0 이어야 커밋한다. exit 2 는 스캔을 못 했다는 뜻이라 통과가 아니다. 값이 <·$·( 로 시작하면 자리표시자나 변수 참조로 보고 넘긴다. 이미 커밋된 미러 전체를 점검할 때는 --tree hosts/<호스트> 를 쓴다. 이때도 줄 번호만 낸다.

    걸린 파일은 값을 출력하지 않는 방법으로 확인한다(키 이름만: grep -oE '^[A-Za-z_]+\s*[:=]'). 실제 시크릿이면 스테이징을 풀고 사용자에게 알린다. 이미 푸시했다면 회전(rotate)을 권한다.

Read the full file on GitHub · 108 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. 12d ago Changed 25b337c5a5ae
  2. 17d ago Changed · +4 lines 2f6658462386
  3. 18d ago First seen · 104 lines · 171 tokens per session scan B eeffaba03d06

Subscribe to this mod's changes

yd-agents-mem is a skill published in the GitHub repository LeeYudok/doksam-skills (14 stars, last pushed 6d ago), licensed MIT. It adds 171 tokens to every session and 2,081 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.

Related

Other skills, from other repositories