/credo:session-move runs instead · from credo
Moves Claude Code sessions between profiles (e.g., ~/.claude to ~/.claude-other) with dry-run planning, copy+verify, user-tested resume, and a cleanup script. Class C: only on explicit user invocation.
This skill never runs in Claude Code
It ships in credo at skills/, but /credo:session-move (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Helper: ${CLAUDE_PLUGIN_ROOT}/scripts/credo-session-move.py (Python 3 stdlib). Every
subcommand re-plans from scratch; nothing is cached between calls.
CLAUDE_CODE_SESSION_ID) is one of the moved sessions, and when any moved session is
live: a Claude process whose argv names the id (e.g. claude --resume <id>), or a pid
file sessions/<pid>.json naming the id - in the source, the target or any sibling
.claude* profile dir next to them or given with --profile <dir> (repeatable) - whose
pid is alive, whatever the process is called (a dead pid is stale). Pid reuse is decided
only by the pid file's procStart (equals /proc/<pid>/stat field 22): only a valid
procStart that differs from the process start ticks in /proc counts as pid reuse (the
pid is now another process). An absent, unreadable, non-positive or non-integer procStart
means live. Bridge mirror pid files (credoPeerBridge) count as normal holders; only
credoPeerLan proxy descriptors are skipped. Unreadable or invalid pid files produce a
WARNING line in the plan; a recognised Claude process is never ignored; no clocks or mtimes
are used. Without
/proc (e.g. macOS) it falls back to ps -axww (every alive pid from a pid file counts
as live); when liveness cannot be determined at all it refuses. Limit: sessions
started with another profile location (a different CLAUDE_CONFIG_DIR) and Windows-side
sessions are not seen unless their profile dir is passed with --profile; ask the user
whether such profiles exist. Ask the user to close the session; never kill it.rm, mv, unlink, no running of the cleanup script.
Load the safety skill if anything near a deletion comes up..credentials.json or tokens; the move does not need them.Inputs. Source profile, target profile, one or more sessions (caption / custom title
like credo-bugs, or the full id). Missing or unclear -> Ask tool. Captions resolve from
projects/<slug>/<id>/custom-title.json, else the newest custom-title record in the
transcript - never from the stale sessions/*.json pid files. An ambiguous caption is
refused (also when custom-title.json and the transcript disagree; both titles are
shown); ask the user for the id.
Plan (dry run). python3 <helper> plan --source S --target T SESSION...
Show the user what the plan says, per session: id, title, slug (it follows the session's
cwd and can differ per session), cwd, and per artifact:
COPY - will be copied (path -> target path)PRESENT - already identical in the target (an earlier run)SHARED - the target path resolves into the source profile through a symlink: already
there, never copied, never in the cleanupCONFLICT - the target holds something different: stop, the user decidesBLOCKED - a symlink or special file in the source, a target symlink to a third
location, an entry directly at the profile root, or a leftover <file>.part from an
interrupted copy in the target: stop, never followed, never written through. A
session whose files contain symlinks (e.g. subagent files symlinked into another
session's dir by an earlier manual move) cannot be moved with this command; tell the
user why. A leftover .part is removed by the user, never by the agent or helperREVIEW - names with only the short id (e.g. jobs/<short>): not copied, user checksLIVE / REFUSED lines and warnings (e.g. transcript written seconds ago, or a custom
title / slug with control characters: text output shows those escaped as \xNN, so a
hostile title cannot inject terminal escapes or fake lines; --json is JSON-escaped)
Also show the target layout (shared symlinks vs real entries). Not copied by design:
shared logs (e.g. credo/peer-lan.log), profile-global config (settings.json,
.claude.json, history.jsonl), plugins/, other sessions. Ask (Ask tool) whether to
copy. A refused plan is not copied; explain the reason.Copy + verify. After the user's yes: copy with the same arguments. It re-checks
liveness, copies one source per explicit target path (each file via <file>.part,
fsync and a hard link, so no overwrite and never a half-written target file; no symlink
followed, mode and mtime kept) and runs verify (sha256, size, entry count, each file
read once). Green verify writes the manifest <target>/credo/session-move/<id>.json
(source and target size + sha256 per file; with a shared credo/ it lands in the shared
dir); a refused session (live, current, conflict, blocked) gets none. A failed copy keeps
the complete files copied so far; fix the cause and run copy again (identical files are
skipped, identical items become PRESENT). A crash can leave a <file>.part: the plan
then BLOCKS and the user removes it.
User tests the resume in the target (never resume it yourself; this session must not be one of the moved ones). Give the exact commands from the report below. Re-copying after the resume is not possible (the target copy changed) - verify must be green before.
Cleanup script, only after the user's explicit OK that the resume works and the
source copies may go (Ask tool):
python3 <helper> cleanup-script --source S --target T SESSION... --user-confirmed
Pass --user-confirmed only with that answer. It refuses when the session is live in any
profile other than the target (or liveness cannot be determined), when no green verify
manifest exists, when a manifest item is not part of this session's fresh plan, when any
source file changed, appeared or vanished since the verify, or when neither sha256sum
nor shasum exists; a manifest whose target size / sha256 differs from the source
size / sha256 is rejected as malformed. The rule is decided by the SOURCE. A source file
is removed while it is unchanged since the verify and its target copy exists as a regular
file, not a symlink, and is not empty while the source is not. A target that changed after
the copy (also the session's transcript) does NOT keep the source. A source file whose
target copy is missing or emptied is left out and reported as KEPT - report those to the
user. A target that is a symlink out of the source blocks the whole cleanup (plan rule).
The script lands in a new
mktemp dir under /tmp (dir 0700, file 0600; written under a temp name and renamed, on
a write failure only that temp file is removed and the dir is reported), holds only
literal paths inside the source profile that name the session id (no shell variables
except its own removed / kept counters), and at run time removes each file only while it
still has the recorded checksum, is not a symlink, its target copy is a regular file that
is not the same file as the source, is not a symlink and is not empty while the source is
not (the target's content is not compared), and both its directory and the target's
directory still resolve (pwd -P) to the recorded physical directories; directories only
with rmdir (when empty). At the end the script
prints removed N, kept M and exits 1 when anything was kept (files left out at
generation count as kept). The USER runs it: ! sh '<script>'. It is not removed
automatically; tell the user the remove command from the helper output
(rm -f -- '<dir>/cleanup.sh' && rmdir -- '<dir>').
Known limits to tell the user when relevant. A target that changed after the copy counts
as the continuation of the session, so its source copy goes even when the resume lost
content in the target (only an empty target against a non-empty source is KEPT); a source
changed since the verify refuses the whole cleanup; one path with a control character in
its name refuses the whole script
(all or nothing, no partial script); a transcript cwd with control characters is not
shown (the plan prints a warning and <cwd> in the resume command - read the cwd from
the transcript yourself).
After copy + verify, and again after the cleanup script, report in chat:
cd into (the session cwd from the transcript)cd <cwd> && CLAUDE_CONFIG_DIR=<target> claude --resume <id> - resume by id, a caption can
be ambiguous. If the user has a launcher alias for that profile, mention it as an option
(they can check it with type <name>); never guess its name--dangerously-skip-permissions) - check it before resuming.credo/ handoffs (in the repo) do not move; they stay with the repoWhat SKILL.md sets; muted values are Claude Code's defaults
28 skills in this plugin
/auditRead-only quality gate that audits already-built work against its stated requirement and Definition of Done before it is allowed to move to 2_done/. Produces a severity-ranked decision proposal (BLOCKER/MAJOR/MINOR/NIT) with evidence; the judgement never edits, only a recorded post-audit step may fix small findings. Use when an item is claimed complete, before moving anything to 2_done/, when asked to audit or review finished work for completeness against requirements, or when acting as the dedicated post-completion review subagent. This gate is mandatory in every session mode. Not for diagnosing why something is broken (use diag) and not for verifying rendered UI behavior (use verify)./budgetThe single source for all API budget cap and reset rules - how much of the 5-hour and weekly API limits may be spent, when to throttle, pause, wake up, or hibernate, and the commit-identity gate that runs before any commit. Use whenever you are about to start or continue autonomous work, before spawning or stopping subagents, when deciding how large a task chunk to take on, when a limit is near a cap, before a commit, or whenever someone asks "how much budget is left" or "can I keep going". Works standalone (no session skill required) and applies inside subagents too: any agent that spends API budget or commits must apply these rules.
npx claudepluginhub marcel-bich/marcel-bich-claude-marketplace --plugin credoOther plugins' skills for the same job