context-os

context-os is a cursor rule for Cursor from kok-o/contextos-agents. It costs 24 tokens per session (448 once invoked), scanned A, original, Apache-2.0.

Agent-requested: invoke when working on context-os. Deterministic context compiler and policy engine for AI coding agents.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install with agentmods
npx agentmods add rules/kok-o/contextos-agents/context-os
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.

Clone the repo
git clone --depth 1 https://github.com/kok-o/contextos-agents

Made for: Cursor.

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 context-os

README.md
[![agentmods](https://agentmods.dev/badge/rules/kok-o/contextos-agents/context-os/github.svg)](https://agentmods.dev/rules/kok-o/contextos-agents/context-os)
Your own site
<a href="https://agentmods.dev/rules/kok-o/contextos-agents/context-os"><img src="https://agentmods.dev/badge/rules/kok-o/contextos-agents/context-os/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 context-os

Your own site · 80×15
<a href="https://agentmods.dev/rules/kok-o/contextos-agents/context-os"><img src="https://agentmods.dev/badge/rules/kok-o/contextos-agents/context-os.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 448 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown 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.00024 $0.00448
Opus 5.5 $0.00010 $0.00179
Sonnet 5.5 $0.00005 $0.00090
Haiku 4.5 $0.00002 $0.00045

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

Security

Grade A, and why

context-os 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 today.

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.

.cursor/rules/context-os.mdc · 46 lines

How it starts

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

Skill: context-os

Resolve supporting resource paths relative to .agents/core/skills/context-os. Read examples and references only when needed.

context-os

Overview

Guide configuration of the ContextOS compiler, resolver, profiles, and agent exports. Executable behavior lives in the CLI and modules; this Markdown entrypoint is guidance.

When to Use

Skill selection, context budgets, manifests, project overrides, profiles, exports, and configuration drift.

Rules & Patterns

Inspect the active project and installed skills. Canonical sources live in .agents/core/skills; project overrides in .agents/project/skills; plugins provide additional sources. Native .agents/skills contains generated projections. Entrypoint precedence is skill.v2.yaml, skill.yaml, then manifestless SKILL.md. Respect the declared entrypoint and resolve contained resource paths relative to its skill directory.

Use the resolver with the task and affected files; inspect reasons, risk, warnings, missing skills, and soft-budget overflow. Load references only when needed. Existing authorization and proportional engineering-workflow apply.

Read references/context-rules.md for budgeting and references/project-graph.md for graph limits.

Code Examples

In this source checkout: node .agents/ctx.js resolve "Fix IDOR" --files src/auth.ts --json. See EXAMPLES.md for source and consumer command boundaries.

Validation Checklist

  • The requested outcome and applicable failure cases are checked.
  • Evidence names commands, results, scope, and limitations.
  • Unrelated changes and existing authorization are preserved.

Common Mistakes

Editing generated projections; assuming catalog skills are installed; treating an estimated budget as total prompt size; expecting AST or document selection from the package graph; claiming schema validation proves agent behavior.

Integration Notes

context-manager is a deprecated compatibility alias. engineering-workflow owns the lifecycle; security owns protected boundaries. packs.yaml and rules.yaml are reference data, not executable policy.

Read the full file on GitHub · 46 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. today First seen · 46 lines · 24 tokens per session scan A da79fb6a4c23

Subscribe to this mod's changes

context-os is a cursor rule published in the GitHub repository kok-o/contextos-agents (10 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 448 once invoked, about $0.0001 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-10-25.