Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: scan-projects description: Sync the vault with the repos on this machine — which have a codebase brain, which are registered in projects/, and register the rest as metadata. disable-model-invocation: true effort: low metadata: capability: mechanical
/scan-projects — bridge repos ↔ vault (metadata only)
Keeps the vault aware of which projects exist without absorbing any code. Honors the privacy firewall: a project stub holds name / path / URL / stack / date only — never code, secrets, or client data. This is the vault-side companion to the per-repo brain installed by /cortex (and by cortex-init --register-to-vault). It records what it found in the vault's connections.md (the empty one ships in Cortex's templates/vault/).
Step 1 — Find the code root
Ask for (or confirm) the folder that holds the user's repos (e.g. D:\Projects, ~/code). If they've run this before, reuse the last root noted in connections.md.
Step 2 — Walk it (read-only)
For each immediate subdirectory that is a git repo (.git/ present), gather:
- name — folder name, or
package.json"name"if present. - local path and remote URL (
git -C <dir> remote get-url origin). - Has a brain? —
AGENTS.mdor.claude/skills/plan-feature/exists. - Registered? — a file already exists at
projects/<slug>.mdin the vault. - stack — framework + language guessed from
package.json.
Never open source files. Folder listing + package.json + git metadata only.
Step 3 — Report the matrix
Repo Brain Registeredmy-app ✅ ✅client-api ✅ ❌ ← can registerold-script ❌ ❌ ← no brain (run /cortex there)
End with a summary: N repos · M with brains · K registered.
Step 4 — Offer to sync (opt-in, metadata only)
For repos that have a brain but are not registered, offer to write a stub to projects/<slug>.md. Ask before writing. Use exactly this shape (same as cortex-init --register-to-vault, so the two stay consistent):
---type: projecttitle: <name>status: activedomain: businesscreated: <today>tags: [project, codebase]---# <name>-**Local path:** `<path>`-**Repo:** <url>-**Stack:** <framework · language · pkg-mgr>-**Brain installed:** <date>## Outcome<one line>
No code. No secrets. No client data.
Step 5 — Flip the connection
Once ≥1 project is registered, set the Tasks / projects row in connections.md to Codebase brains / local files / ✅ live with today's date. Suggest re-running /scan-projects after installing new brains.
Rules
- Read-only except the opt-in
projects/*.mdstubs and the oneconnections.mdrow. - Metadata only — the firewall stays intact; company code never enters the vault.
- A repo with no brain → suggest running
/cortex(orbash "${CLAUDE_PLUGIN_ROOT}/tools/cortex-init.sh") there. - One repo = one stub. Re-running refreshes the metadata (path/stack/date), never deletes notes.