$npx -y skills add cobibean/agent-memory-wiki --skill wikijanitorUse when the user invokes /wikijanitor or when a scheduled janitor reviews recent sessions. Reconcile Obsidian Daily Logs, Session Logs, and Janitor Reports over a lookback window; make conservative routine updates and notify only for review/uncertainty.
| 1 | # Wiki Janitor |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill to run a conservative Obsidian memory-wiki review over recent agent sessions and existing notes. |
| 6 | |
| 7 | The janitor is a reliability layer for missed or incomplete session capture. It does not replace manual `/prepforreset` notes and does not pretend to be the original session author. |
| 8 | |
| 9 | The primary artifact is a first-class Obsidian Janitor Report note. The janitor may also make small routine updates to existing Daily Logs and Session Logs, but missing major notes become report gaps/review items rather than automatically created full session logs. |
| 10 | |
| 11 | ## When to Use |
| 12 | |
| 13 | Use when: |
| 14 | |
| 15 | - the user invokes `/wikijanitor` |
| 16 | - a scheduled nightly wiki janitor runs |
| 17 | - the user asks to review/reconcile recent sessions against the Obsidian memory wiki |
| 18 | - a missed context-reset/session note may need to be surfaced |
| 19 | |
| 20 | Do not use for raw transcript dumping, rewriting the whole daily log, creating missing full session logs by default, mutating non-Obsidian stores automatically, or printing secrets. |
| 21 | |
| 22 | ## Required Companion Skill |
| 23 | |
| 24 | Before any vault operation, load and follow the `obsidian` skill. It owns vault path resolution and low-level vault conventions. |
| 25 | |
| 26 | If the vault path is missing or ambiguous, ask for it instead of writing elsewhere. Resolve canonical paths before writing and refuse any write whose final resolved path is outside the resolved vault root. |
| 27 | |
| 28 | For session discovery, use the runtime’s session search/history API when available. If session search is not available, inspect only the context and note files that the runtime can safely access. |
| 29 | |
| 30 | ## Slash Command Discovery |
| 31 | |
| 32 | Hermes automatically exposes installed skills as slash commands by normalizing the skill `name` from frontmatter. Because this skill is named `wikijanitor`, it is invoked as: |
| 33 | |
| 34 | ```text |
| 35 | /wikijanitor |
| 36 | ``` |
| 37 | |
| 38 | after the skill command cache has reloaded. |
| 39 | |
| 40 | For other runtimes, create a command alias that loads and follows this skill. |
| 41 | |
| 42 | ## Default Behavior |
| 43 | |
| 44 | Default lookback: last 24 hours. |
| 45 | |
| 46 | Scheduled default time: around 3:30am local/system time. |
| 47 | |
| 48 | If there are no sessions/activity in the lookback window: create no report, make no note changes, and send no user message. |
| 49 | |
| 50 | If there was session activity: create a Janitor Report note, link it both ways with relevant Daily Logs, record what was reviewed, record routine updates made, record gaps/review candidates/uncertainty/suggested actions, and notify the user only if review/uncertainty exists. |
| 51 | |
| 52 | ## Folder and Filename Conventions |
| 53 | |
| 54 | Default folders, relative to the Obsidian vault: |
| 55 | |
| 56 | ```text |
| 57 | Daily Logs/ |
| 58 | Session Logs/ |
| 59 | Janitor Reports/ |
| 60 | ``` |
| 61 | |
| 62 | Janitor report filename: |
| 63 | |
| 64 | ```text |
| 65 | Janitor Reports/YYYY-MM-DD-last-24h.md |
| 66 | ``` |
| 67 | |
| 68 | If more than one report is needed on the same date, add a timestamp or numeric suffix: |
| 69 | |
| 70 | ```text |
| 71 | Janitor Reports/YYYY-MM-DD-0330-last-24h.md |
| 72 | Janitor Reports/YYYY-MM-DD-last-24h-2.md |
| 73 | ``` |
| 74 | |
| 75 | For scheduled runs, prefer idempotency over suffixing: compute and record the exact lookback start/end in the report, reuse/update an existing report for that same window when possible, and de-duplicate Daily Log backlinks before appending. |
| 76 | |
| 77 | ## Minimal Frontmatter |
| 78 | |
| 79 | ```yaml |
| 80 | --- |
| 81 | type: janitor-report |
| 82 | date: YYYY-MM-DD |
| 83 | agent: <agent-name> |
| 84 | profile: <profile-name> |
| 85 | lookback: 24h |
| 86 | tags: |
| 87 | - janitor-report |
| 88 | --- |
| 89 | ``` |
| 90 | |
| 91 | Add `review-needed` only if the report contains review candidates, gaps requiring judgment, conflicts, sensitive-content risks, or uncertainty. |
| 92 | |
| 93 | ## Janitor Report Shape |
| 94 | |
| 95 | Recommended sections: |
| 96 | |
| 97 | ```md |
| 98 | # Janitor Report — YYYY-MM-DD — Last 24h |
| 99 | |
| 100 | ## Summary |
| 101 | |
| 102 | ## Lookback window |
| 103 | |
| 104 | ## Related daily logs |
| 105 | - [[Daily Logs/YYYY-MM-DD]] |
| 106 | |
| 107 | ## Sessions reviewed |
| 108 | |
| 109 | ## Routine updates made |
| 110 | |
| 111 | ## Gaps found |
| 112 | |
| 113 | ## Review candidates |
| 114 | |
| 115 | ## Suggested actions |
| 116 | |
| 117 | ## Source references |
| 118 | ``` |
| 119 | |
| 120 | Janitor reports live at the same memory-wiki tier as Daily Logs and Session Logs. They are durable wiki artifacts with provenance: “this came from scheduled/manual reconciliation.” |
| 121 | |
| 122 | ## Bidirectional Links |
| 123 | |
| 124 | Link both ways: Daily Logs should include a `## Janitor reports` section linking relevant reports; Janitor Reports should include `## Related daily logs` linking every reviewed date. Because a last-24h lookback may cross midnight, a report may link two daily logs. |
| 125 | |
| 126 | ## Routine Updates Allowed |
| 127 | |
| 128 | The janitor may silently make small, conservative updates to existing notes when evidence is clear: |
| 129 | |
| 130 | - add a missing session link to a Daily Log |
| 131 | - add a missing Janitor Report link to a Daily Log |
| 132 | - append a clearly sourced one-line session summary |
| 133 | - add obvious artifact paths already mentio |