adopt

adopt is a command for Claude Code from koolamusic/claudefiles. It costs 38 tokens per session (2,733 once invoked), scanned A, original, MIT.

A command that presents selected memory fragments from an archived Studio workspace and lets the user copy them into local Claude memory. Claude memory is the local information used to retain project context between sessions.

In plain words
What is it for?
Use it to review memory snapshots by host or date, choose which fragments to adopt, and safely add them to the local memory directory.
Why use it?
Useful context from another computer can otherwise remain isolated in archived snapshots. Per-fragment confirmation and backups help prevent unwanted or irreversible overwrites.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; positional $N argument.

Part of the studio plugin — 4 commands shipped together

Good fit Use it to review memory snapshots by host or date, choose which fragments to adopt, and safely add them to the local memory directory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/koolamusic/claudefiles/adopt
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.

Clone the repo
git clone --depth 1 https://github.com/koolamusic/claudefiles

Made for: Claude Code.

Or install studio, the plugin that ships this one along with the rest of its 4 commands.

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 adopt

README.md
[![agentmods](https://agentmods.dev/badge/commands/koolamusic/claudefiles/adopt/github.svg)](https://agentmods.dev/commands/koolamusic/claudefiles/adopt)
Your own site
<a href="https://agentmods.dev/commands/koolamusic/claudefiles/adopt"><img src="https://agentmods.dev/badge/commands/koolamusic/claudefiles/adopt/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 adopt

Your own site · 80×15
<a href="https://agentmods.dev/commands/koolamusic/claudefiles/adopt"><img src="https://agentmods.dev/badge/commands/koolamusic/claudefiles/adopt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00038 $0.02733
Opus 5.5 $0.00015 $0.01093
Sonnet 5.5 $0.00008 $0.00547
Haiku 4.5 $0.00004 $0.00273

Measured 3mo ago against content hash fbaebcf3d7d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adopt scanned grade A with 0 findings 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 3mo ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/studio/commands/adopt.md · 141 lines

How it starts

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

Overview

Bring cross-machine Claude memory into the local memory dir. The archive at <workspace>/memory/archive/<host>/<iso>/ is read-only reference; this command presents candidates, the user picks, the command copies (backing up overwrites). Never writes without per-fragment confirmation.

Arguments

  • --host <name> — restrict enumeration to a single host (default: all hosts).
  • --since <YYYY-MM-DD> — restrict to snapshots from this date forward (UTC).
  • --all — skip the latest-per-host reduction and consider every snapshot. Rarely needed.

Steps

  1. Resolve workspace and config.
    • Read .workspacerc from pwd (the project root). If the file is missing, stop with [studio] not a studio-managed project (no .workspacerc); run /studio:setup first and exit 1.
    • Parse the JSON workspace field; expand a leading ~ via ${HOME}. Call this WORKSPACE.
    • If [[ ! -d "$WORKSPACE" ]], stop with [studio] workspace dir not found: $WORKSPACE and exit 1.
    • Read ${WORKSPACE}/studio.yaml. Extract (using yq):
      archive_dir=$(yq eval '.memory.archive_dir // "memory/archive"' "${WORKSPACE}/studio.yaml")
      RAW_SOURCE=$(yq eval '.memory.source' "${WORKSPACE}/studio.yaml")
      default_filter=$(yq eval '.adoption.default_filter // "latest-per-host"' "${WORKSPACE}/studio.yaml")
      preview_chars=$(yq eval '.adoption.preview_chars // 200' "${WORKSPACE}/studio.yaml")
      backup_on_overwrite=$(yq eval '.adoption.backup_on_overwrite // true' "${WORKSPACE}/studio.yaml")
      backup_suffix=$(yq eval '.adoption.backup_suffix // ".local-backup-{iso}"' "${WORKSPACE}/studio.yaml")
      
    • If preview_chars is 0 or negative, treat it as 200 silently.
    • Derive PROJECT_HASH from pwd. ${PROJECT_HASH} is expanded by this command, not by Claude Code's plugin loader. The two-stage sed pipeline is the canonical derivation:
      PROJECT_HASH=$(pwd | sed 's|/|-|g' | sed 's|\.|-|g')
      
    • Expand memory.source with PROJECT_HASH and ~ to produce LOCAL_MEMORY:
      LOCAL_MEMORY="${RAW_SOURCE//\$\{PROJECT_HASH\}/$PROJECT_HASH}"
      LOCAL_MEMORY="${LOCAL_MEMORY/#\~/$HOME}"
      

Read the full file on GitHub · 141 lines

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. 3mo ago First seen · 141 lines · 38 tokens per session scan A fbaebcf3d7d6

Subscribe to this mod's changes

adopt is a command published in the GitHub repository koolamusic/claudefiles (118 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 2,733 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

adopt compared with commands from other repositories

adopt next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
adoptkoolamusic/claudefilesCommand118yesterdayMITA38Claude Code
minutes-ideassilverstein/minutesCommand1.6ktodayMITA48Claude Code, OpenCode
learnReflexioAI/claude-smartCommand798todayApache-2.0A14Claude Code
memory-storeverygoodplugins/mcp-automemCommand67todayMITA10Claude Code
analyze-contextRohiRIK/OpenLtmCommand313d agoMITA39Claude Code
recallnaimkatiman/continuous-improvementCommand11yesterdayMITA44Claude Code
cc-memoryTheLobbi/claudeCommand221mo agoMITA0Claude Code