WeReply: Skill for Claude Code

.claude/skills/deepseek-integration/SKILL.md

deepseek-integration is a skill for Claude Code from cacr92/WeReply. It costs 112 tokens per session (4,123 once invoked), scanned A, original, MIT.

A set of instructions for connecting an application to DeepSeek, an AI service that can generate text responses. It covers sending web requests, receiving normal or live-streamed replies, and handling connection errors.

In plain words
What is it for?
Use it when adding DeepSeek reply suggestions, configuring a Rust HTTP client, handling JSON or live event streams, managing API keys, or improving connection reuse.
Why use it?
It gives developers a documented way to manage API requests, authentication, timeouts, retries, and reusable connections. An API is a defined way for one program to communicate with another.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is cacr92/WeReply's own configuration. It tells Claude Code how to work on WeReply itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything WeReply configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cacr92/WeReply. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cacr92/WeReply/main/.claude/skills/deepseek-integration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cacr92/WeReply

Made for: Claude Code.

Wrote 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.

agentmods badge for deepseek-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/cacr92/wereply/deepseek-integration/github.svg)](https://agentmods.dev/skills/cacr92/wereply/deepseek-integration)
Your own site
<a href="https://agentmods.dev/skills/cacr92/wereply/deepseek-integration"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/deepseek-integration/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.

agentmods 80×15 button for deepseek-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/cacr92/wereply/deepseek-integration"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/deepseek-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.04123
Opus 5 $0.00056 $0.02062
Sonnet 5 $0.00022 $0.00825
Haiku 4.5 $0.00011 $0.00412

Measured 9d ago against content hash de6cbb725840, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

deepseek-integration 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 9d 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.

.claude/skills/deepseek-integration/SKILL.md · 678 lines

How it starts

The opening of the file, as written. The whole thing — 678 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DeepSeek Integration Skill

Expert guidance for integrating DeepSeek API with reqwest HTTP client, streaming responses, and error handling.

Overview

WeReply uses DeepSeek API to generate reply suggestions:

  • HTTP Client: reqwest with connection pooling
  • API Endpoint: https://api.deepseek.com/v1/chat/completions
  • Authentication: API key via Bearer token
  • Response Format: JSON (non-streaming) or Server-Sent Events (streaming)
  • Configuration: API key stored in system keychain

HTTP Client Configuration

Reqwest Client Setup

use reqwest::{Client, ClientBuilder};
use std::time::Duration;
use std::sync::Arc;

pub struct DeepSeekClient {
    client: Arc<Client>,
    api_key: String,
    api_endpoint: String,
}

impl DeepSeekClient {
    pub fn new(api_key: String) -> anyhow::Result<Self> {
        let client = ClientBuilder::new()
            .pool_max_idle_per_host(10)  // 连接池最大空闲连接数
            .timeout(Duration::from_secs(30))  // 请求超时30秒
            .connect_timeout(Duration::from_secs(10))  // 连接超时10秒
            .build()?;

        Ok(Self {
            client: Arc::new(client),
            api_key,
            api_endpoint: "https://api.deepseek.com/v1/chat/completions".to_string(),
        })
    }

    pub fn with_custom_endpoint(mut self, endpoint: String) -> Self {
        self.api_endpoint = endpoint;
        self
    }
}

Connection Pooling Best Practices

// ✓ 共享 Client 实例(连接池复用)
pub struct AppState {
    deepseek_client: Arc<DeepSeekClient>,
}

// ✗ 每次创建新 Client(无连接池复用)
pub async fn bad_example() {
    let client = DeepSeekClient::new(api_key).unwrap();  // 不要这样做
}

API Request Pattern

Basic Request/Response

use serde::{Deserialize, Serialize};

#[derive(Serialize)]
pub struct ChatCompletionRequest {
    model: String,
    messages: Vec<ChatMessage>,
    #[serde(skip_serializing_if = "Option::is_none")]
    temperature: Option<f32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    max_tokens: Option<u32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    stream: Option<bool>,
}

#[derive(Serialize, Deserialize)]
pub struct ChatMessage {
    role: String,  // "system", "user", "assistant"
    content: String,
}

#[derive(Deserialize)]
pub struct ChatCompletionResponse {
    id: String,
    model: String,
    choices: Vec<ChatChoice>,
    usage: Usage,
}

#[derive(Deserialize)]
pub struct ChatChoice {
    index: u32,
    message: ChatMessage,
    finish_reason: String,
}

#[derive(Deserialize)]
pub struct Usage {
    prompt_tokens: u32,
    completion_tokens: u32,
    total_tokens: u32,
}

Read the full file on GitHub · 678 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 9d ago First seen · 678 lines · 112 tokens per session scan A de6cbb725840

Subscribe to this mod's changes

deepseek-integration is a skill published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It adds 112 tokens to every session and 4,123 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

anthropic-claude-development

Expert guidance for Anthropic Claude API development including Messages API, tool use, prompt engineering, and building production applications with Claude models.

Mindrally/skills · 33 tokens

cloudflare-workers-ai

Cloudflare Workers AI for serverless GPU inference. Use for LLMs, text/image generation, embeddings, or encountering AIERROR, rate limits, token exceeded errors.

secondsky/claude-skills · 39 tokens

openrouter-ai-models-guide

Guide to OpenRouter — the unified API for 200+ AI models from OpenAI, Anthropic, Google, Meta, Mistral, and more. Covers model selection, pricing, routing strategies, fallback chains, and integration with SperaxOS for optimal model usage per task.

nirholas/three.ws · 64 tokens

LLM

Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context management.

jjyaoao/HelloAgents · 59 tokens

laravel:ai-sdk

Build AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs.

jpcaparas/superpowers-laravel · 39 tokens