Get the FREE Ultimate OpenClaw Setup Guide →

claude-praetorian

Scanned
npx machina-cli add skill Vvkmnn/claude-emporium/claude-praetorian --openclaw
Files (1)
SKILL.md
2.6 KB

Praetorian Plugin

Context guard. Saves and restores valuable context at the right moments — before planning, after research, when subagents complete.

Hooks

HookWhenAction
PreToolUse(EnterPlanMode)Before planningLists prior compactions, suggests restoring
PreCompactBefore context resetsPrompts to save decisions/insights/findings
PostToolUse(WebFetch/WebSearch)After web researchPrompts to compact as web_research
SubagentStopAfter subagent completesPrompts to compact as task_result

Commands

CommandDescription
/compact-praetorian [type] [title]Save current context
/restore-praetorian [query]Load previous context

Workflows

Compact (standalone)

  1. Identify what's worth saving (research, decisions, patterns)
  2. praetorian_compact(type, title, key_insights, refs)
  3. Verify with praetorian_restore(title) to confirm it saved

Compact (with siblings)

  1. If historian active: search_plans() to check if past context already covers this
  2. If oracle active: include any tool discoveries in key_insights
  3. praetorian_compact(type, title, key_insights, refs)
  4. If vigil active: files are also checkpointed via quicksave

Restore (standalone)

  1. praetorian_restore() — list recent compactions
  2. praetorian_restore("query") — search for specific topic
  3. Summarize findings for the current task

Restore (with siblings)

  1. praetorian_restore("query") — load praetorian context
  2. If historian active: search_conversations("query") for broader session history
  3. If oracle active: search("query") for tools relevant to the restored context
  4. Combine all sources into a unified briefing

Sibling Synergy

SiblingValueHow
HistorianPast plans surface during planning compactionssearch_plans() enriches pre-plan hook
OracleTool discoveries included in compactionsOracle results added to key_insights
GladiatorObservations inform what to compactFailure patterns highlight important context
VigilFiles checkpointed alongside contextQuicksave protects files during compaction

Requires

claude mcp add praetorian -- npx claude-praetorian-mcp

Source

git clone https://github.com/Vvkmnn/claude-emporium/blob/main/plugins/claude-praetorian/skills/claude-praetorian/SKILL.mdView on GitHub

Overview

Praetorian preserves and restores valuable context across sessions by prompting compaction at key moments. It saves decisions, insights, and findings during planning, research, and after subagent completion, so critical context isn’t lost.

How This Skill Works

It hooks into core moments (PreToolUse, PreCompact, PostToolUse, SubagentStop) to prompt saving. Users save with /compact-praetorian and load with /restore-praetorian, while siblings Historian, Oracle, Gladiator, and Vigil enrich and checkpoint the context for richer briefings.

When to Use It

  • Before planning to surface prior compactions and restoration suggestions
  • After web research to compact web_research findings
  • When a subagent completes to save task results
  • During long-running tasks to checkpoint decisions and patterns
  • When cross-session memory is needed to maintain context across sessions

Quick Start

  1. Step 1: Trigger Praetorian hooks at key moments (PreToolUse, PreCompact, PostToolUse, SubagentStop)
  2. Step 2: Save context with /compact-praetorian [type] [title] and include key_insights and refs
  3. Step 3: Load context later with /restore-praetorian [query] and review the unified briefing

Best Practices

  • Identify high-value insights, decisions, and patterns to save
  • Include clear references and source refs for each saved item
  • Leverage siblings (Historian, Oracle, Gladiator, Vigil) to enrich key_insights
  • Verify saved context with praetorian_restore to ensure completeness
  • Use Vigil quicksave where available to checkpoint files during compaction

Example Use Cases

  • Compact web_research after a WebFetch to preserve discoveries as web_research
  • Save planning context with Historian-enriched past plans during strategy work
  • Restore context after a subagent completes to resume the task with full briefing
  • Combine Gladiator failure patterns with current findings to highlight risks
  • Checkpoint critical decisions across multi-tool sessions for a unified briefing

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers