Borrowing it
Nothing to install: this file belongs to touwaeriol/claude-code-plus. 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/touwaeriol/claude-code-plus/main/AGENTS.mdgit clone --depth 1 https://github.com/touwaeriol/claude-code-plusWrote 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/touwaeriol/claude-code-plus/agents-md)<a href="https://agentmods.dev/instructions/touwaeriol/claude-code-plus/agents-md"><img src="https://agentmods.dev/badge/instructions/touwaeriol/claude-code-plus/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/touwaeriol/claude-code-plus/agents-md"><img src="https://agentmods.dev/badge/instructions/touwaeriol/claude-code-plus/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.03013 | $0.03013 |
| Opus 5.5 | $0.01205 | $0.01205 |
| Sonnet 5.5 | $0.00603 | $0.00603 |
| Haiku 4.5 | $0.00301 | $0.00301 |
Grade A, and why
claude-code-plus 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 2mo 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 — 410 lines — stays where its author put it; the contents beside it link to each section on GitHub.
1=特别提醒:请使用简体中文进行交流 特别提醒:git commit、changelog 不使用中文,而是使用英文
Claude Code Plus - 架构说明
📋 项目概述
Claude Code Plus 是一个 IntelliJ IDEA 插件,集成了 Claude AI 助手,提供智能代码编辑、文件操作、终端执行等功能。
🏗️ 整体架构
🔌 三种通信方式
2️⃣ IDEA 集成通信 (纯 HTTP)
用途: 打开文件、显示 Diff、搜索文件等 IDEA 原生功能
前端:
// frontend/src/services/ideaBridge.ts
import { ideService } from '@/services/ideaBridge'
// 打开文件
await ideService.openFile('/path/to/file.ts', { line: 10 })
// 显示 Diff
await ideService.showDiff({
filePath: '/path/to/file.ts',
oldContent: '...',
newContent: '...'
})
后端:
// claude-code-server/src/main/kotlin/com/claudecodeplus/server/HttpApiServer.kt
post("/api/") {
when (action) {
"ide.openFile" -> ideActionBridge.openFile(request)
"ide.showDiff" -> ideActionBridge.showDiff(request)
"ide.searchFiles" -> ideActionBridge.searchFiles(query, maxResults)
"ide.getFileContent" -> // 读取文件内容
}
}
协议: HTTP POST
- 请求-响应模式
- 同步调用
- 简单可靠
3️⃣ 通用 Web 功能 (纯 HTTP)
用途: 其他不需要流式响应的功能
协议: HTTP GET/POST
- RESTful API
- 标准 HTTP 请求
🔧 关键技术细节
随机端口机制
问题: 多个 IDEA 项目同时打开时,端口冲突
解决方案:
// claude-code-server/src/main/kotlin/com/claudecodeplus/server/HttpApiServer.kt
fun start(port: Int = 8765): String {
val actualPort = try {
embeddedServer(Netty, port = port) { ... }.start()
port
} catch (e: BindException) {
val availablePort = findAvailablePort()
embeddedServer(Netty, port = availablePort) { ... }.start()
availablePort
}
return "http://localhost:$actualPort"
}
前端获取后端地址 & 环境检测
IDEA 插件模式: 通过 URL 参数 ?ide=true 触发后端注入
// jetbrains-plugin/.../VueToolWindowFactory.kt
val ideUrl = "$serverUrl?ide=true" // 带上 ide=true 参数
browser.loadURL(ideUrl)
// claude-code-server/.../HttpApiServer.kt
get("/") {
val isIdeMode = call.request.queryParameters["ide"] == "true"
if (isIdeMode) {
// IDEA 插件模式:注入 window.__serverUrl
val injection = """
<script>
window.__serverUrl = 'http://localhost:$serverPort';
console.log('✅ Environment: IDEA Plugin Mode');
</script>
""".trimIndent()
html = html.replace("</head>", "$injection\n</head>")
}
}
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.
- 2mo ago First seen · 410 lines · 3,013 tokens per session scan A 9571be6767f1
claude-code-plus AGENTS.md is an instructions file published in the GitHub repository touwaeriol/claude-code-plus (142 stars, last pushed 6mo ago), licensed MIT. It adds 3,013 tokens to every session, about $0.0121 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.
claude-code-plus AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| claude-code-plus AGENTS.mdtouwaeriol/claude-code-plus | Instructions file | 142 | 6mo ago | MIT | A | 3,013 | 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 |