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/cxdpowered/mcp-ccnu-lib/claude-mdgit clone --depth 1 https://github.com/cxdpowered/mcp-ccnu-libWrote 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/cxdpowered/mcp-ccnu-lib/claude-md)<a href="https://agentmods.dev/instructions/cxdpowered/mcp-ccnu-lib/claude-md"><img src="https://agentmods.dev/badge/instructions/cxdpowered/mcp-ccnu-lib/claude-md.svg" alt="Measured on agentmods" 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 | $0.01892 | $0.01892 |
| Opus 5 | $0.00946 | $0.00946 |
| Sonnet 5 | $0.00378 | $0.00378 |
| Haiku 4.5 | $0.00189 | $0.00189 |
Grade A, and why
mcp-ccnu-lib 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 4d 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 — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
项目定位
华中师范大学图书馆空间预约的 MCP 执行器。被上游"小青团"QQ 机器人当作工具调用:本服务只负责执行(登录、查座、约/取消、暂离/回座/退座、违约/历史/闸机记录),不做 NLU、不做调度、不做提醒——那些在调用方侧。纯 HTTP 实现,无浏览器(历史上用过 Playwright,2026-07 已全量重构为 httpx 直连 CAS + 后端 API)。详尽的对外 API 契约、错误码、部署说明都在 README.md,改动工具签名/返回结构时必须同步更新它。
关键约束:
- 真实系统
https://kjyy.ccnu.edu.cn/jsq-v/(Vue SPA,CAS 统一认证),仅校园网内可访问,部署机必须在校园网。 - 验证码/短信走人工输入(challenge 机制),不做 OCR/自动打码——这是产品决策,不要主动加。
常用命令
# 本地开发(不走 Docker)
pip install -e . # 装 httpx + cryptography + mcp,无浏览器
python -m ccnu_lib.server # 启动,监听 0.0.0.0:8010/mcp (streamable-http)
# Docker(生产推荐)— 轻量 python:slim 镜像,无 Chromium
docker compose up -d --build
# 冒烟测试(先在另一终端启动服务,再跑)— 走真实 MCP 协议,只读不下单
python scripts/smoke_mcp.py
无单元测试(pyproject.toml 列了 pytest 但仓库无 test 文件)。注意 scripts/ 下的老验证/probe 脚本(try_login/try_api/try_reserve/probe*)是 Playwright 时代的,重构后已失效,仅作接口反推的历史参考;真机验证改用临时脚本走 login.start_login/reservations.*。
Windows 本地连 127.0.0.1 的坑:必须设 NO_PROXY=127.0.0.1,localhost,否则系统代理把本地请求也转走 → 502。(WindowsProactorEventLoopPolicy 那条已随 Playwright 移除,纯 HTTP 不需要。)
架构(关键在于两条数据通路 + challenge 中断模型)
工具调用入口在 server.py(@mcp.tool() 装饰,17 个工具,全部接受可选 user_key 做多用户隔离,缺省 default)。每个工具是薄壳,转发到 login.py 或 reservations.py。
核心设计:纯 HTTP。登录复刻 CAS SSO 重定向链,查询/预约直连后端 JSON API 并在 Python 里现算 HMAC 签名。
-
http_client.py— 进程级单例HttpManager,每个user_key一个httpx.AsyncClient(cookie jar)。登录态保活载体 = 持久化的 cookie(关键是无过期的CASTGC,支持静默 SSO 重登)+ 缓存的 app token,一起存{user_dir}/session.json;建会话时回灌。Session持有client/token/realkey/syscfg/asyncio.Lock/pending/login_ctx。 -
login.py— 纯 HTTP CAS 状态机。ensure_syscfg打getSysSet取配置(含 CASSSERVICE/VUESERVICE/hmacKey)并解出realkey。_sso_walkGET{CAS}/static/sso/login?redirectUrl={VUE}手动跟随重定向:落到 CAS 登录表单(200,含execution)=未登录→抓captcha.jpg返回 challenge;直接跳回 VUESERVICE 带?token=<JWT>(CASTGC 有效时)=静默登录。submit_challengePOST CAS 表单(username/password/captcha/lt/execution)→跟随 ticket→拿 JWT→auth/cas换 app token。判定真登录=拿到 app token,不是 URL。
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.
- 4d ago First seen · 55 lines · 1,892 tokens per session scan A c79859738feb
mcp-ccnu-lib CLAUDE.md is an instructions file published in the GitHub repository cxdpowered/mcp-ccnu-lib (0 stars, last pushed 2mo ago), licensed MIT. It adds 1,892 tokens to every session, about $0.0095 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-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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.
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).
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.
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).