Borrowing it
Nothing to install: this file belongs to Wanyi424/wanyi-watermark. 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/Wanyi424/wanyi-watermark/master/CLAUDE.mdgit clone --depth 1 https://github.com/Wanyi424/wanyi-watermarkWrote 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/wanyi424/wanyi-watermark/claude-md)<a href="https://agentmods.dev/instructions/wanyi424/wanyi-watermark/claude-md"><img src="https://agentmods.dev/badge/instructions/wanyi424/wanyi-watermark/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/wanyi424/wanyi-watermark/claude-md"><img src="https://agentmods.dev/badge/instructions/wanyi424/wanyi-watermark/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.02802 | $0.02802 |
| Opus 5 | $0.01401 | $0.01401 |
| Sonnet 5 | $0.00560 | $0.00560 |
| Haiku 4.5 | $0.00280 | $0.00280 |
Grade A, and why
wanyi-watermark 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 10d 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 — 202 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.
项目概述
这是一个基于 Model Context Protocol (MCP) 的服务器,用于从抖音和小红书分享链接中获取无水印视频并提取文本内容。
核心架构
1. 处理器模式 (Processor Pattern)
项目采用处理器模式,每个平台有独立的处理器类:
-
DouyinProcessor (
douyin_processor.py): 处理抖音视频/图文parse_media一次抓取页面后读取window._ROUTER_DATA,自动判断视频或图文- 视频提取无水印 URL;图文提取图片列表
- 使用阿里云百炼 API (dashscope) 进行语音识别
- 直接从视频 URL 进行转录(无需下载)
-
XiaohongshuProcessor (
xiaohongshu_processor.py): 处理小红书视频/图文parse_media一次抓取页面后解析最终 URL、window.__INITIAL_STATE__、视频流和图片列表- 依据页面数据结构自动判断
video/image,避免"视频失败后再图文"的重复请求 - 视频直链优先使用页面提供的
og:video/masterUrl;不再进行旧版 114 质量码改写或阻塞式 HEAD 探测
-
诊断日志 (
diagnostics.py): 解析链路中文耗时日志- WebUI 传入
X-Parse-Trace-Id,后端同一请求链路复用同一追踪 ID parse_log输出单步耗时和累计耗时,用于定位页面请求、JSON 解析、候选筛选等卡点
- WebUI 传入
1.5 解析门面 (resolver.py) —— 单一事实源
"按平台分发 + 自动识别 视频/图文 + 通用兜底" 的编排逻辑统一收敛在 resolver.py,
由 MCP 工具 / CLI / WebUI / Skill 四个消费方共同复用:
resolve_douyin/resolve_xiaohongshu/resolve_generic:返回结构化 dict(与各 MCP 工具输出逐字一致)resolve_media:顶层入口,按链接域名自动选平台(供 CLI/WebUI/Skill 的"单输入框"使用)detect_platform:按域名判定 douyin / xiaohongshu / generic
server.py 的工具均为薄包装:json.dumps(resolve_*(...))。
转写逻辑统一在 transcription.py(transcribe_video_url,dashscope)。
处理器在 resolver 内部延迟导入,保持
import resolver轻量(不强依赖 dashscope/ffmpeg)。
2. MCP 服务器 (server.py)
使用 FastMCP 框架提供统一的 MCP 接口:
工具 (Tools):
parse_douyin_link: 解析抖音链接,自动识别视频/图文并返回无水印资源(无需 API 密钥)parse_xhs_link: 解析小红书链接,自动识别视频/图文并返回无水印资源(无需 API 密钥)extract_douyin_text: 从抖音视频中提取文本内容(需要 API 密钥)
资源接口已在当前版本移除,统一通过上述工具完成解析。
提示词 (Prompts):
watermark_removal_guide: 使用指南(含面向用户的纯文本展示格式约定)
输出格式约定(重要,勿改):
- 所有解析工具(
parse_xhs_link/parse_douyin_link/parse_generic_link)一律返回【完整 JSON 字符串】(含 platform/type/title/caption/url/images 等全部字段),不在工具内部拍平成纯文本。 - “纯文本(标题/文案/视频图片链接,禁止 Markdown、不省略不截断)”是 LLM 回复最终用户时的展示格式,由各工具 docstring 与
watermark_removal_guide提示词指示 LLM 完成,不是工具的返回值格式。 - 数据流:工具 ──返回完整 JSON──▶ LLM ──整理成纯文本──▶ 用户。
- 注:曾把工具返回值直接改成纯文本(
_format_plain_result)会丢失结构化字段、且与报错 JSON 不一致,已回退,后续请保持 JSON 返回。
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.
- 10d ago First seen · 202 lines · 2,802 tokens per session scan A e1b84865ee28
wanyi-watermark CLAUDE.md is an instructions file published in the GitHub repository Wanyi424/wanyi-watermark (23 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 2,802 tokens to every session, about $0.0140 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
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.
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).
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.