Skip to main content
command CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-praetorian@claude-emporium
Open on GitHub

What 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_research titled "React 19 Server Components"
  • Run /compact-praetorian decisions to 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-emporium

2Manually: put the files in place

.claude/commands/compact-praetorian.md

Call it with /compact-praetorian. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set20

The whole set →
restore-vigil restore-vigil is a Claude Code command that lists saved checkpoints and restores files from a selected one. It supports returning a project to an earlier saved state. CX Codex +1 ★ 78repo stars reprompt-orator reprompt-orator rewrites a prompt with Anthropic techniques: scores it on seven dimensions, picks the fitting ones and hands back a restructured version. CX Codex +1 ★ 78repo stars search-oracle search-oracle searches across 17 sources for skills, plugins, and MCP servers. Useful when you need to discover and install new tooling directly inside Claude Code. CX Codex +1 ★ 78repo stars restore-praetorian restore-praetorian is a Claude Code command that retrieves past work from praetorian memory. It helps resume tasks by finding recent summaries or searching saved session context. CX Codex +1 ★ 78repo stars review-gladiator review-gladiator processes recorded observations across sessions, clusters recurring patterns, and suggests actionable workflow rules. CX Codex +1 ★ 78repo stars claude-oracle claude-oracle searches 17 sources for relevant skills, plugins, and MCP servers. It runs before planning and after Bash errors. CX Codex +1 ★ 78repo stars claude-praetorian claude-praetorian — a skill that snapshots your context before it gets compacted and brings it back later: before planning, after web research, when a subagent finishes. CX Codex +1 ★ 78repo stars claude-vigil claude-vigil saves file checkpoints and automatically quicksaves code before risky bash operations like rm or git reset. Roll back edits whenever an agent command goes wrong. CX Codex +1 ★ 78repo stars

Project sponsors

Companies that keep this analytics open