← ClaudeAtlas

cafleet-base-dirlisted

Resolve the base directory for output files. Loaded by consuming skills via the `cafleet-base-dir` skill. Do NOT invoke directly.
himkt/cafleet · ★ 27 · Data & Documents · score 82
Install: claude install-skill himkt/cafleet
# Base Directory Resolution The `cafleet-base-dir` skill is the single authoritative resolver for every CAFleet scratch / audit / figure path. The resolution outcome (`${BASE}`) is the only legitimate root for those writes. Consuming skills MUST NOT compute `${BASE}` independently and MUST NOT fall back to `/tmp` when resolution returns the `<unset>` sentinel. `/tmp/claude-code` remains a perfectly valid resolved `${BASE}` when this skill explicitly selects it via the `AskUserQuestion` branch — only **bypassing** base-dir to write to `/tmp` without its consent is forbidden. ## Procedure This skill resolves `${BASE}` using only `git rev-parse --show-toplevel` (Bash) and `AskUserQuestion`. It writes nothing at resolution time. Claude's job is to (a) pick the task-scope branch (Step 0) when the consuming skill operates on a per-task folder, otherwise the shared-root branch (Step 1); and (b) drive `AskUserQuestion` (Step 2) only when Step 1 reaches branch 3 (CWD is `$HOME` or under `~/.claude`). ### Step 0. Task-scope resolution (preferred for task-aware consuming skills) When the consuming skill operates on a per-task folder, it picks the task-folder path itself (the resolver is general-purpose and does NOT enumerate or special-case any bucket name — `researches/`, `design-docs/`, etc. are all consumer-side conventions). Resolve as follows: 1. **Infer the repo root.** Run `git rev-parse --show-toplevel` (Bash) from the CWD. A non-zero exit or empty output means "no `.git`