| name | cmds-maintenance |
| description | Periodic vault maintenance tasks for cmds-vault. Initial scope is HQ Focus Lens โ insert/refresh a "currently active categories" lens at the top of ๐ CMDS Head Quarter.md based on the operator's Current Focus Areas (CMDS.md) and actively-used CMDS subcategories (Permanent Notes frontmatter). Non-destructive โ preserves the full 91-category navigation below the lens. Activate when user says "cmds maintenance", "HQ ๊ฐ์ธํ", "focus lens", "ํ์ฑ ์นดํ
๊ณ ๋ฆฌ ๊ฐฑ์ ", "refresh focus lens", or after a focus shift (new project, new domain, new long-form output). |
| metadata | {"version":"1.0","author":"johnfkoo951","created":"2026-05-02T00:00:00.000Z","base":"https://github.com/johnfkoo951/cmds-vault โ Maintenance for personalization that evolves over time"} |
CMDS Maintenance โ Recurring Vault Personalization
Sister skill to cmds-onboarding (one-shot setup). Where onboarding fills your vault with first-pass context, maintenance keeps that context fresh as your focus shifts. Initial scope: HQ Focus Lens.
When to Use
Activate on any of:
- User says: "cmds maintenance", "HQ ๊ฐ์ธํ", "focus lens", "ํ์ฑ ์นดํ
๊ณ ๋ฆฌ ๊ฐฑ์ ", "refresh focus lens"
- Periodic cadence: monthly, or after any of these life events:
- New project / new domain / new long-form output
- Permanent Notes folder reaches 20+ notes (signal: pattern is emerging worth surfacing)
- CMDS.md
Current Focus Areas section was edited
- After running
/lint and noticing HQ no longer reflects daily use
Maintenance Philosophy
- Non-destructive โ never delete categories from HQ. Only surface the active subset above the full list.
- Two signals, one lens โ combine declarative (CMDS.md
Current Focus Areas) and descriptive (Permanent Notes' actual CMDS: metadata distribution) into a single "active categories" view at HQ top.
- Idempotent โ running this skill multiple times must produce stable output (or strictly newer; never accumulate stale entries).
- Reversible โ Focus Lens lives between explicit HTML markers (
<!-- focus-lens-start --> ... <!-- focus-lens-end -->). User can clear it at any time by deleting between the markers.
- Not authoritative โ the Focus Lens is a view, not a source of truth. The 91 categories below it remain the canonical reference.
Pre-boarding (verify before starting)
| Check | Command | Expected | Fix if fails |
|---|
| HQ file exists | ls "๐ CMDS Head Quarter.md" | exists | Run from vault root |
| Focus Lens markers present | grep -c 'focus-lens-start' "๐ CMDS Head Quarter.md" | 1 | Add markers (see ยง Setup) โ first-time use |
| CMDS.md operator profile filled | grep -c '(Your Name)' CMDS.md | 0 | Run cmds-onboarding first |
| Permanent Notes folder has notes | find "30. Permanent Notes" -name '*.md' -not -name '.gitkeep' | wc -l | non-zero | Run cmds-onboarding first (or wait until you have 5+ notes) |
Setup (first-time only โ install Focus Lens markers)
If the Focus Lens markers are not yet in HQ.md, insert them. The recommended location is right under the H1 title and above the existing top-level navigation โ so the lens is the first thing users see when they open HQ. Default position: line ~10 (after frontmatter close + title heading).
# ๐ CMDS Head Quarter
<!-- focus-lens-start -->
<!-- This section is auto-managed by the cmds-maintenance skill.
Manual edits will be overwritten on next refresh.
To disable, delete everything between focus-lens-start and focus-lens-end (including markers). -->
<!-- focus-lens-end -->
[... existing HQ content ...]
Once markers are present, this skill manages the section between them.
Flow
Step 0 โ Greet + state inspection (10 sec)
Agent says: "I'll refresh the Focus Lens at the top of your HQ. Reading your CMDS.md profile and active Permanent Notes now."
Then inspect:
sed -n '/### Current Focus Areas/,/^###/p' CMDS.md | grep -E "^[0-9]+\. \*\*" | head -10
grep -h "^CMDS:" "30. Permanent Notes/"*.md 2>/dev/null | \
sed 's/.*\[\[๐ \([0-9]*\) [^]]*\]\].*/\1/' | \
sort | uniq -c | sort -rn | head -10
Step 1 โ Compose Focus Lens content (15 sec)
The lens has three parts:
Part A: ๐ฏ Current Focus Areas (declarative โ from CMDS.md)
List the 1โ4 focus areas verbatim from operator's profile. These are what they say they are working on.
Part B: ๐ฅ Most-used CMDS subcategories (descriptive โ from Permanent Notes)
Top 4โ6 ๐ NXX subcategories by frequency. These are what they actually write notes about. Useful when there's drift between intent and behavior.
Part C: ๐ Vault snapshot (informational, single line)
- Total Permanent Notes:
<N> ยท Inbox items: <N> ยท Last refresh: <YYYY-MM-DD>
Step 2 โ Generate Focus Lens markdown (15 sec)
Template (the agent fills in <...> from Step 0/1):
<!-- focus-lens-start -->
> **Focus Lens** โ auto-refreshed by `cmds-maintenance` skill. Last update: <YYYY-MM-DD>.
### ๐ฏ Current Focus Areas (declared)
<numbered list, 1โ4 items, copied from CMDS.md Current Focus Areas section>
### ๐ฅ Most-used CMDS subcategories (last <N> Permanent Notes)
| # | Category | Note count |
|---|----------|------------|
<top 4โ6 rows by descending count>
### ๐ Vault snapshot
- Permanent Notes: **<N>** ยท Inbox items: **<N>** ยท Total wikilinks: **<N>**
- Last lens refresh: **<YYYY-MM-DD>** (from `cmds-maintenance` skill)
> The full 91-category navigation continues below. This lens does not replace it โ only surfaces what's currently most active in your vault.
<!-- focus-lens-end -->
Step 3 โ Replace lens content in HQ (5 sec)
Use awk or sed to replace content between the markers. This must be idempotent โ running multiple times overwrites cleanly:
HQ="๐ CMDS Head Quarter.md"
LENS_FILE=/tmp/cmds-focus-lens.md
awk -v lens="$(cat "$LENS_FILE")" '
/<!-- focus-lens-start -->/ { print; print lens; in_lens=1; next }
/<!-- focus-lens-end -->/ { in_lens=0; print; next }
!in_lens { print }
' "$HQ" > "${HQ}.tmp" && mv "${HQ}.tmp" "$HQ"
Step 4 โ Verification (5 sec)
grep -c 'focus-lens-start' "๐ CMDS Head Quarter.md"
grep -c 'focus-lens-end' "๐ CMDS Head Quarter.md"
grep "Last update:" "๐ CMDS Head Quarter.md" | head -1
Step 5 โ Wrap-up (5 sec)
Agent says: "Focus Lens refreshed. declared focus areas, top active CMDS categories shown. The full 91-category list is unchanged below. Ran in seconds."
Total time budget: ~1 minute.
Future Scope (not in v1.0)
The skill is named cmds-maintenance plural intentionally. Future maintenance tasks to absorb here:
- Upstream sync check: compare local
VERSION against https://api.github.com/repos/johnfkoo951/cmds-vault/releases/latest and tell user if a new vault version is available
- Authorship lint: flag any system file whose YAML
author: field is not [[๊ตฌ์ํ]] (false attribution detection โ could happen if user batch-replaced too broadly with a pre-1.0.0 ritual)
- Orphan detection: notes with no incoming or outgoing links (lighter-weight than full
/lint)
- CMDS-vs-index direction lint: catch
CMDS: "[[๐ท ...]]" mistakes (๐ vs ๐ท swapped)
- Stale-status sweep: notes stuck in
inProgress for >30 days
- CHANGELOG auto-stub: when user makes substantial vault structural changes, suggest a
## [Unreleased] section in their CHANGELOG fork
Each future capability gets its own section in this SKILL.md and its own trigger phrase set โ single skill, multiple commands, all idempotent and non-destructive.
Failure Modes
| Symptom | Cause | Fix |
|---|
| Markers not found in HQ | First-time use, or user deleted them | Run ยง Setup to insert markers, then re-run |
| Lens wipes on every refresh (no diff visible) | User has no Permanent Notes yet | Skill produces "๐ Vault snapshot: 0 Permanent Notes" โ that's correct, not a bug |
Current Focus Areas section in CMDS.md missing or empty | User skipped Step 6 of cmds-onboarding | Run cmds-onboarding Step 6 first |
Multiple top-level <!-- focus-lens-start --> markers (corrupted) | User accidentally pasted lens twice | Manual cleanup: keep only the first marker pair, delete the rest, re-run |
Resume Logic
This skill is single-shot per invocation; no multi-step state to resume. If interrupted between Step 1 and Step 3, the HQ.md remains unchanged (the agent writes to a tmp file first).
References
- [[๐ CMDS Head Quarter]] โ output target
- [[CMDS]] โ input source (
Current Focus Areas section)
30. Permanent Notes/ โ input source (frontmatter CMDS: distribution)
- Sister skill:
90. Settings/91. Skills/cmds-onboarding/SKILL.md (one-shot setup; this skill = recurring refresh)
- Origin: feedback from [[๊น์ง์]] (Jin Kim) on cmds-onboarding 2026-05-02 โ "HQ ๋ชฉ์ฐจ๋ ๊ฐ์ธ ๋ง์ถคํ๋๋ฉด ์ข๊ฒ ๋๋ฐ" (CHANGELOG v1.0.0)