curator
Use when ingesting memory into the wiki, running wiki_curator.py (run/report/validate/lint/search), or linting wiki structure.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 123
- Forks
- 22
01 前言 Front Matter
- name
- curator
- license
- MIT
- metadata
- { "tags": [ "wiki", "curator", "knowledge-base", "okf" ], "author": "moonlight-lupin", "hermes": { "category": "research", "related_skills": [ "obsidian", "arxiv" ] }, "version": "0.2.0", "platforms": [ "linux", "macos", "windows" ] }
- description
- Use when ingesting memory into the wiki, running wiki_curator.py (run/report/validate/lint/search), or linting wiki structure.
02 资源文件 3
- 脚本scripts/adapters.py27.5 KB
- 脚本scripts/config_loader.py8.8 KB
- 脚本scripts/wiki_curator.py77.1 KB
03 SKILL.md 正文
Wiki Curator
Overview
The curator is the operational half of Lumen. It turns memory-source records into conservative Markdown wiki updates, and it lints the wiki for structural decay. It never calls providers, never deletes pages, and never overwrites operator-confirmed facts.
Pair it with lumen:wiki for methodology (OKF frontmatter, ingest/query/lint procedures). This skill is the CLI and adapter layer.
When to Use
Use this skill when the user wants to:
- Ingest recent memory into the wiki (
run) or preview that ingest (report) - Lint or validate wiki structure
- Search wiki pages by keyword, alias, or tag
- Configure which memory source the curator reads
Wiki Location
Resolve the wiki path in this order:
--wikiCLI overridepaths.wiki_pathin plugin config (shared/config/lumen.yamlor--config)$WIKI_PATHenvironment variable- Default
~/wiki
Plugin config (lumen.yaml)
Default file: <plugin>/shared/config/lumen.yaml. Override with --config or LUMEN_CONFIG.
paths:
wiki_path: ~/wiki # null → $WIKI_PATH → ~/wiki
curator:
timezone: Asia/Singapore
max_write_pages: 20 # 0 or negative disables the cap
memory_source: sessions # sessions | auto | json-file | mnemosyne | none
auto prefers sessions when a readable Hermes state.db exists (the conversation history is the ground truth; Mnemosyne holds derived notes), then Mnemosyne when hermes is on PATH, falling back to the json-file adapter if the export fails. none disables ingest (file-only lint/search still work).
Adapter layer
${HERMES_SKILL_DIR}/scripts/adapters.py is the read-only memory boundary. Adapters emit SourceItem records (source_id, source_kind, title, text, timestamp, tags, people, entities, projects, raw). Nothing writes back to a memory store.
| Adapter | Source | Notes |
|---|---|---|
sessions |
Hermes state.db (conversation history) |
Read-only SQLite; user messages paired with the first assistant reply; gateway-origin JSON envelopes stripped. Default source. |
json-file |
<wiki>/.knowledge/memory.json |
Tolerant record shapes (records map or list). Missing file → []. |
mnemosyne |
hermes mnemosyne export --output <tmp> |
Parses working_memory + episodic_memory. Subprocess failure → []. |
none |
empty | Explicit opt-out. |
Record fields. people / entities / projects take a list for several names; a plain string is one name ("Acme, Inc." stays one entity). tags may be a list or a comma-separated string. Records without an id get a content-derived id (memory_<digest> of timestamp and text), so reordering or inserting records does not re-ingest them. When a record names no people/entities/projects, capitalised words in its title/text are used as entity hints; a sentence-initial word ("Met with…", "Sent…") only counts if the same word also appears capitalised mid-sentence, and the Untitled placeholder title is never scanned.
Extension point (generic-json). Any provider that can emit the json-file memory.json shape (a records mapping or a list of record objects, with tolerant people/entities/projects keys) can be dropped in as <wiki>/.knowledge/memory.json and selected with memory_source: json-file. A dedicated generic-json adapter that takes an arbitrary export path is the documented next step; do not add provider-specific imports.
CLI
Script: ${HERMES_SKILL_DIR}/scripts/wiki_curator.py (Hermes substitutes ${HERMES_SKILL_DIR} with this skill's directory, so the path works from any cwd). Run with system python3 (stdlib + PyYAML).
CURATOR="${HERMES_SKILL_DIR}/scripts/wiki_curator.py"
python3 "$CURATOR" run --since 24h # ingest (writes wiki pages)
python3 "$CURATOR" run --since 24h --dry-run
python3 "$CURATOR" report --since 7d # planned changes, no writes
python3 "$CURATOR" validate # lint; exit 1 on ERROR
python3 "$CURATOR" lint # same checks
python3 "$CURATOR" lint --summary # counts only
python3 "$CURATOR" search "Acme" --format json --limit 10
python3 "$CURATOR" search "Acme" --format text --wiki ~/wiki
Global flags: --config <lumen.yaml>, --wiki <path> (also accepted after the subcommand).
--since accepts 90m, 24h, 7d, 2w; anything else is a usage error (exit 2). Runtime errors such as a wiki subdirectory that is a symlink out of the wiki print error: … and exit non-zero.
Read-only vs mutating: lint, validate, report, and search are read-only. run writes. run --dry-run previews. The curator never deletes pages.
Conservative write policy
- Create or update people / project / entity / daily pages from source items only
- Preserve operator-confirmed facts; append observations with
[source: id] - Refresh only the
<!-- lumen:auto:start -->…<!-- lumen:auto:end -->block ofindex.mdandoverview.md(hand-written content outside the markers is preserved; a file without markers gets a block appended); appendlog.md - Record text, titles and names are flattened to one line with
[source:/[[/ leading#neutralised, so memory content cannot forge sections, source markers or links - Never overwrite an existing page
titleorcreatedvalue - Skip an existing page whose YAML frontmatter does not parse: it is left byte-for-byte unchanged, a
skipline naming the page appears in the run report (and a warning on stderr), and the source is retried on the next run once the page is fixed - Rewritten files keep their existing permission bits; new files get
0666 & ~umask - Cap source items per run at
curator.max_write_pages(default 20; 0 or negative disables the cap) - Backup the wiki tree to
<wiki>/.lumen/backup/<timestamp>/before large batches (>5 items)..lumen/is excluded from index and overview regeneration.
OKF v0.2
Every curated .md page needs parseable YAML frontmatter with a non-empty type field. See lumen:wiki for the full schema. The curator assigns seq on create and preserves aliases / relations.
Lint checks
- Missing or malformed frontmatter (ERROR)
- Missing
type(ERROR) - Broken
[[wikilinks]](WARN) - Duplicate titles (WARN)
- Pages absent from
index.md(WARN) - Orphans with no inbound links (INFO)
- Stale pages (updated >90 days) (INFO)
File naming
Lowercase hyphenated ASCII slugs: acme-logistics.md. Accents are folded (Zoë → zoe.md); a name with no ASCII letters or digits (张伟) gets untitled-<first 8 hex of sha256(name)>.md, stable across runs and distinct per name. Wikilinks use the page title, so [[张伟]] resolves. Avoid generic names like notes.md.
Common pitfalls
- Skipping orientation (
purpose.md,SCHEMA.md,index.md, recentlog.md) - Creating duplicate entity pages without searching first
- Dumping raw notes as curated knowledge
- No frontmatter / missing
type - Unlinked pages that lint later reports as orphans
Verification checklist
- [ ] Wiki path resolved from plugin config, then
$WIKI_PATH, then~/wiki - [ ]
memory_sourcematches the host install (auto/json-file/mnemosyne/none) - [ ]
run --dry-runreviewed before a mutatingrun - [ ] Lint reports file paths and severity
- [ ] Query answers cite wiki pages
04 同仓库更多 Skills
website-scraping
Generic playbook for extracting structured data from any website — hotel prices, flight fares, e-commerce listings, real estate, jobs, competitor product catalogues, anything where the goal is to turn one or more URLs into clean records on disk. Use this skill whenever the user mentions scraping, harvesting, extracting, or pulling data from a website; names a specific site or competitor they want data from; asks how to handle JavaScript-rendered pages, Cloudflare blocks, bot detection, Turnstile challenges, or Playwright; wants to monitor prices over time; needs to automate a copy-paste research task; or says things like "just get the data from X" or "I need a script that grabs N from site Y". Covers recon, picking the lightest extraction tool that works, surviving anti-bot defences, and writing clean JSONL output with a run manifest. Scope is scraping only — landing data in a database, scheduling, and downstream pipeline work are explicitly out of scope and live in other tools.
greet
Greets a named person warmly.
skill-quality-review
Use when auditing or reviewing skill quality — batch checks across a library, deep per-skill grep methodology, usage stats, efficacy testing, or fix planning. Single consolidated home for the writing-for-agents review framework and the 3-surface review methodology.
people-enrichment
Use when the user has a list of names or companies and wants their job, employer, work history, LinkedIn URLs or company profiles looked up, or wants to find people or companies matching criteria — trigger on phrases like "enrich these contacts", "find their LinkedIn", "look up these people", "who works at X", "find directors at Y", "enrich these companies", or "get firmographics for". Enrich and search People Data Labs (PDL) Person and Company data, writing results to .xlsx. Five operations: enrich named PEOPLE into a profile, employment history and LinkedIn URL; IDENTIFY an ambiguous person as several scored candidates; SEARCH people by criteria (company, title, location); enrich COMPANIES into firmographics (industry, size, employees, HQ, founded, LinkedIn); and SEARCH companies by criteria. Do not scrape LinkedIn directly — this uses a licensed data aggregator (PDL) instead, for legal and reliability reasons.
notebooklm-mode
Source-grounded research pipeline inspired by NotebookLM. Collect verbatim source extracts into a temporary workspace, then answer questions and create deliverables grounded in those sources. Two grounding modes: strict (vault-only) and augmented (vault + labeled [background] knowledge). Trigger when the user asks to research a topic from sources, wants NotebookLM-style grounded answers, asks to build a resource vault, or says "notebooklm mode".
news-monitoring
Use when a topic or news stream needs recurring monitoring — cover it with web search, multi-language sources, digest formatting, and automated delivery via Hermes cron jobs. Covers search strategy, source selection, Chinese-language platforms, and digest templates.