stashlisted
Install: claude install-skill orassayag/agentic-project-workflow
# /stash — save solo sessions for later resume
`claude --resume` needs the project root AND the session UUID. This skill records
both — plus an alias and a short note inferred from the current work — retrievable
from any terminal via `~/.claude/skills/stash/stash.sh` (`list` / `show` / `resume` /
`drop`).
## When invoked
**Do not ask the user anything. Infer everything; commit the entry; print the
result.** If `/stash` is followed by user text, treat it as a hint for the alias/note
but still don't open a back-and-forth.
1. **Root** — `pwd`.
2. **Session ID** — newest `~/.claude/projects/<sanitized-pwd>/*.jsonl` by mtime
(sanitize: `/` and `.` → `-`).
3. **Alias** — first of these that yields a non-empty kebab-case slug (lowercase,
alnum + dashes, ≤40 chars):
- Ticket ID surfaced in the conversation, branch name, or recent commit subject.
- Branch name with the kind-prefix stripped (`feat/3231-hub-drag` → `3231-hub-drag`).
- `basename $(pwd)` + `-` + last 6 chars of the session ID.
4. **Note** — one sentence (≤80 chars) describing what was being worked on. Source
order: the active task in this conversation → latest commit subject. If nothing
clear, leave empty.
5. **Append** to `~/.claude/stash.jsonl`:
`{alias, root, session_id, stashed_at, note}`. `stashed_at` must be the *actual
current time* from `date -u +%Y-%m-%dT%H:%M:%SZ` — never a placeholder. If the
alias collides with an existing entry, suffix `-2`, `-3`, … until unique.
6. **Print**