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.
npx agentmods add instructions/xingkaixin/codesesh/agents-mdgit clone --depth 1 https://github.com/xingkaixin/codeseshWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01354 | $0.01354 |
| Opus 5 | $0.00677 | $0.00677 |
| Sonnet 5 | $0.00271 | $0.00271 |
| Haiku 4.5 | $0.00135 | $0.00135 |
Grade A, and why
codesesh 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeSesh
用途:发现、聚合、可视化受支持的本地 AI 编码 Agent 历史会话,通过 Web UI 统一浏览。
技术栈
- Monorepo:pnpm(版本以
package.json的packageManager字段为准)+ Turbo - 语言:TypeScript 7(
tsc原生)+ TypeScript 6(typescriptAPI /tsc6,供 tsup d.ts、Astro 等),tsup 打包 - Server:Hono(HTTP API)+ Citty(CLI 解析)
- Web:React 19 + React Router + Tailwind CSS 4 + Base UI
- Lint:oxlint
- Format:oxfmt
- Test:vitest + @vitest/coverage-v8
包结构与模块职能
packages/core/src/:framework-agnostic 核心库packages/core/src/agents/:各 Agent 适配器、注册表与能力声明packages/core/src/analytics/:Dashboard 与项目聚合统计packages/core/src/bookmarks/:书签物化packages/core/src/contract/:前后端共享的 browser-safe 契约packages/core/src/discovery/:扫描编排、路径解析与 Session Detail 加载packages/core/src/discovery/cache/:Session 缓存与搜索索引持久化packages/core/src/pricing/:模型定价、代际同步与成本计算packages/core/src/projects/:Project Identity、分组与作用域匹配packages/core/src/search/:Session 搜索packages/core/src/state/:书签、别名等用户状态packages/core/src/types/:共享类型定义packages/core/src/utils/:通用工具函数
packages/cli/src/:CLI 入口、HTTP 服务与后台 Workerpackages/cli/src/index.ts:参数解析,驱动扫描并启动服务器packages/cli/src/server.ts:Hono 服务与生命周期管理packages/cli/src/api/:HTTP API 端点;其余扫描、索引与 Worker 模块保持扁平布局
apps/web/src/:React 应用apps/web/src/App.tsx:路由与顶层状态apps/web/src/components/:产品与 UI 组件apps/web/src/hooks/:客户端状态与数据同步 hooksapps/web/src/lib/:HTTP API 客户端与前端工具apps/web/src/styles/:全局样式
apps/www/:Astro 产品站apps/www/src/pages/:静态页面路由apps/www/src/components/:产品站组件apps/www/public/:静态资源
数据流
CLI 参数 → core 全量扫描 / 缓存恢复 → LiveScanStore 文件监听增量刷新 → Hono HTTP API / SSE → React Web UI(Dashboard / 会话列表 / 详情)
验证
一条命令的整体检查:pnpm lint && pnpm typecheck && pnpm build && pnpm test。
pnpm typecheck:全 workspace 类型检查(web 单独跑最快:pnpm --filter @codesesh/web typecheck)。pnpm test:turbo 单测;单包用pnpm --filter <pkg> test。pnpm test:coverage:先跑scripts/critical-coverage.mjs的覆盖率 ratchet(按 scope 设阈值,低于阈值即红),再全量覆盖率。pnpm --filter @codesesh/web test:bundle:初始 bundle 300KB gzip 预算(apps/web/tests/initial-bundle.test.ts),需先pnpm build;随手一个顶层 import 就可能触发。pnpm test:e2e:Playwright 端到端(tests/e2e/),需要先构建。pnpm test:migration:SQLite 缓存 schema 迁移冒烟。
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.
- 2d ago First seen · 80 lines · 1,354 tokens per session scan A 1a5efc79632a
codesesh AGENTS.md is an instructions file published in the GitHub repository xingkaixin/codesesh (11 stars, last pushed 2d ago), licensed MIT. It adds 1,354 tokens to every session, about $0.0068 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-30.
Other instructions, from other repositories
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.
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).
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.
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.
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).
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.