OpenParable
Skip to content
← Back to skills

Claude Praetorian

Agent Building
claude-praetorian

Claude Praetorian is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Context preservation with cross-session memory — hooks prompt compaction at high-impact moments, siblings enrich what gets saved

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/context-management/claude-praetorian/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/claude-praetorian, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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