deepseek-usage
Skill438 starsChanged 3 months agoMITView on GitHub
Check DeepSeek API usage (balance, this month's spending, token breakdown by model, daily breakdown, and cache hit rate). Access the DeepSeek Open Platform through browser_use, automatically log in, and export monthly data. Users must configure their DeepSeek account in local environment variables. Triggered when the user says "check usage," "view token consumption," "check spending," "how much balance is left," or "how much was used today."
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- lsongdev/skillsedited, first seen Sep 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- lsongdev/skills★ 193% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- android-devSkill
- android-ui-automationSkill
- apple-remindersSkill
- appstoreprice-hubSkill
- asc-cliSkill
- bilibili-hubSkill
- Clash 控制器Skill
- cloudflare-dnsSkill
- codex-imageSkill
- codex-on-ishSkill
- contact-vcard-extractorSkill
- doubao-ttsSkill
- douyin-downloaderSkill
- exa-searchSkill
- free-ttsSkill
- fucai3d-latestSkill
- generative-ui-minisSkill
- github-sync-helperSkill
- health-sleep-analysisSkill
- hyperframes-cliSkill
- hyperframesSkill
- korea-stockSkill
- maimai-hubSkill
- memos-apiSkill
- nano-bananaSkill
- notion-hubSkill
- openstreetmap-markerSkill
- pdf-converterSkill
- production-agent-publicSkill
- qbt-hubSkill
- quark-hubSkill
- reverse-dcfSkill
- self-improving-agentSkill
- shortcut-share-fileSkill
- spotify-hubSkill
- stock-fund-flowSkill
- stock-priceSkill
- tavily-searchSkill
- tg-hubSkill
- todoocardSkill
- twitter-downloaderSkill
- twitter-x-hubSkill
- us-stockSkill
- web-content-extractorSkill
- web-searchSkill
- weibo-hubSkill
- whenpeakSkill
- xianyu-hubSkill
- xiaohongshu-hubSkill
- youtube-downloaderSkill
- ytmusic-hubSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Add the following two variables in Minis Settings → Environment Variables:
- Very specific: line 56
Run the entire JS script as the argument to execute_js --script in a single execution.
- Very specific: line 167
When parsing CSV, use column index references such as p[2], p[5], and p[7].
- Distinctive: line 169
If you need to inspect CSV content during debugging, print only the header (row 1), not the data rows
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 | user@example.com |
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_stableStep 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;
})();⚠️ Note:
execute_jsreturns text wrapped in JSON. The AI needs to parsedata.textto get the actual result.
Step 3: Screenshot (1 tool call, optional)
screenshot: current pageStep 4: Report (memory_write is decided by the user)
Whether to write the results to the daily log is decided by the user. Write only when the user explicitly asks.
Output Format
Balance: ¥X.XX | Spent This Month: ¥X.XX
Image: Usage Screenshot
| Model | Requests | Output Tokens | Cache Hits | Cache Misses | Total Input Tokens | Cache Hit Rate | Cost |
| deepseek-v4-pro | X | X | X | X | X | X% | ¥X.XX |
| deepseek-v4-flash | X | X | X | X | X | X% | ¥X.XX |
| Total | X | X | X | X | X | X% | ¥X.XX |
⚠️ Security Precautions (must be followed)
API Key Leakage Risk
Column 5 (index 4) of the amount CSV is the api_key field and contains the user's DeepSeek API Key in plaintext.
Requirements:
- When parsing CSV, use column index references such as
p[2],p[5], andp[7]; do not reference the entire line - Do not directly or indirectly display
api_keycontent in any reply, log, or screenshot - If you need to inspect CSV content during debugging, print only the header (row 1), not the data rows
Credential Security
- Email and password are stored in Minis local environment variables and are not uploaded
- The localStorage token is valid only for the current browser session
- We recommend changing your password regularly
Troubleshooting Notes
| Issue | Cause | Solution |
| Export button click has no effect | The export button is a <div>, not a <button> | Use querySelector to match the text "Export", then call .click() |
| browser_use fetch returns Missing Token | fetch does not include page cookies | Use execute_js instead to run fetch in the page context |
| JSZip fails to load | The import() method is not supported | Use document.createElement('script') to dynamically load the CDN |
| CSV parses to 0 records | Incorrect field indexes were guessed | First confirm the headers (8 columns for amount, 6 columns for cost), then reference by index |
| amount.csv contains plaintext API Key | Column 5 is api_key | Use column indexes during parsing; do not print the entire row |
| minis-browser-use CLI loses state across calls | Each call is a separate process | Put all JS logic in a single execute_js execution; do not pass state across navigate and execute_js |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

