One-click install
npx skills add https://github.com/littlebearapps/contextdocs --skill context-guard-littlebearapps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-guard
Source: https://github.com/littlebearapps/contextdocs/tree/main/.claude/skills/context-guard
Command: npx skills add https://github.com/littlebearapps/contextdocs --skill context-guard-littlebearapps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ContextDocs prevents stale or mismatched AI context files from drifting away from the current codebase, which can cause incorrect behavior and content-filter issues.

Core Features & Use Cases

  • Two-tier freshness enforcement: nudges at session end (Tier 1) and blocks commits when structural context updates are missing (Tier 2).
  • Content filter guardrails: reduces errors by treating high-risk OSS files (like LICENSE/SECURITY/CODE_OF_CONDUCT) as safely fetchable rather than blindly written.
  • Drift and structural change detection: checks after commits and after structural edits to remind you which context artifacts (AGENTS.md/CLAUDE.md/llms.txt/bridges) must be regenerated.
  • Automatic context updating via an updater agent: runs an autonomous context-updater agent to apply targeted incremental updates when hook output calls for it.

Quick Start

Ask an AI agent to run: install context guard hooks for your project to enable session-end nudges and drift/structural reminders.

Frequently Asked Questions about context-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent stale AI context files from drifting away from my codebase?

To prevent stale AI context files from drifting, you can use hook automation that detects structural changes after git commits and reminds you to regenerate artifacts like AGENTS.md or CLAUDE.md.

Can I block git commits when structural context updates are missing?

Yes, you can block git commits when structural context updates are missing by enforcing a commit guard tier via PreToolUse and PostToolUse hook events in your Claude Code session.

What is the best way to automate context updates for Claude Code sessions?

The best way to automate context updates is installing hook logic that triggers an autonomous context-updater agent to apply targeted incremental updates when structural drift is detected.

Does Claude Code hook automation work with high-risk OSS files like LICENSE or SECURITY?

Yes, Claude Code hook automation works with high-risk OSS files like LICENSE or SECURITY by treating them as safely fetchable rather than blindly written, reducing content-filter errors.

Why does context drift happen after committing structural changes to a repository?

Context drift happens after committing structural changes because the underlying codebase evolves while AI context artifacts like llms.txt or bridges remain unchanged, causing mismatched and stale references.