deepseek-usage

deepseek-usage is a skill for Claude Code, Codex from OpenMinis/MinisSkills. It costs 95 tokens per session (2,193 once invoked), scanned A, original, MIT.

A usage checker for the DeepSeek API, the service developers use to add DeepSeek models to software. It reads account spending, token use, model details, daily totals, and cache-hit data from the DeepSeek platform.

In plain words
What is it for?
Use it to check your balance, this month’s spending, token usage by model, daily usage, and cache hit rate, or export monthly usage data.
Why use it?
It saves you from logging in and manually collecting usage and billing details. It requires your DeepSeek email and password in local environment variables.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/openminis/minisskills/deepseek-usage
Any agent
npx skills add OpenMinis/MinisSkills --skill deepseek-usage
Clone the repo
git clone --depth 1 https://github.com/OpenMinis/MinisSkills

Made for: Claude Code, Codex.

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-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/openminis/minisskills/deepseek-usage.svg)](https://agentmods.dev/skills/openminis/minisskills/deepseek-usage)
Your own site
<a href="https://agentmods.dev/skills/openminis/minisskills/deepseek-usage"><img src="https://agentmods.dev/badge/skills/openminis/minisskills/deepseek-usage.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,193 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00095 $0.02193
Opus 5 $0.00048 $0.01097
Sonnet 5 $0.00019 $0.00439
Haiku 4.5 $0.00010 $0.00219

Measured 5d ago against content hash b15ccb8624e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deepseek-usage 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 5d 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.

deepseek-usage/SKILL.md · 186 lines

How it starts

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

DeepSeek API Usage Query

⚠️ Security Notice This skill requires DeepSeek login credentials to work. Credentials are stored only in local environment variables. Minis does not upload them to any server. If you do not trust this method, delete this skill or do not set any credentials.

Prerequisite Configuration (first use only)

1. Set Environment Variables

Add the following two variables in Minis Settings → Environment Variables:

Variable Name Description Example Value
DEEPSEEK_EMAIL Your DeepSeek platform login email address [email protected]
DEEPSEEK_PASSWORD Your DeepSeek platform login password your_password_here

🔗 Click here to open the environment variable settings

If your account uses a third-party login such as Google or WeChat, you cannot use this skill.

2. Verify the Configuration

[ -n "$DEEPSEEK_EMAIL" ] && [ -n "$DEEPSEEK_PASSWORD" ] && echo "Configured" || echo "Not configured"

Query Process (requires only 2 tool calls)

Step 1: Navigate and Ensure Login (1 tool call)

Action:
  - set_user_agent: desktop_chrome
  - navigate: https://platform.deepseek.com/usage
  - If not logged in, fill DEEPSEEK_EMAIL / DEEPSEEK_PASSWORD from environment variables and submit the login form
  - wait_for_dom_stable

Step 2: Run the complete JS script in one step (1 execute_js)

The following JS script completes all logic: get token → download ZIP → unzip → parse CSV → output.

Run the entire JS script as the argument to execute_js --script in a single execution.

(async () => {
  // === Get summary text ===
  // Extract with get_readable (done outside execute_js)

  // === Get Token ===
  const token = JSON.parse(localStorage.getItem('userToken')).value;
  if (!token) return JSON.stringify({ error: 'no_token' });

  // === Download zip ===
  const resp = await fetch('https://platform.deepseek.com/api/v0/usage/export?month=5&year=2026', {
    headers: { 'Authorization': 'Bearer ' + token }
  });
  const blob = await resp.blob();

  // === Load JSZip ===
  const script = document.createElement('script');
  script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js';
  await new Promise(r => { script.onload = r; document.head.appendChild(script); });

  // === Unzip ===
  const zip = await JSZip.loadAsync(blob);
  const costText = await zip.file('cost-2026-5.csv').async('text');
  const amountText = await zip.file('amount-2026-5.csv').async('text');

  // === Parse cost (fees) ===
  // ⚠️ Header: user_id, utc_date, model, wallet_type, cost, currency
  const costLines = costText.trim().split('\n').slice(1);
  const modelCost = {};
  let totalCost = 0;
  for (const line of costLines) {
    const p = line.split(',');
    const model = p[2], cost = parseFloat(p[4]) || 0;
    modelCost[model] = (modelCost[model] || 0) + cost;
    totalCost += cost;
  }

  // === Parse amount (usage, filter by date as needed) ===
  // ⚠️ Header: user_id, utc_date, model, api_key_name, api_key(sensitive!), type, price, amount
  // ⚠️ Security warning: Column 5 is the plaintext api_key. Do not print entire lines! You must use index references.
  const allLines = amountText.trim().split('\n').slice(1);

  // Filtering rule: if the user asks about today's usage, filter to today; if the user asks about this month's usage, use the full month
  // Default is today. For today's usage, uncomment the following line:
  // const targetDate = 'current date in YYYY-MM-DD format';
  // const filteredLines = targetDate ? allLines.filter(l => l.split(',')[1] === targetDate) : allLines;
  const filteredLines = allLines; // Default: full month

  const models = {};
  for (const line of filteredLines) {
    const p = line.split(',');
    const model = p[2], type = p[5], amount = parseInt(p[7]) || 0;
    if (!models[model]) models[model] = { requests: 0, cache_hit: 0, cache_miss: 0, output: 0 };
    if (type === 'request_count') models[model].requests += amount;
    else if (type === 'input_cache_hit_tokens') models[model].cache_hit += amount;
    else if (type === 'input_cache_miss_tokens') models[model].cache_miss += amount;
    else if (type === 'output_tokens') models[model].output += amount;
  }

  // === Summary output ===
  let result = '';
  let gr = 0, go = 0, gh = 0, gm = 0;

  for (const [m, d] of Object.entries(models)) {
    const ti = d.cache_hit + d.cache_miss;
    const hr = ti > 0 ? (d.cache_hit / ti * 100).toFixed(1) : '0.0';
    const co = modelCost[m] || 0;
    result += `${m}|${d.requests}|${d.output}|${d.cache_hit}|${d.cache_miss}|${ti}|${hr}|${co.toFixed(2)}\n`;
    gr += d.requests; go += d.output; gh += d.cache_hit; gm += d.cache_miss;
  }

  const ti = gh + gm;
  const hr = ti > 0 ? (gh / ti * 100).toFixed(1) : '0.0';
  result += `TOTAL|${gr}|${go}|${gh}|${gm}|${ti}|${hr}|${totalCost.toFixed(2)}`;

  return result;
})();

Read the full file on GitHub · 186 lines

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. 5d ago First seen · 186 lines · 95 tokens per session scan A b15ccb8624e3

Subscribe to this mod's changes

deepseek-usage is a skill published in the GitHub repository OpenMinis/MinisSkills (397 stars, last pushed yesterday), licensed MIT. It adds 95 tokens to every session and 2,193 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…

google/skills · 138 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens