Cross-session memory - save insights after research, restore context at session start. Reduces re-exploration and prevents token waste.
From claude-praetoriannpx claudepluginhub vvkmnn/claude-emporium-beta --plugin claude-praetorianThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Context guard with automatic workflow nudges. Hooks fire at natural decision points — you decide whether to act on them.
Hooks emit one-line nudges (~20 tokens each). No disk I/O. You judge relevance.
| Hook | When It Fires | What It Says | Your Call |
|---|---|---|---|
| PreToolUse | Before Task, WebSearch, WebFetch | "Check restore — prior context may exist" | Restore if topic is familiar. Skip if clearly novel. |
| PostToolUse | After WebFetch, WebSearch | "Save key findings" | Compact research results. Reuse title to merge. |
| SubagentStop | After subagent completes | "Save key findings" | Compact subagent results. Don't let findings die with the agent. |
| PreCompact | Before any compact call | "Reuse title to merge" | Always follow — prevents duplicate compactions. |
When you see ⚜️ Check praetorian_restore(query="..."):
detail="full"When you see ⚜️ Save key findings: praetorian_compact(...):
praetorian_restore(query="auth JWT") # summary scan (~50 tokens/result)
praetorian_restore(query="auth JWT", detail="full") # full detail for relevant hit
praetorian_restore(project="current") # scope to this project
praetorian_restore() # recent compactions
Hooks handle: PreToolUse nudges before Task/WebSearch/WebFetch.
You handle manually: Before planning sessions, before launching subagents, at session start, after /clear.
Do your research, run subagents, make decisions. Hooks will nudge after.
praetorian_compact(type="web_research", title="auth JWT research",
key_insights=["JWT rotation every 15min", "RS256 preferred over HS256"],
refs=["src/auth/middleware.ts:45"])
Hooks handle: PostToolUse nudges after WebSearch/WebFetch, SubagentStop nudges after agents. You handle manually: After subagents return, after multi-file exploration, after solving a hard problem. Don't wait — compact incrementally.
Critical: Always reuse an existing title to merge. Creating a new compaction costs 1 of 13 slots per project. Merging is free.
praetorian_manage(action="status") # per-project counts, disk usage
praetorian_manage(action="prune", count=3) # remove 3 oldest
praetorian_manage(action="prune", project="/path/to/old-project")
Auto-limit: 13 per project. Oldest auto-pruned when exceeded. Only surface to user when >50 total or >500KB. If store is healthy, stay quiet.
When historian is active, check historian FIRST for conversation-level context, then praetorian for distilled insights. They complement:
When vigil is active, vigil handles file checkpoints. Praetorian handles knowledge checkpoints. Don't duplicate — vigil saves files, praetorian saves understanding.
Good compaction:
Bad compaction:
| Command | Description |
|---|---|
/compact-praetorian [type] [title] | Save current context |
/restore-praetorian [query] | Load previous context |