# Kmg session wrap

> Kmg session wrap is an open-source agent skill for knowledge and memory. Prompts the agent to offer a session summary when you wrap up or near context limits. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/technomensch/knowledge-graph/tree/main/skills/kmg-session-wrap
- **Repository:** https://github.com/technomensch/knowledge-graph
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** kmg-session-wrap
- **Collection:** https://github.com/technomensch/knowledge-graph
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-12-03

## About

This skill tells the agent to offer a wrap-up summary when a session is ending, whether because the user says they are stopping, the context window is nearly full, a milestone is reached or a PR is pushed. It also looks for signals such as unchecked plan items, open draft decisions and lesson-worthy commits that lack a matching lesson file, and mentions them in the prompt.

The skill is coordinated with a Stop hook through a temporary flag file so the user is not prompted twice. It also checks for a same-day snapshot flag and adjusts the wording if a partial summary already exists. On Claude Code the coordination uses files in /tmp, and the skill describes equivalent mechanisms for other platforms.

After the summary is written, the skill scans recently changed decision and enhancement files for Open Questions sections, deduplicates them and adds an Open Items section. It expects a knowledge folder layout with plans, decisions, lessons-learned and enhancements directories, and it relies on git history.

## When your agent uses it

> Prompt for session summary when user indicates they are stopping work or approaching context limits

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/technomensch/knowledge-graph/tree/HEAD/skills/kmg-session-wrap)
- [License: MIT](https://github.com/technomensch/knowledge-graph/tree/HEAD/skills/kmg-session-wrap)

## Features

- **Session end detection:** Recognises stop phrases, context-limit thresholds, milestones and pushed pull requests as cues to offer a wrap-up.
- **Open work scanning:** Looks for unchecked plan items, proposed or draft decisions and commits lacking lesson notes.
- **Duplicate prompt prevention:** Uses a temporary flag shared with a Stop hook so the wrap-up prompt is not repeated.
- **Snapshot awareness:** Changes the prompt wording when a session snapshot was already taken earlier that day.
- **Open items aggregation:** Collects Open Questions from changed decision and enhancement files into one deduplicated list.

## Good for

- Wrap up today's coding session with a summary
- Check whether my plan still has unfinished steps before I stop
- Capture lessons from recent fixes before closing the session
- Collect open questions from recently changed decision records

## Install

### Claude Code

This skill ships in the `kmgraph` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add technomensch/knowledge-graph
/plugin install kmgraph@knowledge-management-graph
```

Or copy only this skill to `~/.claude/skills/kmg-session-wrap`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kmg-session-wrap &&
cp -R "$tmp/skills/kmg-session-wrap" ~/.claude/skills/kmg-session-wrap &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/kmg-session-wrap` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/kmg-session-wrap` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kmg-session-wrap &&
cp -R "$tmp/skills/kmg-session-wrap" ~/.agents/skills/kmg-session-wrap &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/kmg-session-wrap` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/kmg-session-wrap` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kmg-session-wrap &&
cp -R "$tmp/skills/kmg-session-wrap" ~/.cursor/skills/kmg-session-wrap &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/kmg-session-wrap` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/technomensch/knowledge-graph.git --path skills/kmg-session-wrap
```

Or copy the folder to `~/.gemini/skills/kmg-session-wrap` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/kmg-session-wrap`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kmg-session-wrap &&
cp -R "$tmp/skills/kmg-session-wrap" ~/.copilot/skills/kmg-session-wrap &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/kmg-session-wrap` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git
```

Then copy `knowledge-graph/skills/kmg-session-wrap` into your agent's skills folder as `kmg-session-wrap`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Kmg session wrap need to run?

It expects a knowledge folder with plans, decisions, lessons-learned and enhancements directories, a git repository for the diff scan, and on Claude Code the Stop hook flag mechanism in /tmp.

### Does Kmg session wrap change any files?

The skill describes dispatching to a session summary agent and adding an Open Items section to the summary. It does not describe editing other files directly.

### When does the prompt appear?

The skill triggers when the user signals they are stopping, the context nears about 180K tokens, a PR is pushed or a milestone is completed.

### How do I install Kmg session wrap in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kmg-session-wrap to use it in all your projects, or to .claude/skills/kmg-session-wrap in one project. Or install the kmgraph plugin, which includes it: /plugin marketplace add technomensch/knowledge-graph, then /plugin install kmgraph@knowledge-management-graph.

### Does Kmg session wrap run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Kmg session wrap?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Kmg session wrap?

The closest alternatives to Kmg session wrap are Close session, Wrapup, Session memory, Recap and Remember.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Close session](https://ai-powered.com/skills/close-session): Close session is an open-source agent skill for knowledge and memory.
- [Wrapup](https://ai-powered.com/skills/wrapup): Wrapup is an open-source agent skill for knowledge and memory.
- [Session memory](https://ai-powered.com/skills/session-memory): Session memory is an open-source agent skill for knowledge and memory.
- [Recap](https://ai-powered.com/skills/recap-onebrain-ai): Recap is an open-source agent skill for knowledge and memory.
- [Remember](https://ai-powered.com/skills/remember-ajyadav013-2): Remember is an open-source agent skill for knowledge and memory.
- [Kmg lesson capture](https://ai-powered.com/skills/kmg-lesson-capture): Kmg lesson capture is an open-source agent skill for knowledge and memory.
- [Kmg knowledge graph usage](https://ai-powered.com/skills/kmg-knowledge-graph-usage): Kmg knowledge graph usage is an open-source agent skill for knowledge and memory.
- [Kmg rules capture](https://ai-powered.com/skills/kmg-rules-capture): Kmg rules capture is an open-source agent skill for knowledge and memory.

---
Source: https://ai-powered.com/skills/kmg-session-wrap
