mem:learn

Installation
SKILL.md

Compatibility: If AskUserQuestion is unavailable, present options as a numbered list and wait for the user's reply. If Task is unavailable, run parallel steps sequentially. The context: fork and agent: frontmatter fields are Claude Code-specific — on OpenCode and VS Code Copilot they are ignored and the skill runs inline using the current model.

Two modes -- detect from user message:

Learn Mode

Triggered by teaching phrases: "remember: X", "learn: X", "our rule is X", "from now on X".

Steps

  1. Extract the knowledge from the user's message.

  2. Infer the type (recipe or styleguide) and tags from content. If ambiguous, ask:

AskUserQuestion:
  question: "What type of knowledge is this?"
  options:
    - "styleguide -- a convention or rule the team follows"
    - "recipe -- a how-to guide or procedure"
  1. Ask for a one-sentence description if one cannot be clearly inferred:
AskUserQuestion:
  question: "One-sentence description for this knowledge doc?"
  1. Slug the subject into a filename (e.g., "always use pnpm" -> pnpm-over-npm.md).

  2. Read the configured docs directory:

npx @codevoyant/agent-kit settings get mem.docsDir 2>/dev/null || echo "docs"

Store as DOCS_DIR (default: docs). Choose the appropriate subdirectory based on type:

  • styleguide -> {DOCS_DIR}/styleguide/ directory
  • recipe -> {DOCS_DIR}/recipes/ directory
  1. Write the .md file with frontmatter:
---
type: styleguide | recipe
tags: [inferred, tags]
description: One-sentence summary
status: active
---

Then the knowledge content as markdown body.

  1. Run index:
npx @codevoyant/agent-kit mem index
  1. Confirm:
Learned: {DOCS_DIR}/styleguide/pnpm-over-npm.md

Recall Mode

Triggered by lookup phrases: "remind me about X", "what did we decide on Y", "what's our rule for Z".

Steps

  1. Infer type and/or tags from the question.

  2. Run:

npx @codevoyant/agent-kit mem find --type <inferred> --tag <inferred> --json
  1. Read the matching files.

  2. Answer the user's question from the content of those files.

If no matches found, say so and suggest /mem:learn to capture new knowledge.

Related skills

More from cloudvoyant/codevoyant

Installs
11
First Seen
Mar 21, 2026