namht-scanlisted
Install: claude install-skill NamHT4Devlop/nam-claude-skill
# Spec Scan — generate the Knowledge Base
A native port of Auto Spec extension's `/scan`. Produce a `knowledge-base/` folder that
captures **why the code exists and what problem it solves**, not just its structure.
This KB is the grounding for every other namht Kit command.
> If the user already has a `knowledge-base/` (e.g. generated previously by the VS Code
> extension), prefer `/namht-rescan` to update it. Only do a full scan for a new repo
> or an explicit fresh rebuild.
## Inputs & setup
- **Confirm the git branch first — this is what gets scanned.** The scan reads the **working tree on
disk**, so it captures the **currently checked-out branch plus any uncommitted changes**; it does
NOT switch branches. Run `git rev-parse --abbrev-ref HEAD` (branch) and `git status --short`
(uncommitted), then tell the user: *"I'll scan branch `<X>` as it is on disk (N uncommitted
changes) — OK?"* If they want a different branch, ask them to `git checkout <branch>` first (never
switch on their behalf if that could discard uncommitted work). Not a git repo → just scan the
folder and say so.
- **Pick a depth (this is the cost dial — say which you used).** A full scan of a large repo is the
most expensive thing in the kit, so match the effort to the need. If the user names one, obey it;
otherwise choose from the repo size and say so in one line.
- **quick** — entry points, models/schema and tests only, sampled; the 5 deep docs written from that
sample; module docs