reflectlisted
Install: claude install-skill AnotherSava/claude-code-common
# Reflect
Extract durable knowledge from the current conversation and persist it to long-term memory. Run this before compacting or clearing context so insights are not lost.
## Context
- Repo root: !`git rev-parse --show-toplevel 2>/dev/null || pwd`
- Current working directory: !`pwd`
- Project CLAUDE.md: !`R=$(git rev-parse --show-toplevel 2>/dev/null || pwd) && cat "$R/CLAUDE.md" 2>/dev/null || echo "(none)"`
- Project skills: !`R=$(git rev-parse --show-toplevel 2>/dev/null || pwd) && ls "$R/.claude/skills/" 2>/dev/null || echo "(none)"`
- Global inventory (global CLAUDE.md, global memory index, current project ID + its memory index, global learnings, global skills), bundled into one permission-checked call: !`bash ~/.claude/skills/reflect/gather-context.sh 2>/dev/null || echo "(gather-context blocked — Process step 1 will fall back to the Read tool)"`
## Working directory
`CLAUDE.md`, `.claude/skills/`, and the project memory dir derived from the project ID are all relative to **Repo root** from Context (NOT cwd — /reflect can be invoked from a subdirectory like `src-tauri/`). The bundled `gather-context.sh` already derives the project ID from the repo root; the manual fallback in Process step 1 below uses Repo root the same way.
## Process
1. **Review pre-loaded context.** The Context section has two inventory sources:
- **Project-local** (always available): project CLAUDE.md and project skills listing.
- **Global inventory** (from `gather-context.sh`): parse