# Agent skill

> A ready-made mmw-memory skill for Claude Code and Codex. The agent searches memory at the start of a task and saves decisions at the end, with no edits to CLAUDE.md.

Connecting MMW gives an agent memory tools. On its own, though, the agent does not know when to use them: it may never look into memory, or it may save everything.

The `mmw-memory` skill fixes that with one file. The agent loads it by itself when a task fits. It searches memory at the start of a task, reads the `conflict` and `stale` statuses correctly, saves decisions together with the reason and never saves secrets.

Skill file: [docs.mmwhub.tech/skills/mmw-memory/SKILL.md](/skills/mmw-memory/SKILL.md)

The skill does not connect MMW, it only teaches the agent to use the memory. Connect MMW to your client first with the [quickstart](/start/quickstart/).

## Install

  
    For all your projects:

    ```bash
    mkdir -p ~/.claude/skills/mmw-memory && curl -fsSL https://docs.mmwhub.tech/skills/mmw-memory/SKILL.md -o ~/.claude/skills/mmw-memory/SKILL.md
    ```

    For one project only (commit the file and the whole team gets it):

    ```bash
    mkdir -p .claude/skills/mmw-memory && curl -fsSL https://docs.mmwhub.tech/skills/mmw-memory/SKILL.md -o .claude/skills/mmw-memory/SKILL.md
    ```

    Restart Claude Code. Ask it "which skills do you have?" and mmw-memory should be on the list.
  
  
    ```bash
    mkdir -p ~/.codex/skills/mmw-memory && curl -fsSL https://docs.mmwhub.tech/skills/mmw-memory/SKILL.md -o ~/.codex/skills/mmw-memory/SKILL.md
    ```

    Start Codex again; the skill is picked up at startup.
  
  
    Clients without skills understand the same text as ordinary rules. Download the file and paste its content, without the lines between the first pair of `---`, into your project rules (`.cursor/rules` in Cursor) or into `AGENTS.md`.

    ```bash
    curl -fsSL https://docs.mmwhub.tech/skills/mmw-memory/SKILL.md
    ```
  

## Check that it works

Open a new session and give the agent a task in a project MMW already knows something about, for example "add caching to the reports service". Its first step should be a `search` on the topic. At the end, if a decision was made, it calls `remember` with the reason.

If the agent only searches when you ask it to, the skill did not load. Check the file path and restart the client.

## What is inside

The skill follows the [best practices](/memory/best-practices/):

- when to search and how to read `conflict`, `stale` and `superseded`;
- when to save and how to name `fact_key` so a new version replaces the old one;
- what never to save: keys, passwords, raw logs, temporary state;
- when to forget;
- save the outcome of a task before the final answer.

## Your own rules

You can extend the skill. For example, list your team's workspaces at the end of your copy:

```markdown
## Workspaces
- decisions: architecture and process decisions
- docs: facts from documents, always with source_id
```

Updating the skill with `curl` overwrites your edits. Keep your additions in a separate file, such as the project's `CLAUDE.md`.

## Next
