<< All versions

Skill v1.0.0

currentAutomated scan100/100
marinvch/cortex/scan-projects
──Details
PublishedOctober 21, 2026 at 11:55 AM
Content Hashsha256:7eb7417196c8252a...
Git SHAdeeed02ab3d0
──Files
Files (1 file, 3.0 KB)
SKILL.md3.0 KBactive
SKILL.md · 76 lines · 3.0 KB

version: "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.md or .claude/skills/plan-feature/ exists.
  • Registered? — a file already exists at projects/<slug>.md in 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 Registered
my-app ✅ ✅
client-api ✅ ❌ ← can register
old-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):

markdown
---
type: project
title: <name>
status: active
domain: business
created: <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/*.md stubs and the one connections.md row.
  • Metadata only — the firewall stays intact; company code never enters the vault.
  • A repo with no brain → suggest running /cortex (or bash "${CLAUDE_PLUGIN_ROOT}/tools/cortex-init.sh") there.
  • One repo = one stub. Re-running refreshes the metadata (path/stack/date), never deletes notes.
All versions