contextdocs AGENTS.md

A Markdown instruction set for ContextDocs, a Claude Code plugin that generates, maintains, and audits project guidance files for AI coding tools.

In plain words
What is it for?
Use it to update stale context, create or audit agent guidance, and follow the project's commands, conventions, available skills, and workflow.
Why use it?
It defines one shared AGENTS.md source and smaller bridge files for tools such as Claude Code, Codex, Cursor, Copilot, Cline, Windsurf, and Gemini.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/littlebearapps/contextdocs/agents-md
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/contextdocs

Made for: Codex, OpenCode.

Per session 1,453 This file is loaded in full into every session.
When invoked 1,453 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01453 $0.01453
Opus 5 $0.00727 $0.00727
Sonnet 5 $0.00291 $0.00291
Haiku 4.5 $0.00145 $0.00145

Measured yesterday against content hash 001c0de5eb55, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

contextdocs AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ContextDocs

Identity

ContextDocs is a Claude Code plugin for generating, maintaining, and auditing AI IDE context files. Pure Markdown, zero runtime dependencies. Applies the Signal Gate principle — only includes what agents cannot discover on their own.

Generated project context follows an AGENTS-first model: AGENTS.md carries the shared conventions, commands, and constraints, while CLAUDE.md, .cursor/rules/agents.mdc, optional Copilot instructions, .clinerules/agents.md, .windsurfrules, and GEMINI.md stay thin bridges. For Claude Code, CLAUDE.md is auto-loaded every session and uses @AGENTS.md to import the canonical shared context. Other tools (Codex CLI, Gemini CLI, OpenCode, Copilot's coding agent) load AGENTS.md directly at startup. Modern Cursor uses the .cursor/rules/*.mdc directory format with frontmatter; modern Cline uses the .clinerules/ directory mode with optional path-scoped frontmatter. Legacy .cursorrules and flat .clinerules are preserved only when already present.

Agent

Agent What It Does
context-updater Autonomously updates stale AI context files with an AGENTS-first workflow — updates shared context in AGENTS.md, then refreshes only affected bridge files. Capped at 10 turns, no internet access (Claude Code only)
docs-freshness Read-only documentation freshness checker — detects stale docs, version mismatches, missing files, suggests /pitchdocs:* commands to fix. Capped at 8 turns, enforces read-only via disallowedTools (PitchDocs, Claude Code only)

Available Skills

Skills are loaded on-demand. Each lives at .claude/skills/<name>/SKILL.md. There are 3 skills in total.

Skill What It Provides
ai-context AGENTS-first AI IDE context generation across 8 tools — builds canonical AGENTS.md, then emits thin bridges for Claude, Copilot (optional), Cursor (.cursor/rules/*.mdc), Windsurf, Cline (.clinerules/ directory), and Gemini, with init/update/promote/audit lifecycle support and an opt-in six-section AGENTS.md scaffold
context-guard Context Guard hook installation — two-tier enforcement, SessionStart health check, settings.json configuration with if: permission-rule matchers (v2.1.85+), companion reference for 17 hook events and 4 handler types, troubleshooting. Primary: Claude Code (12 events); cross-platform: Gemini CLI (11), Copilot (8), Cursor (4+), Cline (3)
context-verify Context file validation — line budgets, discoverable content detection, stale paths, @import validation, rule path-scope and symlink checks, .mcp.json validation, agent memory hygiene, plugin manifest completeness, AGENTS-to-bridge consistency, aggregate context load, modern Cursor/Cline layout checks, Copilot bridge optionality, and 0–100 health scoring with CI integration across 16 checks. Also available as standalone CLI (bin/context-verify.sh)

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 60 lines · 1,453 tokens per session scan A 001c0de5eb55

Subscribe to this mod's changes

contextdocs AGENTS.md is an instructions file published in the GitHub repository littlebearapps/contextdocs (5 stars, last pushed 1mo ago), licensed MIT. It adds 1,453 tokens to every session, about $0.0073 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.