Borrowing it
Nothing to install: this file belongs to JaeHyeon-KAIST/pdf2zh-next-mcp. 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/JaeHyeon-KAIST/pdf2zh-next-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/JaeHyeon-KAIST/pdf2zh-next-mcpWrote 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/jaehyeon-kaist/pdf2zh-next-mcp/claude-md)<a href="https://agentmods.dev/instructions/jaehyeon-kaist/pdf2zh-next-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/jaehyeon-kaist/pdf2zh-next-mcp/claude-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/jaehyeon-kaist/pdf2zh-next-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/jaehyeon-kaist/pdf2zh-next-mcp/claude-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.00696 | $0.00696 |
| Opus 5 | $0.00348 | $0.00348 |
| Sonnet 5 | $0.00139 | $0.00139 |
| Haiku 4.5 | $0.00070 | $0.00070 |
Grade A, and why
pdf2zh-next-mcp 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 11d 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.
What it actually says
pdf2zh-next-mcp
PDF 번역 MCP 서버. pdf2zh-next(BabelDOC)의 CLITranslator를 활용한 2-pass 아키텍처.
아키텍처
LLM (Claude Desktop / Claude Code)
│
├─ extract_segments 호출
│ └─ Pass 1: pdf2zh_next --clitranslator → collect.py가 세그먼트 수집
│ └─ 세그먼트 JSON + 번역 instruction 반환
│
├─ LLM이 전체 세그먼트를 한 번에 번역 (컨텍스트 유지)
│
└─ assemble_translated 호출
└─ Pass 2: pdf2zh_next --clitranslator → lookup.py가 번역 주입
└─ mono/dual PDF 생성
핵심: pdf2zh-next 코드를 수정하지 않고 CLITranslator의 외부 스크립트 메커니즘만 활용.
세션 디렉토리: 출력 디렉토리(또는 PDF 부모 디렉토리)에 pdf2zh-sessions-{session_id}/ 생성. 완료 후 자동 삭제.
파일 구조
src/pdf2zh_next_mcp/
├── __init__.py
├── main.py # MCP 서버 (extract_segments + save_translated_segments + assemble_translated)
└── scripts/
├── collect.py # Pass 1: stdin → segments.json에 누적, stdout → 원문 반환
└── lookup.py # Pass 2: stdin → translations.json에서 조회, stdout → 번역문 반환
주요 설계 결정
- CLI 호출: pdf2zh-next는 내부적으로 subprocess isolation 사용. 라이브러리 임포트 대신 CLI가 더 깔끔
--ignore-cache: 두 패스 모두. Pass 1은 세그먼트 빠짐없이 수집, Pass 2는 사전 번역 강제 사용--pool-max-workers 1: Pass 1에서 세그먼트 순서 보장 + 파일 동시 쓰기 방지shlex.quote(): CLI 커맨드 경로에 공백/백슬래시가 있어도 안전하게 처리--debug미사용:--debug는 수식 힌트(translate_tracking.json)를 제공하지만 ~20배 속도 저하 유발 (3.5MB PDF → 571MB 디버그 출력). 수식 플레이스홀더는 대부분 참조번호라 힌트 없이도 번역 품질 차이 미미.
바이너리 탐색
_find_pdf2zh_binary() / _find_python_binary():
- uv tool 설치 경로 (macOS/Linux:
~/.local/share/uv/tools/, Windows:%APPDATA%\uv\data\tools\) shutil.which()fallback
배포
# 개발 모드
uv run python src/pdf2zh_next_mcp/main.py
# 패키지 설치
uv tool install .
필수 전제: uv tool install pdf2zh-next (별도 설치)
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.
- 11d ago First seen · 61 lines · 696 tokens per session scan A c6edb20b2b95
pdf2zh-next-mcp CLAUDE.md is an instructions file published in the GitHub repository JaeHyeon-KAIST/pdf2zh-next-mcp (3 stars, last pushed 6mo ago), licensed MIT. It adds 696 tokens to every session, about $0.0035 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).