← ClaudeAtlas

wiki-watchlisted

Watch raw/{articles,papers,transcripts,external}/ for new files, queue them, and let the user drain the queue with one command. Closes the 'I dropped a file but forgot to ingest' gap. NEVER auto-runs wiki-ingest — drain is always explicit.
litianyi-007/kata · ★ 0 · AI & Automation · score 73
Install: claude install-skill litianyi-007/kata
# wiki-watch Detect new sources in `raw/` and surface them for ingestion. The watcher runs as a polling daemon (5 s default), debounces in-progress writes, and writes detected files to `.wiki-ingest-queue.json`. **The agent — not the daemon — invokes `wiki-ingest`** when the user drains the queue. This separation keeps the watcher dumb (always safe to run) and ingest deliberate (always reviewed). > If a file appears in raw/ but you don't want to ingest it (e.g. WIP), > use `wiki-watch --remove <id>` to drop it from the queue without > processing. ## Implementation `plugin/scripts/wiki_watch.py` owns the daemon, queue IO, and detection logic. **The script is the source of truth; the prose below explains its behavior.** This skill calls the script for state mutation and status reads, then orchestrates `wiki-ingest` invocations during drain. ```bash # Foreground watch (testing) — Ctrl-C to stop python {plugin_root}/scripts/wiki_watch.py --wiki {wiki_path} watch # Background daemon python {plugin_root}/scripts/wiki_watch.py --wiki {wiki_path} watch --daemon # Status: daemon liveness + queue summary python {plugin_root}/scripts/wiki_watch.py --wiki {wiki_path} status # Stop the daemon (clean SIGTERM) python {plugin_root}/scripts/wiki_watch.py --wiki {wiki_path} stop # Read queue (optionally filtered by status) python {plugin_root}/scripts/wiki_watch.py --wiki {wiki_path} queue list \\ [--status pending|processed|failed|removed] # Mark an entry's status (used during d