plugins/claude-code-hermit/skills/cortex-sync/SKILL.md
Enrich existing hermit content with frontmatter and tags. Scans sessions, proposals, and artifact paths for missing fields, clusters similar files for batch confirmation, then rebuilds Connections.md if the Cortex is set up.
npx skillsauth add gtapps/claude-code-hermit cortex-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Brings existing hermit content up to date with the frontmatter contract. Safe to run multiple times — only touches files that are missing required fields.
Delegate the gap scan to the built-in Explore subagent. Prompt: Scan and return a JSON object with these keys: sessions_missing_tags (list of .claude-code-hermit/sessions/S-NNN-REPORT.md paths whose YAML frontmatter lacks the tags field), proposals_missing_tags (same for .claude-code-hermit/proposals/PROP-NNN.md), artifacts_missing_frontmatter (paths from .claude-code-hermit/cortex-manifest.json artifact_paths whose files lack title or created), artifacts_missing_tags (artifact files that have frontmatter but no tags), cortex_manifest_configured (false if cortex-manifest.json does not exist or its artifact_paths is empty, otherwise true). Return file paths and counts only — no file bodies.
Use the returned data to render the operator-facing summary:
Cortex sync — gaps found:
Sessions without tags: 18
Proposals without tags: 4
Artifact files without frontmatter: 6
Artifact files without tags: 3
Proceed? (y/n)
If cortex_manifest_configured is false in the Explore result: include in the summary: "No artifact paths configured — skipping artifact enrichment. Run /claude-code-hermit:obsidian-setup to configure."
"Proceed?" is abort-or-continue only — not blanket approval. Each cluster in the following steps still requires its own confirmation. Within each cluster, "skip" skips that cluster only — the skill continues with remaining clusters. If nothing is missing: "All content is up to date. Nothing to do." Stop.
Handle all artifact files with gaps — both missing frontmatter and missing tags:
Missing frontmatter (title or created absent):
docs/frontmatter-contract.md): infer title from H1 heading or filename, created from git log or file mtime, source as interactive, propose tags from content"6 artifact files in relatorios/ look like weekly reports. Apply this frontmatter to all? (confirm/edit/skip)"
Has frontmatter but missing tags:
Before proposing any tags, delegate the vocabulary scan to the built-in Explore subagent. Prompt: Glob .claude-code-hermit/sessions/S-*-REPORT.md and .claude-code-hermit/proposals/PROP-*.md. Sort each set descending by filename. Read the 5 most recent of each. Extract tags from YAML frontmatter and return a deduplicated array of tag strings with a per-tag frequency count. Omit file bodies. Use the returned vocabulary to follow the tag discipline rule from CLAUDE-APPEND: reuse existing tags, introduce new ones only when nothing fits, bias toward 1–2 tags per document.
After confirming each cluster, fold the accepted tags into the live vocabulary before proposing the next cluster — tags coined early in the run should be reusable for later clusters.
Cluster by inferred topic rather than confirming one by one:
"12 sessions appear to be content-related. Tag all with [content]? (y/edit/skip)"
Check whether the Cortex is set up by using Glob("obsidian/*.md") — if it returns results, the Cortex is set up.
If yes: Run:
node ${CLAUDE_PLUGIN_ROOT}/scripts/build-cortex.js .claude-code-hermit obsidian .
This regenerates Connections.md with the enriched content. Cortex Portal.md is a live Dataview template and does not need to be rebuilt.
If no: Skip the rebuild and report:
"Content enriched. Run
/claude-code-hermit:obsidian-setupto generate Cortex pages."
Cortex sync complete
Frontmatter added: 6 files
Artifact files tagged: 3
Sessions tagged: 18
Proposals tagged: 4
tools
Presence history & tracker-health report — current home/away state, reliability, recent arrival/departure transitions, and activity patterns for person/device_tracker entities. Use when the operator asks about presence history or when a presence-dependent automation (locks, alarm, vacuum, climate) misbehaves.
development
Evening house brief — end-of-day security check, device status, and energy snapshot. Runs as a daily routine at 22:30 or on demand.
tools
Browse and explain the hermit's Home Assistant automations — list by topic, filter by keyword with plain-language YAML explanations, or sort by last-fired. Read-only. Use when the operator asks "what automations do I have / what does this one do / which haven't fired."
tools
On-demand HA-voice brainstorm — reads entity inventory, automation/script listings, and operator intent to surface at most 2 capability-gap ideas, each gated by proposal-triage before becoming a PROP. Invoke when the operator asks "what automations am I missing?", "any coverage gaps?", or "brainstorm improvements". Never runs autonomously.