codevira: Instructions file for Claude Code

AGENTS.md

codevira AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from sachinshelke/codevira. It costs 2,603 tokens per session, scanned A, original, MIT.

Project instructions and persistent memory for Codevira, a tool that stores decisions and project context across coding sessions. They document fixed technical decisions and when to use Codevira's tools.

In plain words
What is it for?
Use them when working on a Codevira-tracked project, especially when handling storage, session data, startup behavior, hooks, or recorded engineering decisions.
Why use it?
They help coding agents follow existing project rules and avoid reversing decisions that were deliberately locked. They also direct agents to the approved ways to read and write project data.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

This is sachinshelke/codevira's own configuration. It tells Claude Code, Codex and OpenCode how to work on codevira itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codevira configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sachinshelke/codevira. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sachinshelke/codevira/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/sachinshelke/codevira

Made for: Claude Code, Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codevira AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sachinshelke/codevira/agents-md/github.svg)](https://agentmods.dev/instructions/sachinshelke/codevira/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sachinshelke/codevira/agents-md"><img src="https://agentmods.dev/badge/instructions/sachinshelke/codevira/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codevira AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sachinshelke/codevira/agents-md"><img src="https://agentmods.dev/badge/instructions/sachinshelke/codevira/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,603 This file is loaded in full into every session.
When invoked 2,603 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02603 $0.02603
Opus 5.5 $0.01041 $0.01041
Sonnet 5.5 $0.00521 $0.00521
Haiku 4.5 $0.00260 $0.00260

Measured 1mo ago against content hash f6ffdf6ad804, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codevira 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 1mo ago.

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 · 121 lines

How it starts

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

Codevira-tracked project memory: codevira

Codevira — cross-IDE persistent memory. Read it with the codevira MCP tools (get_session_context, search_decisions); do not open .codevira/*.jsonl directly — those files are large and token-heavy.

Locked decisions (do_not_revert)

  • D000001 All disk writes in product surface MUST go through mcp_server/storage/atomic.py — never use open(..., 'w'), write_text(… · atomic, concurrency, storage, v3.0.0-rc-audit
  • D000002 All read paths for decisions / sessions / phases MUST go through the v3.0.0 JSONL canonical store (storage/decisions_st… · jsonl, read-path, storage, v3.0.0-rc-audit
  • D000006 analyze_session_outcomes() MUST run in a daemon thread at MCP server startup, never inline. The function spawns N git s… · mcp_server/server.py · mcp, outcome-tracker, perf, startup, v3.0
  • D000007 Hook script fast-path uses ~/.codevira/engine.disabled sentinel as a persistent alternative to CODEVIRA_ENGINE=0 env va… · mcp_server/data/hooks/user_prompt_submit.sh · cli, engine, hooks, perf, v3.0
  • D000008 repair_incomplete_init() uses a per-project .registered sentinel file to skip the global.db open once registration is c… · mcp_server/_repair_init.py · concurrency, global-db, perf, startup, v3.0
  • D000009 CODEVIRA_NO_WATCHER=1 env var skips start_background_watcher() in both stdio and HTTP MCP servers. Each codevira proces… · mcp_server/server.py · env-var, fsevents, perf, v3.0, watcher
  • D000010 Any change to a hero policy (mcp_server/engine/policies/*.py) — especially relevance_inject and decision_lock — MUST ru… · mcp_server/engine/policies/relevance_inject.py · e2e, hero-policy, regression, relevance-inject, testing, v3.0, wedge
  • D000012 The v3.0.0 JSONL store WRITE path now validates the resolved project root via is_invalid_project_root() inside storage/… · mcp_server/storage/paths.py · claude-desktop, forbidden-root, g5, ship-blocker, storage, v3.0.0, write-path
  • D00011Z [supersedes D00011W: D00011W claimed the data-loss bug was fixed and was locked do_not_revert on that basis. An adversa… · mcp_server/migrate.py · corrected, data-loss, high-severity, migration, release-blocker, root-cause, v3.7.1
  • D00012K [supersedes D0000PV: D0000PV's constraint is right and stands, but both of its numbers were retired by D00011J's measur… · budget, do-not-revert, footprint, invariant, lean, lightweight, performance
  • D00012X codevira clean is the UNINSTALLER, not a registry pruner — it removes hooks, unregisters from settings.json, and dele… · mcp_server/cli_uninstall.py · cli, destructive, gotcha, incident, naming
  • D000140 Background work degrades on an unresolvable project root; a tool answering a question refuses loudly. Never guard a too… · tests/test_background_degrades.py · background-work, crash-log, do-not-revert, invariant, project-binding, reachability, v4.2.0
  • D000141 check_conflict deliberately classifies a non-negated near-duplicate of a do_not_revert decision as a CONFLICT, where re… · mcp_server/tools/check_conflict.py · check-conflict, classifier, do-not-revert, invariant, reconcile, supersede-on-write, v4.2.0
  • D000142 "skipped" in a release-evidence file means a gate could not run, and the publish hook refuses it. The hook enforces EVE… · .claude/hooks/pre-release-block.sh · could-not-check, do-not-revert, gates, invariant, pre-release-hook, release-gauntlet, v4.2.0

Read the full file on GitHub · 121 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. 1mo ago Changed · -1 lines · -35 tokens per session f6ffdf6ad804
  2. 1mo ago First seen · 122 lines · 2,638 tokens per session scan A c427cba674b6

Subscribe to this mod's changes

codevira AGENTS.md is an instructions file published in the GitHub repository sachinshelke/codevira (12 stars, last pushed 1mo ago), licensed MIT. It adds 2,603 tokens to every session, about $0.0104 per session on Opus 5.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-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,786 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens