---
title: "Hooks + skills, when memory feeds itself — StudioMeyer Academy"
description: "The difference between 'using memory' and 'memory runs by itself'."
canonical: "https://studiomeyer.academy/en/lernwege/fuer-entwickler/lektionen/04-hooks-und-skills"
language: en
image: "https://studiomeyer.academy/og/academy-og-share.png"
publisher: "StudioMeyer Academy, https://studiomeyer.academy (llms.txt: https://studiomeyer.academy/llms.txt)"
---

## The problem

You have memory. You know how to call `nex_learn`. But typing "remember X" every time is tiring. After two weeks you stop.

The fix: the system does it on its own.

## What hooks are

Hooks are little scripts that fire automatically on certain events. Claude Code has 8 event types: SessionStart, PreToolUse, PostToolUse, Stop, UserPromptSubmit, PreCompact, SessionEnd, Notification.

A hook is often just a one-line bash script.

## Example: session-start hook

In `~/.claude/settings.json`:

```json
{
  "hooks": {
    "SessionStart": [{
      "hooks": [{
        "type": "command",
        "command": "echo 'Reminder: call nex_session_start first'"
      }]
    }]
  }
}
```

The AI sees this nudge. It calls `nex_session_start`, learns what happened last time, you're instantly in flow.

## What skills are

Skills are recurring work recipes you can drop as a file. In `~/.claude/skills/deploy/SKILL.md` you write once how your deploy goes:

```markdown
# Deploy to prod

1. Local: npm test && npm run build
2. Git push
3. SSH to prod: cd /app && git pull && docker compose up -d --build
4. Health check
```

Now when you type "deploy the new version", Claude pulls this skill automatically.

## Combined: hook + skill + memory

1. Hook on session start triggers `nex_session_start`.
2. Memory delivers the last session notes.
3. You write: "Run the deploy."
4. Claude checks memory, finds "deploy" skill.
5. Skill runs, memory updates record what happened.
6. Session-end hook writes a summary to memory.

Next start: it's all there.

## What changes with this

Without these layers, you occasionally use AI. With them, you **work** with AI. The difference isn't technical, it's emotional. You trust the system.

## Update 2026-04-23: the direct mcp\_tool hook

Claude Code v2.1.118 added a new hook type, `type: "mcp_tool"`. You can now call MCP tools directly from a hook without the bash-wrapper trick. Your Stop hook no longer says `echo 'Reminder, call nex_summarize'` and hopes the model listens. Now it fires `nex_summarize` itself, deterministic, with `${session_id}` as a substitution variable.

This shifts the architecture. From "hook nudges the model" to "hook does it itself". Great for MCP servers with idempotent tools (Memory, GEO, Academy). Less suitable for tools that need user input.

Details and 5 hook bundles for our SaaS MCPs (Memory, CRM, GEO, Crew, Academy) live in Lesson 10 of this level and in Phase 16 of the recipes (`/recipes/16.1-mcp-tool-hook-intro` through `16.5-academy-hook-bundle`).

## Next lesson

In Lesson 5 you learn tool portability, same memory across Claude, Cursor and Codex.

You can read everything freely. An account keeps your progress saved.

[Sign in](https://studiomeyer.academy/en/login?next=%2Fen%2Flernwege%2Ffuer-entwickler%2Flektionen%2F04-hooks-und-skills)

For developers · Module 1 of 1

## For developers

[Back to learning path](https://studiomeyer.academy/en/lernwege/fuer-entwickler)

## Your notes

Sign in to save your own notes for this lesson.

[Sign in](https://studiomeyer.academy/en/login?next=%2Fen%2Flernwege%2Ffuer-entwickler%2Flektionen%2F04-hooks-und-skills)

## Sitemap

Public pages of this site as Markdown: [sitemap](https://studiomeyer.academy/sitemap.md). Curated entry point: [llms.txt](https://studiomeyer.academy/llms.txt), full text: [llms-full.txt](https://studiomeyer.academy/llms-full.txt).
