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/stringke/claudex/claude-mdgit clone --depth 1 https://github.com/StringKe/claudexWhat 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.01287 | $0.01287 |
| Opus 5 | $0.00643 | $0.00643 |
| Sonnet 5 | $0.00257 | $0.00257 |
| Haiku 4.5 | $0.00129 | $0.00129 |
Grade A, and why
claudex CLAUDE.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 3d 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 — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claudex - Claude Code 项目指南
项目概述
Claudex 是一个 Rust 实现的多实例 Claude Code 管理器,内置智能翻译代理。它通过本地 proxy 将 Claude Code 的 Anthropic API 请求翻译并转发到多种 AI 提供商。
技术栈
- 语言: Rust (Edition 2021)
- 异步运行时: Tokio
- Web 框架: Axum 0.8
- HTTP 客户端: reqwest (rustls-tls)
- TUI: ratatui + crossterm
- 配置: TOML (toml crate)
- 日志: tracing + tracing-subscriber
- 错误处理: anyhow + thiserror
项目结构
src/
├── main.rs # 入口 + CLI dispatch
├── cli.rs # clap 子命令定义
├── config.rs # 配置解析(API key 直接存 config,不自动读 keyring)
├── profile.rs # Profile 管理
├── launch.rs # 启动 claude 进程(含 Claude OAuth 特殊处理)
├── oauth/ # OAuth 订阅认证
│ ├── mod.rs # AuthType, OAuthProvider, OAuthToken 类型
│ ├── token.rs # 外部 CLI token 读取(Codex/Claude/Gemini)
│ ├── server.rs # 本地回调服务器 + Device Code 轮询
│ └── providers.rs # 各平台登录/刷新/状态逻辑
├── daemon.rs # PID 文件 + 进程管理
├── metrics.rs # 请求指标
├── proxy/ # 翻译代理
│ ├── mod.rs # Axum server
│ ├── handler.rs # 请求处理
│ ├── translation.rs # Anthropic ↔ OpenAI 翻译
│ ├── streaming.rs # SSE 流式翻译
│ ├── fallback.rs # 断路器
│ ├── health.rs # 健康检查
│ └── models.rs # /v1/models 端点
├── router/ # 智能路由
│ ├── mod.rs
│ └── classifier.rs # 意图分类
├── context/ # 上下文引擎
│ ├── mod.rs
│ ├── compression.rs # 对话压缩
│ ├── sharing.rs # 跨 profile 共享
│ └── rag.rs # 本地 RAG
└── tui/ # TUI 仪表盘
├── mod.rs
├── dashboard.rs
├── widgets.rs
└── input.rs
构建与运行
# 开发构建
cargo build
# Release 构建
cargo build --release
# 检查
cargo check
# Clippy 检查
cargo clippy
# 运行
cargo run -- profile list
cargo run -- run grok
cargo run -- proxy start
核心概念
Provider Types
DirectAnthropic: 原生 Anthropic API,直接转发(Anthropic、MiniMax)OpenAICompatible: OpenAI 兼容 API,需要协议翻译(OpenRouter、Grok、OpenAI、DeepSeek、Kimi、GLM、Ollama)
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.
- 3d ago First seen · 122 lines · 1,287 tokens per session scan A 48d704ba1795
claudex CLAUDE.md is an instructions file published in the GitHub repository StringKe/claudex (49 stars, last pushed 6mo ago), licensed MIT. It adds 1,287 tokens to every session, about $0.0064 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
tiygate AGENTS.md
Instructions for tiylabs/tiygate, covering repository guidelines, project structure & module organization, engineering principles, build, test, and development commands and coding style & naming conventions.
ai-gateway AGENTS.md
Instructions for ferro-labs/ai-gateway, covering agents.md, project overview, current development snapshot, public-facing wording and build, test, and run commands.
emperor-agent AGENTS.md
Instructions for TheSyart/emperor-agent, covering agents.md · emperor agent 协作指南, 0. 沟通与原则, 1. 项目定位, 2. 先看哪里 and 3. 关键目录.
sbproxy AGENTS.md
Instructions for soapbucket/sbproxy, covering sbproxy (rust workspace), pre-commit checks, changelog entries are fragments, not changelog.md edits, the gate validates the working tree; git push ships head and running the gate.
copilot-proxy-api CLAUDE.md
Instructions for voidsteed/copilot-proxy-api, covering claude.md, project overview, common commands, architecture and entry points & cli structure.
claude-code-aws-gateway CLAUDE.md
Instructions for antkawam/claude-code-aws-gateway, covering claude code aws gateway (ccag), build & test, project structure, key design decisions and environment variables.