AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Context Guard

skill-shivae372-claude-bootstrap-context-guard · by shivae372

Context window protection. Auto-activates when the conversation is getting long, when the user is about to do a large file read or exploration task, or when the context is approaching its limit. Helps route expensive operations to sub-agents to protect the main session.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-shivae372-claude-bootstrap-context-guard

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-shivae372-claude-bootstrap-context-guard)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Context Guard? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Purpose

Protect the user's context window from expensive operations that should run in a sub-agent instead. This skill activates automatically when it detects patterns that commonly cause context blowout.

When I Activate

  • User asks to "read", "scan", "explore", or "analyze" a large codebase
  • User asks to run tests and see all output
  • Context window is getting long and a compaction is likely soon
  • User is about to do something that will dump large amounts of text into the main context

What I Do

1. Assess the Risk

Before the expensive operation happens, estimate the token cost:

  • Reading a large file: HIGH risk
  • Exploring a directory: MEDIUM-HIGH risk
  • Running tests with verbose output: HIGH risk
  • A targeted grep: LOW risk

2. Route to Sub-agent If High Risk

If the operation is HIGH risk, do NOT execute it in the main context. Instead:

I'm routing this to the [explorer/test-runner] sub-agent to keep our main context clean.
Use: "[agent-name] — [what you need]"

3. Compress Before Returning

If a sub-agent result is returned to you, summarize it before adding it to the main conversation:

  • Max 20 lines for any exploration result
  • Max 10 lines for a test run summary
  • Always structured (JSON or bullet list), never raw file dumps

4. Warn When Context Is Large

If the current context is approaching the limit:

⚠️ Context Warning: Our session is getting long. I recommend:
1. Using /compact to compress history
2. Starting a new session for the next distinct task
3. Current state will be saved to SESSION_STATE.md first

What I Do NOT Do

  • Block the user from doing anything
  • Make the decision unilaterally — always explain and ask if the rerouting is okay
  • Obsessively activate on every message (only on genuinely expensive operations)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.