knowledge-updatelisted
Install: claude install-skill ANDRS-Projects/claude-domain-memory
# Knowledge Update
Extract what was learned in this session and persist it to the project's domain memory files.
## When to Use
Run at the end of a session with `/knowledge-update` when:
- You just completed a non-trivial task
- You encountered a surprising bug, API quirk, or pattern
- Something worked differently than expected
- A previous hypothesis was confirmed or contradicted
## How It Works
### Step 1 — Locate the memory folder
Run these two bash checks first — do not skip or infer:
```bash
test -d .git && echo "git=yes" || echo "git=no"
test -d .claude/memory && echo "memory=yes" || echo "memory=no"
```
Decision based on the output:
| git | memory | Action |
|-----|--------|--------|
| yes | yes | Use `.claude/memory/` |
| yes | no | Run `mkdir -p .claude/memory/` then use it |
| no | — | Fall back to `~/.claude/projects/<project-slug>/memory/` |
**Do not silently fall back to `~/.claude/projects/` just because `.claude/memory/` hasn't been created yet.** If it's a git repo, create the folder. The `~/.claude/projects/` path is reserved for non-repo contexts only (e.g. a scratch folder with no `.git`).
**If the repo is (or is about to become) public/open-source**, keep using repo-local `.claude/memory/` — don't reroute to `~/.claude/projects/` just because the repo is public. Instead, make sure `.claude/` is listed in `.gitignore` so the memory files stay local-only and never get published. If `.gitignore` exists but doesn't already exclude `.cla