Agent Context Guard banner
vishal-kumar9032 vishal-kumar9032

Agent Context Guard

Testing community

Description

Codebase AI Agent Readiness & Context Hygiene Radar: audits steering docs (AGENTS.md, CLAUDE.md, .cursorrules), token waste/pollution, test determinism, and secret isolation. Offline, ~200ms, zero tokens.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

agent-context-guard ๐Ÿค–๐Ÿ›ก๏ธ

**Codebase AI Agent Readiness & Context Hygiene Radar**

A fast, deterministic, 100% offline Rote Play that audits any repository to measure how effectively autonomous AI coding agents (Antigravity, Cursor, Claude Code, Copilot, Codex, Aider) can operate inside it.

Built for the **Rote Playoffs Hackathon 2026** by [@vishal-kumar9032](https://github.com/vishal-kumar9032).


โšก The Problem

When developers open an AI coding agent inside a project, agents frequently hallucinate, degrade in reasoning quality, burn hundreds of thousands of unnecessary tokens, or leak credentials. Why?

  1. No Steering Context: Missing AGENTS.md, CLAUDE.md, or .cursorrules forces agents to guess build, test, and style conventions.
  2. Context Pollution: Giant unignored build folders, minified bundles (bundle.min.js), database dumps, or log files drown the LLM's context window in noise.
  3. Missing Verification Scripts: Agents cannot run tests to verify their own code changes if there is no deterministic test command declared.
  4. Secret Exposure in Prompts: Local .env files not excluded in .gitignore get ingested directly into remote model prompts.

๐Ÿ›ก๏ธ What `agent-context-guard` Checks

Pillar Focus What is Audited
๐Ÿงญ Steering (25 pts) Instructions Presence and size of AGENTS.md, CLAUDE.md, .cursorrules, .cursor/rules/*.mdc. Flags bloated (>400 line) rulebooks that degrade model attention.
๐Ÿงน Token Hygiene (25 pts) Context Noise Scans for unignored node_modules, build directories (dist, .next, target), large binaries, and minified files. Estimates wasted tokens.
๐Ÿงช Verification (25 pts) Determinism Detects reproducible test, build, and lint commands (npm test, pytest, cargo test, go test, make test).
๐Ÿ”’ Safety (25 pts) Secret Isolation Detects unignored .env or credential files that could be exposed to LLM prompts.