Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

context-guardian

Skill by sickn33

Context Guardian saves critical project data before Claude Code's automatic context compaction. It creates snapshots, checks their integrity and writes a transition briefing for the session that continues.

  • Score 92
  • 50k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install context-guardian

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/context-guardian ~/.claude/skills/context-guardian

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install context-guardian in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Context Guardian protects long technical sessions from losing details when Claude Code automatically compacts older messages. It works during a session. It extracts technical decisions, task state, applied fixes, changed code, errors and working commands, sorted into priority levels P0, P1 and P2. It then runs an integrity checklist and saves the results in three layers: a structured Markdown snapshot, an update to MEMORY.md, and a context-agent save. It also produces a transition briefing and a completeness check after compaction. The source says it is written for complex projects, such as ecosystems with many skills, security audits and architecture refactors. It complements the separate context-agent skill, which handles persistence between sessions.

Written from the project's SKILL.md and checked against it.

What it can do

  • Structured extractionExtracts critical categories from the conversation and ranks them P0, P1 or P2 by loss risk.
  • Integrity verificationRuns a checklist to confirm that modified files, bugs, decisions and pending tasks are complete.
  • Redundant persistenceSaves a snapshot file, updates MEMORY.md and triggers a context-agent save.
  • Transition briefingWrites a briefing with current state, pending tasks, critical decisions and key paths.
  • Quick protocolGives a short fallback procedure when there is little time before compaction.
  • Post-compaction checkReviews preserved context after compaction and loads or searches context-agent data if gaps remain.

What you need

  • Python to run the context_snapshot.py script
  • The separate context-agent skill for its save, load and search steps
  • Write access to the snapshot data directory

Try asking

  • Save a snapshot of this session before the context gets compacted
  • Create a checkpoint with the pending tasks and critical decisions
  • Run the integrity check on the current session state before compaction

Good to know

  • The script only creates a template. It does not read the conversation or detect compaction.
  • It does not promise full recovery or an exact percentage of the context window.
  • Save and prune actions need explicit approval, and MEMORY.md must not be changed without authorization.
  • context-agent is a separate dependency.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/context-guardian/SKILL.md, skills/context-guardian/scripts/context_snapshot.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md14 KB
  • references/extraction-protocol.md4 KB
  • references/verification-checklist.md4 KB
  • scripts/context_snapshot.py8 KB

Alternatives to context-guardian

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

context-guardian: common questions

What does Context Guardian protect?

It protects critical project data, such as technical decisions, task state, applied fixes and working commands, before Claude Code compacts older messages. The source lists these as P0 categories.

Does Context Guardian need context-agent?

Its persistence layer calls the context-agent save command, and the source describes context-agent as a separate dependency. The snapshot step can run without it if the format in the extraction protocol is followed manually.

Can Context Guardian delete my snapshots?

The source says the skill can remove snapshots during pruning. It warns to confirm the data directory, keep a backup and get explicit approval before running save or prune.

How do I install context-guardian?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is context-guardian free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is context-guardian safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to context-guardian?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

context-guardian Install

Add to stack

Loading.