# Nmem Skill Load

> Search Nowledge Mem for skills matching a query and load or inject them on-demand into the current conversation turn or workspace. Triggered by /nmem-skill-load <query> or proactive task discovery.

- Skill: `nowledge-co/nmem-skill-load` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add nowledge-co/nmem-skill-load`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nowledge-co/nmem-skill-load/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: nowledge-co (https://skillmd.com/u/nowledge-co)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nowledge-co/nmem-skill-load

---


# Nowledge Mem On-Demand Skill Loader

Dynamically discover, preview, and load compiled AI skills from Nowledge Mem into the active conversation turn or local workspace.

## Primary Entry Point

Use this skill when:
- The user runs `/nmem-load-skill <skill query>` or asks to "load skill <query>".
- Antigravity discovers an unhandled domain task (e.g. Makefile, RPM packaging, Docker, Flatpak, specialized database migrations) where a relevant skill exists on the Nowledge Mem server but is not yet active locally.

---

## Workflow

### Step 1: Search for Matching Skills
Run `load_skill.py search` to query Nowledge Mem for candidate or compiled skills matching the query:

```bash
python3 hooks/nmem_entrypoint.py skill-load search "<skill query>"
```

The script returns JSON listing available matching skills with their `id`, `name`, `description`, `stage`, and relevance.

### Step 2: Present Preview & Selection
If multiple matching skills are returned, present the choices to the user before loading:
- Use `ask_question` to let the user select the desired skill.
- If a single skill clearly matches, present a brief summary of the skill name and description.

### Step 3: Fetch Skill Body
Retrieve the full skill body without altering the global activation state on the server:

```bash
python3 hooks/nmem_entrypoint.py skill-load fetch "<skill_id>"
```

### Step 4: Load into Active Session

Select the appropriate loading mode based on user intent:

#### Mode A: Ephemeral Turn Injection (Zero-Restart)
When the user wants the skill loaded immediately for the current task without persisting files:
- **Clean Formatting**: Strip leading YAML frontmatter (`---...---`) from the fetched skill body before rendering to the user.
- **No Raw XML Tags**: Do NOT output raw `<dynamically_loaded_skill>` XML tags or unparsed YAML frontmatter headers in user-facing chat text.
- Present the ingested skill using a clean GitHub-style callout:
  ```markdown
  > [!TIP]
  > **Loaded Skill Context**: `<skill_name>` (`<trust_badge>`)
  > *Ingested into active turn for this workspace.*

  <clean-markdown-body-content>
  ```
- Proceed directly to follow the injected skill's instructions for the current turn.

#### Mode B: Persistent Workspace Installation
When the user asks to install the skill for future use in the current repository:
```bash
python3 hooks/nmem_entrypoint.py skill-manage install "<skill_id>" "<workspace-root>" [--ignore]
```
- Installs the file to `<workspace-root>/.agents/skills/<skill-name>/SKILL.md`.
- Appends `.agents/skills/<skill-name>/` to `<workspace-root>/.git/info/exclude` if `--ignore` is set.
- Notify the user once installed.

