compact-praetorian — Claude Code command: save context to memory
compact-praetorian — a Claude Code command that writes the current session context into praetorian memory so it persists across sessions. Trigger it after research, exploration, or any decision worth keeping.
MIT ★ 78 updated 2026-03-05
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-praetorian@claude-emporiumWhat compact-praetorian does
The command calls praetorian_compact() and stores context under one of four types: web_research for API docs and fetch results, task_result for subagent output, file_reads for codebase patterns and architecture notes, and decisions for technical choices with rationale. Run it without arguments and it enters interactive mode, prompting for type and title. Pass both on the same line to skip the prompts.
The function takes a key_insights array for the main findings and a refs array for file:line pointers. That means saved memory can be anchored to exact lines in the codebase, not just free-form notes.
To install via the marketplace, run /plugin marketplace add Vvkmnn/claude-emporium first, then /plugin install claude-praetorian@claude-emporium. The command file lands at .claude/commands/compact-praetorian.md. It is part of the claude-emporium collection by vvkmnn.
What it helps with
- persist web research results before ending a session
- record an architectural decision with its rationale for the next session
- save codebase patterns with file and line references
- store a subagent's output as a named, typed memory entry
- pass context between sessions without manual copy-paste
Example prompts for the agent
- Save current research as
web_researchtitled "React 19 Server Components" - Run
/compact-praetorian decisionsto record the authorization architecture choice - Call
/compact-praetorian task_result "Auth implementation"once the task is done
How to install compact-praetorian
1Plugin marketplace
/plugin marketplace add Vvkmnn/claude-emporium/plugin install claude-praetorian@claude-emporium2Manually: put the files in place
.claude/commands/compact-praetorian.mdCall it with /compact-praetorian. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/compact-praetorian.mdCall it with /prompts:compact-praetorian. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/compact-praetorian.prompt.mdManually: put the files in place
.gemini/commands/compact-praetorian.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about compact-praetorian
How do I install compact-praetorian in Claude Code?
Run /plugin marketplace add Vvkmnn/claude-emporium, then /plugin install claude-praetorian@claude-emporium. The command becomes available at .claude/commands/compact-praetorian.md.
What does compact-praetorian do?
It saves the current session's context — findings, file references, and a typed label — into praetorian memory so later sessions can retrieve it.
What memory types does compact-praetorian support?
Four: web_research, task_result, file_reads, and decisions. Pass the type as the first argument; omit it and the command will ask interactively.
Source text
compact-praetorian.md · MIT
---
name: compact-praetorian
description: Save current context to praetorian memory
arguments: type?, title?
---
# /compact-praetorian
Save valuable context for future sessions using praetorian memory.
## Usage
- `/compact-praetorian` - Interactive mode (you'll be asked for type and title)
- `/compact-praetorian web_research` - Save as web research
- `/compact-praetorian task_result "Auth implementation"` - Save with title
## Types
| Type | Use For |
|------|---------|
| `web_research` | WebFetch results, API docs, research |
| `task_result` | Subagent results, exploration findings |
| `file_reads` | Codebase patterns, architecture insights |
| `decisions` | Technical decisions with rationale |
## Action
Call `praetorian_compact()` with:
- `type`: One of the types above
- `title`: Concise description of what's being saved
- `key_insights`: Array of main findings
- `refs`: Array of file:line references (if applicable)
## Example
```
praetorian_compact(
type: "web_research",
title: "React 19 Server Components",
key_insights: [
"Server components can't use useState/useEffect",
"Use 'use client' directive for client components",
"Server components can directly access databases"
],
refs: []
)
```
© vvkmnn · MIT · Vvkmnn/claude-emporium