--- name: security:registry description: Skill signature registry — view stats, scan and register skills, search known fingerprints allowed-tools: Bash, Read, Agent model: sonnet --- # /security registry [scan | search ] Local database of known skill fingerprints and risk profiles. Enables instant re-scan detection. ## Step 1: Parse Sub-command Extract from `$ARGUMENTS`: - Empty or `stats` → **show stats** - `scan ` → **scan and register** - `search ` → **search registry** Determine plugin root (parent of this `commands/` folder). ## Step 2a: Stats (default) ```bash node -e " import { getStats, listEntries } from '/scanners/lib/skill-registry.mjs'; const stats = getStats(''); const recent = listEntries({}, '').slice(0, 5); console.log(JSON.stringify({ stats, recent })); " --input-type=module ``` Display: ``` ## Skill Signature Registry | Metric | Value | |--------|-------| | Total entries | X | | Scanned | X | | Seed | X | | ALLOW | X | | WARNING | X | | BLOCK | X | | Stale (>7d) | X | | Avg risk score | X/100 | ### Recent Entries | Name | Verdict | Risk | Last Scanned | ``` ## Step 2b: Scan and Register Resolve target — if `$ARGUMENTS` contains a URL, clone via `node /scanners/lib/git-clone.mjs clone ""` first. **Fingerprint:** ```bash node -e " import { fingerprintSkill, checkRegistry } from '/scanners/lib/skill-registry.mjs'; const result = fingerprintSkill(''); const check = checkRegistry(result.fingerprint, ''); console.log(JSON.stringify({ ...result, ...check })); " --input-type=module ``` **If found and not stale:** Display cached result. Skip full scan. ``` ## Registry Hit **Name:** | **Fingerprint:** **Verdict:** | **Risk Score:** /100 **Last scanned:** | **Scan count:** **Status:** Cached result (use `/security scan` to force re-scan) ``` **If not found or stale:** Run `/security scan `, then register: ```bash node -e " import { registerScan } from '/scanners/lib/skill-registry.mjs'; const result = registerScan({ skillPath: '', fingerprint: '', name: '', files: , verdict: '', risk_score: , counts: , files_scanned: }, ''); console.log(JSON.stringify(result.entry)); " --input-type=module ``` Display: "Registered: () — " Clean up clone if remote. ## Step 2c: Search ```bash node -e " import { searchRegistry } from '/scanners/lib/skill-registry.mjs'; const matches = searchRegistry('', ''); console.log(JSON.stringify(matches)); " --input-type=module ``` Display results table: ``` ## Registry Search: "" **Matches:** X | Name | Fingerprint | Verdict | Risk | Last Scanned | ``` If no matches: "No entries matching ''."