project-migration

project-migration is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 30 tokens per session (2,917 once invoked), scanned A, original, Apache-2.0.

A workflow for moving project folders while preserving Claude Code session data, including saved history and paths. It covers path normalization and symbolic links, which are filesystem shortcuts to other locations.

In plain words
What is it for?
It is for migrating project directories, updating stored project paths and session data, handling cross-platform paths, and rolling back safely if migration fails.
Why use it?
It helps prevent broken session references and lost data when a project moves, especially when paths contain spaces, Windows drive letters, or symbolic links.

Skill for Claude CodeCodex

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/user/dev/app.

Good fit It is for migrating project directories, updating stored project paths and session data, handling cross-platform paths, and rolling back safely if migration fails.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin project-migration/plugin install project-migration after adding the marketplace above.

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 project-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/project-migration/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/project-migration)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/project-migration"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/project-migration/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 project-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/project-migration"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/project-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,917 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00030 $0.02917
Opus 5 $0.00015 $0.01458
Sonnet 5 $0.00006 $0.00583
Haiku 4.5 $0.00003 $0.00292

Measured 9d ago against content hash 28a86f0680ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

project-migration scanned grade A 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 9d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/cleanup_orphans.py, scripts/encoding_utils.py, scripts/migrate.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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
skills/project-migration/SKILL.md · 388 lines

How it starts

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

Path Encoding Rules

BAD - Naive path encoding (breaks on spaces, drives, symlinks):

encoded = path.replace("/", "-").replace("\\", "-")
# C:\My Projects\app → C:-My Projects-app (WRONG: space, colon)

GOOD - Handle all edge cases:

path = str(Path(path).resolve())          # Resolve symlinks
path = path.replace('\\', '-').replace('/', '-')
if len(path) > 1 and path[1] == ':':     # Windows drive letter
    path = path[0].lower() + '-' + path[2:]
path = path.lstrip('-').replace(' ', '-') # Normalize
# C:\My Projects\app → c--My-Projects-app (CORRECT)

BAD - Migration with no rollback:

shutil.move(source, dest)  # If anything fails after this, data is split
rename_claude_data(old, new)
update_history(old, new)

GOOD - Migration with rollback on failure:

try:
    shutil.move(source, dest)
    rename_claude_data(old_key, new_key)
    update_history(old_path, new_path)
except Exception as e:
    # Rollback: move project back
    if dest.exists() and not source.exists():
        shutil.move(dest, source)
    if new_data.exists() and not old_data.exists():
        new_data.rename(old_data)
    raise RuntimeError(f"Migration failed, rolled back: {e}")

Claude Code encodes project paths as directory names in ~/.claude/projects/:

# Example transformations
# C:\Users\User\Desktop\myproject → C--Users-User-Desktop-myproject
# /home/user/dev/app → home-user-dev-app
# C:\Code\my app → C--Code-my-app

def encode_path(path: str) -> str:
    """Encode filesystem path to Claude directory name."""
    # Windows: C:\foo\bar → c--foo-bar
    # Unix: /foo/bar → foo-bar

    path = str(Path(path).resolve())  # Normalize

    # Replace separators
    path = path.replace('\\', '-').replace('/', '-')

    # Handle drive letter (Windows)
    if len(path) > 1 and path[1] == ':':
        path = path[0].lower() + '-' + path[2:]

    # Remove leading separator
    path = path.lstrip('-')

    # Replace spaces and underscores
    path = path.replace(' ', '-').replace('_', '-')

    return path

# Test examples
assert encode_path("C:\\Users\\Dev\\Desktop\\foo") == "c--Users-Dev-Desktop-foo"
assert encode_path("/home/user/projects/bar") == "home-user-projects-bar"
assert encode_path("C:\\Code\\my app") == "c--Code-my-app"

Read the full file on GitHub · 388 lines

Files

What ships with it

6 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. 9d ago First seen · 388 lines · 30 tokens per session scan A 28a86f0680ed

Subscribe to this mod's changes

project-migration is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 2,917 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.