Borrowing it
Nothing to install: this file belongs to xingkaixin/codesesh. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/xingkaixin/codesesh/main/AGENTS.mdgit clone --depth 1 https://github.com/xingkaixin/codeseshWrote 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.
[](https://agentmods.dev/instructions/xingkaixin/codesesh/agents-md)<a href="https://agentmods.dev/instructions/xingkaixin/codesesh/agents-md"><img src="https://agentmods.dev/badge/instructions/xingkaixin/codesesh/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.
<a href="https://agentmods.dev/instructions/xingkaixin/codesesh/agents-md"><img src="https://agentmods.dev/badge/instructions/xingkaixin/codesesh/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00980 | $0.00980 |
| Opus 5.5 | $0.00392 | $0.00392 |
| Sonnet 5.5 | $0.00196 | $0.00196 |
| Haiku 4.5 | $0.00098 | $0.00098 |
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 — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeSesh
用途:发现、聚合、可视化受支持的本地 AI 编码 Agent 历史会话,通过 Web UI 统一浏览。
Rust workspace(crates/)+ pnpm/Turbo(apps/、packages/),工具链见 rust-toolchain.toml、mise.toml。
改动前按 docs/README.md 找对应文档;模块边界和运行模式见 docs/architecture.md;领域术语以 CONTEXT.md 为准。
验证
后端基本验证(涉及 CLI 的构建前先运行 pnpm build:web):
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
CODESESH_SKIP_WEB_ASSETS=1只用于 debug 后端检查,release 拒绝跳过 Web 资源。- Rust wire 类型改变后运行
pnpm generate:rust-contract,并检查 TypeScript 消费者。 - 前端:
pnpm lint、pnpm format:check、pnpm typecheck和相关 Vitest 测试。 - 改 CLI、HTTP、SSE 或持久化:
pnpm test:backend。 - 改界面流程:
pnpm test:e2e。 - 改文档:
node scripts/check-docs-paths.mjs和node scripts/check-docs-facts.mjs。 - 改版本号:
node scripts/release-preflight.mjs。 - 重命名或新增平台相关模块时,同步
package.json中test:rust:platform的过滤条件。
验证命令不代表已经通过,报告结果必须保留实际运行证据。测试取舍见 docs/engineering/testing.md,
完整 CI 以 .github/workflows/ci.yml 为事实源,制品要求见 docs/engineering/rust-packaging.md。
Web 设计规则
apps/web/src 的颜色和类名由 .oxlintrc.json overrides 中的 shadcn 规则检查,只用主题 token;
例外按具体类名添加,不用通配符。不要启用 no-restyle、no-arbitrary-values、no-inline-styles、
require-static-classes:图表和虚拟列表需要动态尺寸。Astro 产品站不在检查范围内。
扩展新 Agent
- 在
crates/codesesh-core/src/agents/新增 Rust 适配器,并接入:agents.rs:pub mod声明和scan_agent分发;文件来源在session_root/is_session_file声明会话文件,数据库来源在database_path声明 SQLite 路径。 来源可用性、回填选择、数据库戳记和discovery/json_scan.rs的 JSON 扫描都读取这些函数, 不另设分支。discovery/backfill.rs:伴随索引文件加入inventory的context_names。discovery/incremental.rs:watch_roots监听路径和read增量刷新。- 数据库来源另外对照
deepchat在backfill.rs(inventory、session_fingerprints)和incremental.rs中的分支逐一接入。
- 在
crates/codesesh-core/src/discovery/paths.rs声明数据根目录、环境变量覆盖和扫描路径。 - 在
crates/codesesh-core/src/agents/catalog.json声明公开元数据和展示能力,然后运行pnpm generate:rust-contract;浏览器端目录由生成结果导出,不维护第二份值。support按适配器实际解析结果声明分级与能力,并同步 README 中的能力矩阵。 - 在
apps/web/public/icon/agent/与apps/www/public/icon/agent/添加 SVG。 - 自定义工具展示在
apps/web/src/components/session-detail/tool-strategy/添加并注册。
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 Changed · -1 lines · -24 tokens per session ef3f04312cc1
- 17d ago Changed · -41 lines · -697 tokens per session 0820efbb8c52
- 24d ago Changed c9c7b6fb2b8c
- 28d ago Changed 3d2a4122b064
- 1mo ago Changed · +2 lines · +56 tokens per session 00f85df8ed21
- 1mo ago Changed 658003952068
- 1mo ago Changed · +34 tokens per session 1847fc1b42b0
- 1mo ago Changed 9d49afe91db2
- 1mo ago Changed 4faa11104d76
- 1mo ago First seen · 97 lines · 1,611 tokens per session scan A 65399274f72e
codesesh AGENTS.md is an instructions file published in the GitHub repository xingkaixin/codesesh (11 stars, last pushed yesterday), licensed MIT. It adds 980 tokens to every session, about $0.0039 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.
codesesh AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codesesh AGENTS.mdxingkaixin/codesesh | Instructions file | 11 | yesterday | MIT | A | 980 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |