ワンクリックで
mv-repo
Move a repo to a new directory. Handles venv, Claude Code project state, path references, and tmux sessions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Move a repo to a new directory. Handles venv, Claude Code project state, path references, and tmux sessions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
This skill should be used when the user asks to "commit and push", "commit push", "sync changes", "push changes", "commit and sync", or "update remote". Handles the full workflow of committing changes, pulling with rebase, and pushing to remote.
Sweep recent AI safety research from curated sources (Anthropic alignment science / red team, OpenAI, GDM, Apollo, Redwood, METR, FAR AI, Truthful AI, alphaxiv, arXiv) and surface items matching tracked topic terms (inoculation prompting, reward hacking, exploration hacking, metagaming, eval gaming, OOCR, scheming, alignment faking, sandbagging, etc.). Use when asked to "sweep AI safety", "what's new in alignment", "any recent papers on X", "weekly safety digest", or for staying current on AI safety literature.
Anthropic visual style for plots, diagrams, slides, and web. Use when creating any visual output that should have Anthropic's look-and-feel — matplotlib charts, TikZ diagrams, HTML/CSS, or presentations.
Catch LLM-fabricated citations in BibTeX files. Verifies arXiv/OpenReview entries against live metadata (titles, first authors), then guides manual verification of authorless prose claims. Use before submitting papers, after any LLM-assisted citation generation, or when a reference smells off.
Fact-check prose claims in slides, reports, PDFs, and papers — statistics, comparatives, attributions, causal claims, quotes. Two-pass extract-then-verify protocol with strict numerical precision and a doc-only mode. Use when the user asks to "check the claims in this deck", "fact-check this report", "audit this PDF", "verify the numbers in these slides", or before publishing/shipping any externally-facing document with quantitative claims. Complements `check-bib-references` (which handles BibTeX entries) — this skill handles the prose around them.
Log a one-line knowledge gap to the project's gaps.md file. Use when the user is surprised by Claude's answer, says "I didn't know that", "wait what", or wants to record a misconception they just discovered. Format "I assumed X but actually Y". Personal misconception log — much higher learning signal than feedback memories.
| name | mv-repo |
| description | Move a repo to a new directory. Handles venv, Claude Code project state, path references, and tmux sessions. |
Move one or more repos to a new parent directory, updating all path-dependent state.
Usage: /mv-repo <source>... <dest-dir>
Examples:
/mv-repo nudge bots/ — move nudge into bots//mv-repo nudge ambassador swordsmith bots/ — move multiple reposmv <source>... <dest>/
For each moved repo that has a .venv/:
.venvuv sync in the new locationpyproject.toml, skip (venv was manual — warn user)Rename directories in ~/.claude/projects/ that match the old path encoding.
Path encoding: absolute path with / replaced by -, leading -. Example:
/home/yulong/code/nudge → -home-yulong-code-nudge/home/yulong/code/bots/nudge → -home-yulong-code-bots-nudgeInclude worktree variants (dirs matching ${old_encoded}--*).
# For each repo, rename matching project dirs
# Strip trailing slash to avoid encoding artifacts
old_abs_path="${old_abs_path%/}"
new_abs_path="${new_abs_path%/}"
old_encoded="$(echo "$old_abs_path" | tr '/' '-')"
new_encoded="$(echo "$new_abs_path" | tr '/' '-')"
# Match exact dir and worktree variants (--*), not unrelated repos
for dir in ~/.claude/projects/${old_encoded} ~/.claude/projects/${old_encoded}--*; do
[ -d "$dir" ] || continue
new_dir="${dir/$old_encoded/$new_encoded}"
mv "$dir" "$new_dir"
done
Moving a repo breaks git worktree references in two places:
A. Main repo's worktree registry (.git/worktrees/*/gitdir):
git -C <new-path> worktree list
For each worktree:
git worktree prune removes it.claude/settings.json changes → safe to pruneB. Claude Code worktrees (.claude/worktrees/*/):
These moved with the repo but contain .git files (not directories) with absolute gitdir: paths pointing to the old location:
# .claude/worktrees/auto-heal/.git contains:
gitdir: /old/path/.git/worktrees/auto-heal
Fix both directions (use -F for fixed-string matching — paths contain . which is regex):
old_path="/old/path"
new_path="/new/path"
# Fix .claude/worktrees/*/.git → points to main repo's .git/worktrees/
for gitfile in <new-path>/.claude/worktrees/*/.git; do
[ -f "$gitfile" ] || continue
sd -F "$old_path" "$new_path" "$gitfile"
done
# Fix .git/worktrees/*/gitdir → points back to .claude/worktrees/
for gitdir_file in <new-path>/.git/worktrees/*/gitdir; do
[ -f "$gitdir_file" ] || continue
sd -F "$old_path" "$new_path" "$gitdir_file"
done
# Check for absolute commondir paths (should be relative, but verify)
for f in <new-path>/.git/worktrees/*/commondir; do
[ -f "$f" ] || continue
grep -q "^/" "$f" && echo "WARNING: absolute commondir in $f — fix manually"
done
If worktrees have no meaningful changes (just settings.json), it's simpler to mv .claude/worktrees .claude/worktrees.bak and let them be recreated. *.bak is globally gitignored.
C. hooksPath in .git/config (and worktree configs):
Use git config to scope the fix to hooksPath only (avoid corrupting remote URLs or other config):
# Main repo
hooks_path=$(git -C <new-path> config core.hooksPath 2>/dev/null)
if [[ "$hooks_path" == *"$old_path"* ]]; then
git -C <new-path> config core.hooksPath "${hooks_path/$old_path/$new_path}"
fi
# Worktree-level configs may also override hooksPath
for wt_config in <new-path>/.git/worktrees/*/config; do
[ -f "$wt_config" ] || continue
grep -qF "$old_path" "$wt_config" && sd -F "$old_path" "$new_path" "$wt_config"
done
Search for old paths across common locations:
~/code/ (all repos — CLAUDE.md, specs, scripts, configs)~/.claude/ (rules, docs, settings)rg --no-ignore -l "$old_path_pattern" ~/code/ ~/.claude/ 2>/dev/null
For each match:
tmp/, archive/, .git/, node_modules/ matches — these are throwawayCheck for tmux sessions named after the repo:
tmux ls 2>/dev/null | grep -i "<repo-name>"
If found, send cd to the new path:
tmux send-keys -t <session> "cd <new-path>" Enter
After completing all automated steps, remind the user about:
crontab -l | grep <old-path> — update manually with crontab -e