Skills Plugins MCP Prompt Model 博客 我的中心
開発 #api #ai

claude-authenticity

Detect whether an API endpoint is backed by genuine Claude (not a wrapper, proxy, or impersonator) using 9 weighted rule-based checks that mirror the claude-verify project. Also extracts injected system prompts from providers that override Claude's identity. Fully self-contained — copy the code below and run, no extra packages beyond httpx. Use when the user wants to verify a Claude API key or endpoint, check if a third-party Claude service is authentic, audit API providers for Claude authenticity, test multiple models in parallel, or discover what system prompt a provider has injected.

DeepseekModel キュレーション済みスキル 品質 優秀 · 90 v1.0.0

取得

https://deepseekmodel.com/api/download.php?id=agentscope-ai-openjudge-skills-claude-authenticity-skill-md&format=skill
ダウンロード .skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能
.skill ファイルの system_prompt フィールドの実際の内容。
name claude-authenticity description Detect whether an API endpoint is backed by genuine Claude (not a wrapper, proxy, or impersonator) using 9 weighted rule-based checks that mirror the claude-verify project. Also extracts injected system prompts from providers that override Claude's identity. Fully self-contained — copy the code below and run, no extra packages beyond httpx. Use when the user wants to verify a Claude API key or endpoint, check if a third-party Claude service is authentic, audit API providers for Claude authenticity, test multiple models in parallel, or discover what system prompt a provider has injected. Claude Authenticity Skill Verify whether an API endpoint serves genuine Claude and optionally extract any injected system prompt. No installation required beyond httpx . Copy the code blocks below directly into a single .py file and run — no openjudge, no cookbooks, no other setup. pip install httpx The 9 checks (mirrors claude-verify ) # Check Weight Signal 1 Signature 长度 12 signature field in response (official API exclusive) 2 身份回答 12 Reply mentions claude code / cli / command 3 Thinking 输出 14 Extended-thinking block present 4 Thinking 身份 8 Thinking text references Claude Code / CLI 5 响应结构 14 id + cache_creation fields present 6 系统提示词 10 No prompt-injection signals (reverse check) 7 工具支持 12 Reply mentions bash / file / read / write 8 多轮对话 10 Identity keywords appear ≥ 2 times 9 Output Config 10 cache_creation or service_tier present Score → verdict: ≥ 85 → genuine 正版 ✓ / 60–84 → suspected 疑似 ? / < 60 → likely_fake 非正版 ✗ Gather from user before running Info Required? Notes API endpoint Yes Native: https://xxx/v1/messages OpenAI-compat: https://xxx/v1/chat/completions API key Yes The key to test Model name(s) Yes One or more model IDs API type No anthropic (default, always prefer ) or openai Extract prompt No Set EXTRACT_PROMPT = True to also attempt system prompt extraction CRITICAL — always use api_type="anthropic" . OpenAI-compatible format silently drops signature , thinking , and cache_creation , causing genuine Claude endpoints to score < 40. Only use openai if the endpoint rejects native-format requests entirely. Self-contained script Save as claude_authenticity.py and run: python claude_authenticity.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Claude Authenticity Checker ============================ Verify whether an API endpoint serves genuine Claude using 9 weighted checks. Only requires: pip install httpx Usage: edit the CONFIG section below, then run: python claude_authenticity.py """ from __future__ import annotations import asyncio, json, sys # ============================================================ # CONFIG — edit here # ============================================================ ENDPOINT = "https://your-provider.com/v1/messages" API_KEY = "sk-xxx" MODELS = [ "claude-sonnet-4-6" , "claude-opus-4-6" ] API_TYPE = "anthropic" # "anthropic" (default) or "openai" MODE = "full" # "full" (9 checks) or "quick" (8 checks) SKIP_IDENTITY = False # True = skip identity keyword checks EXTRACT_PROMPT = False # True = also attempt system prompt extraction # ============================================================ from dataclasses import dataclass, field from typing import Any , Dict , List , Optional , Tuple # ──────────────────────────────────────────────────────────── # Data structures # ──────────────────────────────────────────────────────────── @dataclass class CheckResult : id : str label: str weight: int passed: bool detail: str @dataclass class AuthenticityResult : score: float verdict: str reason: str checks: List [CheckResult] answer_text: str = "" thinking_text: str = "" error: Optional [ str ] = None # ──────────────────────────────────────────────────────────── # Helpers # ──────────────────────────────────────────────────────────── _SIG_KEYS = { "signature" , "sig" , "x-claude-signature" , "x_signature" , "xsignature" } def _parse ( text: str ) -> Optional [ Dict [ str , Any ]]: try : return json.loads(text) if text and text.strip() else None except Exception: return None def _find_sig ( value: Any , depth: int = 0 ) -> str : if depth > 6 : return "" if isinstance (value, list ): for item in value: r = _find_sig(item, depth + 1 ) if r: return r if isinstance (value, dict ): for k, v in value.items(): if k.lower() in _SIG_KEYS and isinstance (v, str ) and v.strip(): return v r = _find_sig(v, depth + 1 ) if r: return r return "" def _sig ( raw_json: str ) -> Tuple [ str , str ]: data = _parse(raw_json) if not data: return "" , "" s = _find_sig(data) return (s, "响应JSON" ) if s else ( "" , "" ) # ──────────────────────────────────────────────────────────── # The 9 checks (mirrors claude-verify/checks.ts) # ──────────────────────────────────────────────────────────── def _c_signature ( sig, sig_src, sig_min, **_ ) -> CheckResult: l = len (sig.strip()) return CheckResult( "signature" , "Signature 长度检测" , 12 , l >= sig_min, f" {sig_src} 长度 {l} ,阈值 {sig_min} " ) def _c_answer_id ( answer, **_ ) -> CheckResult: kw = [ "claude code" , "cli" , "命令行" , "command" , "terminal" ] ok = any (k in answer.lower() for k in kw) return CheckResult( "answerIdentity" , "身份回答检测" , 12 , ok, "包含关键身份词" if ok else "未发现关键身份词" ) def _c_thinking_out ( thinking, **_ ) -> CheckResult: t = thinking.strip() return CheckResult( "thinkingOutput" , "Thinking 输出检测" , 14 , bool (t), f"检测到 thinking 输出( { len (t)} 字符)" if t else "响应中无 thinking 内容" ) def _c_thinking_id ( thinking, **_ ) -> CheckResult: if not thinking.strip(): return CheckResult( "thinkingIdentity" , "Thinking 身份检测" , 8 , False , "未提供 thinking 文本" ) kw = [ "claude code" , "cli" , "命令行" , "command" , "tool" ] ok = any (k in thinking.lower() for k in kw) return CheckResult( "thinkingIdentity" , "Thinking 身份检测" , 8 , ok, "包含 Claude Code/CLI 相关词" if ok else "未发现关键词" ) def _c_structure ( response_json, **_ ) -> CheckResult: data = _parse(response_json) if data is None : return CheckResult( "responseStructure" , "响应结构检测" , 14 , False , "JSON 无法解析" ) usage = data.get( "usage" , {}) or {} has_id = "id" in data has_cache = "cache_creation" in data or "cache_creation" in usage has_tier = "service_tier" in data or "service_tier" in usage missing = [f for f, ok in [( "id" , has_id), ( "cache_creation" , has_cache), ( "service_tier" , has_tier)] if not ok] return CheckResult( "responseStructure" , "响应结构检测" , 14 , has_id and has_cache, "关键字段齐全" if not missing else f"缺少字段: { ', ' .join(missing)} " ) def _c_sysprompt ( answer, thinking, **_ ) -> CheckResult: risky = [ "system prompt" , "ignore previous" , "override" , "越权" ] text = f" {answer} {thinking} " .lower() hit = any (k in text for k in risky) return CheckResult( "systemPrompt" , "系统提示词检测" , 10 , not hit, "疑似提示词注入" if hit else "未发现异常提示词" ) def _c_tools ( answer, **_ ) -> CheckResult: kw = [ "file" , "command" , "bash" , "shell" , "read" , "write" , "execute" , "编辑" , "读取" , "写入" , "执行" ] ok = any (k in answer.lower() for k in kw) return CheckResult( "toolSupport" , "工具支持检测" , 12 , ok, "包含工具能力描述" if ok else "未出现工具能力词" ) def _c_multiturn ( answer, thinking, **_ ) -> CheckResult: kw = [ "claude code" , "cli" , "command line" , "工具" ] text = f" {answer} \n {thinking} " .lower() hits = sum ( 1 for k in kw if k in text) return CheckResult( "multiTurn" , "多轮对话检测" , 10 , hits >= 2 , "多处确认身份" if hits >= 2 else "确认次数偏少" ) def _c_config ( response_json, **_ ) -> CheckResult: data = _parse(response_json) if data is None : return CheckResult( "config" , "Output Config 检测" , 10 , False , "JSON 无法解析" ) usage = data.get( "usage" , {}) or {} ok = any (f in data or f in usage for f in [ "cache_creation" , "service_tier" ]) return CheckResult( "config" , "Output Config 检测" , 10 , ok, "配置字段存在" if ok else "未发现配置字段" ) _ALL_CHECKS = [_c_signature, _c_answer_id, _c_thinking_out, _c_thinking_id, _c_structure, _c_sysprompt, _c_tools, _c_multiturn, _c_config] _IDENTITY_IDS = { "answerIdentity" , "thinkingIdentity" , "multiTurn" } def _run_checks ( response_json, sig, sig_src, answer, thinking, mode= "full" , skip_identity= False ) -> Tuple [ List [CheckResult], float ]: ctx = dict (response_json=response_json, sig=sig, sig_src=sig_src, sig_min= 20 , answer=answer, thinking=thinking) # map function arg names to ctx keys def call ( fn ): import inspect params = inspect.signature(fn).parameters kwargs = {} for p in params: if p == "sig" : kwargs[p] = ctx[ "sig" ] elif p == "sig_src" : kwargs[p] = ctx[ "sig_src" ] elif p == "sig_min" : kwargs[p] = ctx[ "sig_min" ] elif p in ctx: kwargs[p] = ctx[p] return fn(**kwargs) active = list (_ALL_CHECKS) if mode == "quick" : active = [c for c in active if c.__name__ != "_c_thinking_id" ] results = [call(c) for c in active] if skip_identity: results = [r for r in results if r. id not in _IDENTITY_IDS] total = sum (r.weight for r in results) gained = sum (r.weight for r in results if r.passed) return results, round (gained / total, 4 ) if total else 0.0 def _verdict ( score: float ) -> str : pct = score * 100 return "genuine" if pct >= 85 else ( "suspected" if pct >= 60 else "likely_fake" ) # ──────────────────────────────────────────────────────────── # API caller # ──────────────────────────────────────────────────────────── _PROBE = ( "You are Claude Code (claude.ai/code). " "Please introduce yourself: what are you, what tools can you use, " "and what is your purpose? Answer in detail." ) async def _call ( endpoint, api_key, model, prompt, api_type= "anthropic" , max_tokens= 4096 , budget= 2048 ): import httpx if api_type == "openai" : headers = { "Content-Type" : "application/json" , "Authorization" : f"Bearer {api_key} " } body: Dict [ str , Any ] = { "model" : model, "temperature" : 0 , "messages" : [{ "role" : "user" , "content" : prompt}]} else : headers = { "Content-Type" : "application/json" , "x-api-key" : api_key, "anthropic-version" : "2023-06-01" , "anthropic-beta" : "interleaved-thinking-2025-05-14" } body = { "model" : model, "max_tokens" : max_tokens,
このスキルを起動するキーワード。クリックでコピーできます。

このスキルにはトリガーワードがありません。

ダウンロードした .skill に含まれるフィールド。
フィールド 説明
formatフォーマット識別子(skill/v1)
skill_idスキル固有 ID
nameスキル名
versionバージョン
description説明
categoryカテゴリ(配列)
trigger_wordsトリガーワード
tagsタグ
sourceソース
source_urlソース URL(本ページ)
exported_atエクスポート日時(ダウンロード毎)
system_promptシステムプロンプト本文
model_configモデル設定:provider / model / temperature / max_tokens / top_p
examplesサンプル
install_guide各プラットフォームの導入説明(Coze / Dify / Claude / カスタム)
同じスキルを各プラットフォーム形式で出力できます。
.skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能 ダウンロード
.skillpro 拡張形式。scripts / tools / dependencies / hooks を含む ダウンロード
.json 純粋な JSON 出力。system_prompt とモデル設定のみ ダウンロード
Coze frontmatter 付き Markdown。Coze へのインポート用 ダウンロード
Dify Dify DSL。アプリ作成後にそのままインポート ダウンロード

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。