Skip to content
Back to skills

Hooks Session End

ASecurity

End the current session and persist state for later restoration.

  • 21 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 10, 2026
ai-agentsjavascriptjavabash

Works with

  • claude code
  • mcp

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add monoes/monomind --skill hooks-session-end --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hooks Session End?

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

Security grade badge for Hooks Session End
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monoes-hooks-session-end/badge)](https://www.skillsdirectory.com/skills/monoes-hooks-session-end)

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: hooks-session-end
description: End the current session and persist state for later restoration.
type: flow
---

# hooks session-end

End the current session and persist state for later restoration.

## Usage

```bash
npx monomind hooks session-end [options]
```

## Options

| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
| `--save-state` | `-s` | boolean | `true` | Save session state for restoration |
| `--format` | — | string | — | Output format: `json` |

## Examples

```bash
# End and save session (default)
npx monomind hooks session-end

# End without saving state
npx monomind hooks session-end --save-state false

# JSON output
npx monomind hooks session-end --format json
```

## Output

Session summary including:
- Session ID
- Tasks executed, agents spawned, patterns learned, trajectories recorded
- Pending insights and memory entries
- Whether the session state was saved, and which store took it

## Restore Later

```bash
# Restore most recent session
npx monomind hooks session-restore

# Restore specific session
npx monomind hooks session-restore -i session-12345
```

## Claude Code Integration

Typically wired to run at conversation end:

```json
{
  "hooks": {
    "Stop": [{
      "hooks": [{
        "type": "command",
        "command": "npx monomind hooks session-end"
      }]
    }]
  }
}
```

## MCP Tool

```javascript
mcp__monomind__hooks_session-end({
  saveState: true,
  timestamp: Date.now()
})
```

## See Also

- `hooks session-restore` — restore a previous session
- `hooks pre-task` / `hooks post-task` — task tracking within a session

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.

Comments

Loading comments…