Skip to content
Back to skills

Kill Claude Mem

ASecurity

Kill stale claude-mem worker and MCP server processes that leak memory across sessions. Use when Codespace feels slow or memory is low.

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 2, 2026
toolsbashgit

Works with

  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned June 2, 2026

npx -y skills add reggiechan74/JobOps --skill kill-claude-mem --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kill Claude Mem?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kill Claude Mem
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reggiechan74-kill-claude-mem/badge)](https://www.skillsdirectory.com/skills/reggiechan74-kill-claude-mem)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kill-claude-mem
description: Kill stale claude-mem worker and MCP server processes that leak memory across sessions. Use when Codespace feels slow or memory is low.
allowed-tools: Bash
---

# Kill Stale claude-mem Processes

**Purpose:** claude-mem spawns worker-service and mcp-server processes per session that aren't always cleaned up when sessions end. Over multiple sessions, these accumulate and consume gigabytes of RAM. This command kills all instances; the plugin's hooks will re-spawn fresh ones on the next interaction.

**Upstream bug:** <https://github.com/thedotmack/claude-mem/issues/1089>

## Portable Installation

This skill folder is self-contained. To add it to another repo:

1. Copy the folder: `cp -r .claude/skills/kill-claude-mem /path/to/other/repo/.claude/skills/`
2. Run the installer: `cd /path/to/other/repo && bash .claude/skills/kill-claude-mem/install-hook.sh`

The installer adds a `SessionStart` hook to that project's `.claude/settings.json` so stale processes are cleaned automatically on every session startup.

## Files

| File | Purpose |
|------|---------|
| `SKILL.md` | This file — slash command definition |
| `kill-claude-mem.sh` | Cleanup script (used by hook and slash command) |
| `install-hook.sh` | One-time installer for the SessionStart hook |

## Execution Instructions

When this skill is invoked, run the cleanup script:

```bash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/kill-claude-mem/kill-claude-mem.sh"
```

Then verify the system state:

```bash
free -h | head -2
```

Report the results to the user in this format:

```
claude-mem cleanup
  Killed: X workers, Y MCP servers
  Memory freed: ~Z MB
  RAM: X.XGi used / 15Gi total
  Status: Fresh instances will spawn on next tool use
```

Files in this skill

  • SKILL.md1.7 KB
  • install-hook.sh2.3 KB
  • kill-claude-mem.sh1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.