comcan

A repository context tool that keeps a durable record of the project’s current state, architecture, and domain-specific lessons. ComCan is used through its command-line interface (CLI), a text-based way to run project commands.

In plain words
What is it for?
It helps agents read the current branch and project structure, load expertise about areas such as APIs or databases, search for answers, and check the repository’s architecture guide.
Why use it?
It reduces guesswork when an agent starts work, changes branches, or faces an unfamiliar technical area. Agents can check known decisions and past failures before changing code.

Cursor rule

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 rules/shriniwas410/comcan-ctx/comcan
Clone the repo
git clone --depth 1 https://github.com/Shriniwas410/comcan-ctx
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 362 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00362
Opus 5 $0.00000 $0.00181
Sonnet 5 $0.00000 $0.00072
Haiku 4.5 $0.00000 $0.00036

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

Security

Grade A, and why

comcan 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.

comcan/templates/comcan.mdc · 30 lines

What it actually says

ComCan Agent Skill

You are operating in a repository powered by ComCan (Context Manager). ComCan provides you with a persistent, branch-aware "RAM" and "Hard Drive" so you don't have to guess project infrastructure.

1. Always Read the RAM First

Before writing code, you MUST read the current project state: cat .comcan/CURRENT_STATE.md This file tells you the current Git branch, recent commits, and a token-optimized directory tree.

2. Load the Hard Drive (Expertise)

If you are working on a specific domain (e.g., frontend, database, api), you MUST load the team's historical expertise before making architectural decisions: comcan query <domain> This will output JSONL or Text showing known rules, patterns, and past failures you must avoid.

3. Search for Unknowns

If you are unsure how to do something (e.g., "how do we handle auth?"), DO NOT guess. Search the expertise base: comcan search "auth"

  1. Read the Main Brain: Check for ARCHITECTURE_MANIFESTO.md in the repo root. If it exists, read it to understand the core architecture. If it's missing, suggest comcan bootstrap to the user.

  2. Always Self-Onboard: Read .comcan/CURRENT_STATE.md to understand the branch state and directory structure.

  3. Pre-Flight Query: Before modifying a subsystem (e.g., api), run comcan query api in the terminal to load domain-specific rules. The CLI will handle formatting automatically.

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 · 30 lines · 362 tokens per session scan A dc58f53b92b0

Subscribe to this mod's changes

comcan is a cursor rule published in the GitHub repository Shriniwas410/comcan-ctx (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 362 tokens. 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.