cc-windows AGENTS.md

Repository instructions for cc-window, a local web dashboard for monitoring and managing Claude Code sessions. It explains the project’s structure, data sources, architecture, and common commands.

In plain words
What is it for?
Use it when working on the cc-window repository, especially its session state, event monitoring, terminal bridging, or historical usage statistics. It also lists commands for installing, developing, building, and running the project.
Why use it?
It gives coding agents verified project facts and warns them not to assume Claude Code has a public network interface. This helps changes fit the existing monitoring and session-management design.

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/pickjason/cc-windows/agents-md
Clone the repo
git clone --depth 1 https://github.com/pickjason/cc-windows

Made for: Codex, OpenCode.

Per session 3,036 This file is loaded in full into every session.
When invoked 3,036 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03036 $0.03036
Opus 5 $0.01518 $0.01518
Sonnet 5 $0.00607 $0.00607
Haiku 4.5 $0.00304 $0.00304

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

Security

Grade B, and why

cc-windows AGENTS.md scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

npm run install-hooks # = bash scripts/install-hooks.sh,装监控 hooks 到 ~/.claude/settings.json
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 73 lines

How it starts

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

AGENTS.md

This file provides guidance to coding agents (Codex, etc.) when working with code in this repository.

注意:cc-window 监控/管理的目标产品是 Claude Code(它的 claude CLI、~/.claude 目录、agents --json 等都是真实事实,请勿改写成你自己所属的 agent 名)。本文件只是「写给在本仓库干活的 agent」看的说明。

项目本质

cc-window 是一个本地网页版 Claude Code 多会话管理台:一屏监控全机所有 Claude Code 会话状态、网页里新建会话、操作每个会话的交互式终端。仅监听 127.0.0.1:4317

奠基事实(动手前务必理解):Claude Code 没有对外的 socket / 端口 / HTTP 查询接口。本项目的全部可观测性来自三件事的叠加,改任何状态/会话逻辑都绕不开这三个源:

  1. 轮询 claude agents --json(源 A,全量会话真相 + busy/idle/waiting)
  2. tail ~/.claude/monitor/events.jsonl(源 B,hooks 写的秒级事件流,给出精确等待原因)
  3. 自管 PTY(用 node-pty 启动会话并桥接到浏览器 xterm.js)

详尽且已核实的事实在 docs/02-claude-code-observability.md——它是本仓库的基石文档,涉及 Claude Code 行为时先读它,不要凭记忆推断。

除实时管理外,还有一块历史用量统计(看板顶栏「📊 统计」入口):解析 ~/.claude/projects/**/*.jsonl 历史记录,出活跃热力图 / token 趋势 / 日报等。它复用同一批 transcript 文件,但做的是「回看历史用量」,与上面三源「看实时状态」是不同维度。承接独立工具 cc-journal,合并设计见 docs/11-merge-cc-journal.md

常用命令

npm install            # postinstall 自动 chmod +x node-pty 的 spawn-helper(见下方坑)
npm run dev            # 开发:vite(5173,HMR)+ 后端(4317),浏览器开 http://127.0.0.1:5173
npm run build && npm start   # 生产:构建后由后端单端口托管,开 http://127.0.0.1:4317
npm run typecheck      # tsc --noEmit —— strict + noUncheckedIndexedAccess,覆盖 server/web 含 *.test.ts
npx tsx web/terminalResize.test.ts  # 跑单个单元测试(无 npm test / 无 runner,逐个 tsx 跑)
npm run install-hooks  # = bash scripts/install-hooks.sh,装监控 hooks 到 ~/.claude/settings.json
  • 没有 linter、没有测试 runner(无 npm test),但有单元测试:核心纯逻辑被抽到无副作用的小模块(web/terminalResize.tsserver/tmux-handoff.ts 等),每个配一个同名 *.test.ts,用 node:assert/strict 断言、末尾 console.log("... passed"),逐个 npx tsx <file>.test.ts 跑。改这类逻辑前先看有没有对应 .test.ts,改完把它跑绿
  • 完整校验仪式(见 docs/10):跑齐全部 8 个 *.test.ts + npm run typecheck + npm run buildtsconfig 开了 strict + noUncheckedIndexedAccess
  • hooks 安装器支持 --dry-run(只看 diff)与 --uninstall(只移除本工具的 8 个 hook,保留其它);写入前自动备份 settings.json。需要 jq
  • UI 改动按项目惯例用浏览器实机截图验证(mcp__claude-in-chrome)。

Read the full file on GitHub · 73 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. 2d ago First seen · 73 lines · 3,036 tokens per session scan B e3510cf11494

Subscribe to this mod's changes

cc-windows AGENTS.md is an instructions file published in the GitHub repository pickjason/cc-windows (5 stars, last pushed 2mo ago), licensed MIT. It adds 3,036 tokens to every session, about $0.0152 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js 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,296 tokens