active/mem/SKILL.md
Manage user-defined knowledge bases when `$mem` is invoked or durable knowledge is being saved.
npx skillsauth add kevinslin/skills memInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill as a router for persistent knowledge bases. Resolve the knowledge base configuration from .mem.yaml, then use the configured per-base schemas and optional skill for file operations in that base.
Invoke $mem whenever saving durable knowledge. Do not write durable knowledge directly to ad hoc files, repo-local .mem trees, Dendron notes, or other long-lived knowledge stores without first using this skill to resolve the configured base, schemas, and optional base-specific file rules.
This rule applies even when another skill discovers the learning, finding, decision, or workflow improvement. The discovering skill can decide what should be remembered, but $mem owns where and how that knowledge is persisted.
Resolve configuration in this order:
$PWD/.mem.yaml$HOME/.mem.yamlIf neither file exists, stop and ask where the memory configuration should live. Do not guess a root.
If the user does not specify a base name, route by the configured base description. If no description clearly matches, prefer an exact root match with the working directory. If neither signal is decisive, stop and ask the user. Do not guess.
Expected shape:
version: 1
bases:
- name: {{string}}
description: {{string}} # what this base is used for; used for routing
root: {{path}}
path_style: {{directory|dotted}} # optional; inferred from existing files when omitted
skill: {{skill_name}} # optional
schemas: [{{schema_name}}, ...]
Load and validate .mem.yaml with the bundled parser script instead of hand-parsing:
python3 ./scripts/load_config.py --pretty
Run the command from the directory containing this SKILL.md, or otherwise resolve ./scripts/load_config.py relative to this SKILL.md and run that copy. The script searches $PWD/.mem.yaml, then $HOME/.mem.yaml, validates the shape below, expands ~ and shell environment variables in root, resolves relative roots relative to the config file directory, requires roots to exist, and prints normalized JSON.
The parser enforces:
version must be 1.bases must be a non-empty list.name, description, root, and schemas fields.schemas must be a non-empty list of schema names.path_style is optional; when present, it must be directory or dotted. When omitted, the parser infers it from existing Markdown files under root and falls back to directory if no convention is visible.skill is optional; when present, it must be non-empty.Each base has:
name: short base identifier users can mention.description: what the base is used for. Use this as the primary routing signal when the user does not name a base explicitly.root: filesystem root for that knowledge base.path_style: how schema paths map to files for this base. Use dotted for files such as pkg.test.cli.md; use directory for paths such as pkg/test/cli.md.skill: optional skill name to load for base-specific navigation and file operations under root.schemas: ordered schema names to resolve into $schema definitions; use them to understand the expected structure, placement, naming, frontmatter, and section format of knowledge bases in this base.The selected base root is the authoritative filesystem root for that operation. Optional base skills must consume this selected root and the resolved schemas as context; they should not reinterpret their own independent root variables when mem has already selected a base.
add this finding to $mem {{knowledge_base}}: add or update knowledge.look in $mem {{knowledge_base}}: search/read knowledge.delete from $mem {{knowledge_base}}: delete only when the user is explicit about what to remove..mem.yaml by running ./scripts/load_config.py; use the normalized JSON output for base selection and root paths.{{base.name}}/, select that base and treat the remainder as the knowledge-base path or query.description; select the base only when one description clearly matches the operation.root equal to the working directory, select that base.root; do not expand shell syntax inside the user-provided knowledge-base target..., symlinks, and relative segments.root.root.schemas list to $schema definitions before creating, reading, updating, deleting, or summarizing knowledge bases.
schemas entry as a schema identifier, not a filesystem path.$schema definitions to determine knowledge base structure, required fields, naming, placement, and update style.skill, load that skill with the selected base name, selected base root, knowledge-base target, and resolved $schema definitions as the operating context. If skill is absent, use normal file/search tools constrained to root.insertion_policy only as a tie-breaker or guardrail when descriptions leave ambiguity.root, including required slug, name, and template conventions.path_style when deriving paths or invoking schema materialization. If using ../schemas/scripts/schema.py materialize, pass --path-style {{path_style}}.schema_route, schema, route, or node. Add or update route-like metadata only when the resolved schema template or the existing file explicitly defines that field, and then use the concrete materialized route for the selected root and path_style, not an unresolved template route.root. The selected base root and resolved schemas remain the source of truth for paths and structure.Existing knowledge files may contain user-owned sections. Before editing any existing Markdown file, search for ## Manual Notes and preservation text such as [keep this for the user to add notes. do not change between edits].
When a protected manual-notes section exists:
Treat the knowledge-base argument as either a file-like target or a search query:
$schema definitions' naming, placement, frontmatter, and structure conventions.When adding a finding:
$schema definitions.When looking in a knowledge base:
$schema definitions to interpret fields, sections, and relationships.Delete knowledge only when the user explicitly asks to delete or remove it. Prefer targeted removals over deleting an entire knowledge base file, and report the exact file changed.
.mem.yaml../scripts/load_config.py error and stop before making changes.root.development
Generate incremental Slack digests for channels, topics, and categories.
testing
Audit an OpenClaw maturity-scorecard surface into an evidence-backed component score report. Use when given a surface from an OpenClaw maturity-scorecard.md and asked to score coverage, quality, readiness, or generate a detailed surface report plus per-component subreports.
tools
Turn an existing concrete spec into a reusable generic spec template. Use when asked to create a generic spec, template spec, reusable implementation template, or generalized version of a spec from a specific implementation such as one plugin, channel, integration, feature, or PR.
data-ai
Trace how something works with an investigator subagent and a skeptical reviewer subagent.