一键导入
add-domain
Adds a new domain folder with a hub index and wires it into `_MANIFEST.md` -- for a new topic area, or splitting an existing domain into its own folder.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adds a new domain folder with a hub index and wires it into `_MANIFEST.md` -- for a new topic area, or splitting an existing domain into its own folder.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Moves a file from active (Tier 2) to archived (Tier 3) so Memex stops loading it automatically -- for a wrapped project, a stale reference, or a superseded file. The file stays on disk; only its manifest tier and hub status change.
Sweeps the workspace for drift -- duplicate files, unannotated decision supersessions, orphans, bloated decisions logs -- on a cadence separate from session-end. Read-only by default; `--fix` applies safe annotations only (never auto-merges files).
Trigger when the user's question spans multiple Memex workspaces and they don't know which one holds the answer, or they ask "have I written about X anywhere?". Not for questions the current workspace can answer -- use `/memex:search` instead. Reads only manifests and closets, never inside individual files.
Quick-capture an idea to the scratch inbox. Use when the user explicitly asks to capture: "capture this", "add to ideas", "don't let me forget", "log this idea", `/memex:idea`. Not for every "we should eventually..." aside -- most asides aren't capture-intent. Not for decisions (decisions.md) or state claims (closets `claims:` field).
Sets up Memex in the current workspace. Detects state -- fresh repo, existing repo with loose markdown, a foreign manifest, or an outdated version marker -- and runs the right combination of scaffold, scan-and-organize, migrate, or health-check.
Registers this Memex workspace in the global source registry so it's searchable from your other workspaces via `/memex:cross-search`.
| name | add-domain |
| description | Adds a new domain folder with a hub index and wires it into `_MANIFEST.md` -- for a new topic area, or splitting an existing domain into its own folder. |
| argument-hint | [domain-name] |
| disable-model-invocation | true |
Wikilink rule: Use [[filename]] for every file reference in markdown.
Create a domain folder with a hub index and a closets file, optionally migrate matching files into it, and wire it into _MANIFEST.md.
Run WORKSPACE_ROOT=$(pwd) && echo "$WORKSPACE_ROOT" via Bash.
Read _MANIFEST.md. If missing: tell the user "No manifest found. Run /memex:init first." and stop.
If $ARGUMENTS is set, use it. Otherwise ask. Convert to slug (lowercase, hyphens, no spaces).
Scan the workspace for existing files about this topic (by content, not filename). If found, list them and ask whether to move them in. On confirmation, move and update [[wikilinks]] in other files that referenced the old paths.
Create [domain-name]/ at the workspace root (or inside the established domains parent if existing Hub Map entries use one).
Create [domain-name]/_CLOSETS.md. Format and per-entry typed-field schema (subjects, people, claims, decisions, dates, status) are canonical at memex/skills/session-end/references/closets-format.md. Per-entry summary fields follow the 8 rules at memex/skills/session-end/references/summary-rules.md. Use templates/closets.md.tmpl from the init skill for the file header.
If files were moved in Step 3, add a closets entry per file populated from its content.
By default, domains are closets-only (the typed-field index handles retrieval). An optional prose [domain-name]-index.md can also be created for human-facing context: domain philosophy, "how we work here" preamble, ad-hoc notes that don't fit typed rows. Skipped by default.
If the user explicitly asks for a hub index, or the domain has prose context worth preserving (e.g., a long-form doc migrated from elsewhere), create [domain-name]/[domain-name]-index.md:
# [Domain Name]
[One sentence describing what this folder contains.]
[Any prose context, philosophy, working agreements specific to this domain.]
Drop the file table entirely — the closets file is the source of truth for what's in the domain. Index files exist only for prose context closets can't capture.
Add under Tier 2 - By Domain:
### [Domain Name]
Closets: [[<domain-name>/_CLOSETS]]
(If a prose hub index was also created, add Hub: [[<domain-name>-index]] on a second line.)
Add a row to the Hub Map with a one-line summary. The wikilink in the Hub column points at whichever file is the primary entry — closets for closets-only domains, the index for domains with prose:
| [Domain Name] | [[<domain-name>/_CLOSETS]] | [one-line summary] |
If a prose hub index exists, the row format is the legacy | [Domain Name] | [[<domain-name>-index]] | [...] |. Both forms are valid; session-start handles either.
Run wikilink verification. Fix any breaks before finishing.
Domain added: [domain-name]
Closets: [domain-name]/_CLOSETS.md
Hub: [domain-name]/[domain-name]-index.md (only if created)
Files moved: [count or "none"]
Manifest: updated
Wikilinks: CLEAN
No manifest = no domain. If _MANIFEST.md is missing, stop and route the user to /memex:init. Don't scaffold a half-wired domain.
Slugify the input. "Marketing Strategy" → marketing-strategy. Spaces and uppercase break wikilinks and file resolution downstream.
Don't duplicate an existing domain. Before creating, scan the Hub Map for similar slugs (marketing vs marketing-strategy vs mkt). Ask the user whether to merge into the existing domain instead of forking.
Domain root location follows existing convention. If existing Hub Map entries put domains under domains/<name>/ or areas/<name>/, mirror that. Don't drop a new domain at workspace root if siblings live in a parent folder.
Moved files keep their wikilinks alive. Every move triggers a [[old-name]] → [[new-name]] rewrite across all .md files. Skipping this leaves the Obsidian graph broken even though tests pass.
Closets entry per moved file is required. Every file in the domain folder needs a closets entry. Populate from file content, not filename. Closets are the source of truth; the optional prose hub index does not need a corresponding file table.
Closets-only by default; prose index only when there's prose to capture. v2.1+ treats the per-domain [domain]-index.md as optional. Skip it unless the domain has working-agreement / philosophy / long-form context that doesn't fit typed rows.
Catch-all topics aren't domains. "miscellaneous", "other", "stuff". Refuse politely and ask the user to name a real subject area.