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.
npx skills add llm-d-incubation/llm-d-skills --skill clear-kv-cache-tiers-in-llm-d-deploymentgit clone --depth 1 https://github.com/llm-d-incubation/llm-d-skillsWrote 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/skills/llm-d-incubation/llm-d-skills/clear-kv-cache-tiers-in-llm-d-deployment)<a href="https://agentmods.dev/skills/llm-d-incubation/llm-d-skills/clear-kv-cache-tiers-in-llm-d-deployment"><img src="https://agentmods.dev/badge/skills/llm-d-incubation/llm-d-skills/clear-kv-cache-tiers-in-llm-d-deployment/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/skills/llm-d-incubation/llm-d-skills/clear-kv-cache-tiers-in-llm-d-deployment"><img src="https://agentmods.dev/badge/skills/llm-d-incubation/llm-d-skills/clear-kv-cache-tiers-in-llm-d-deployment.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.00112 | $0.05234 |
| Opus 5.5 | $0.00045 | $0.02094 |
| Sonnet 5.5 | $0.00022 | $0.01047 |
| Haiku 4.5 | $0.00011 | $0.00523 |
Grade C, and why
clear-kv-cache-tiers-in-llm-d-deployment scanned grade C with 2 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 2mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
Re-derives the `root_dir` per pod (self-contained) and deletes everything under it. `find … -mindepth 1 -delete` removes subdirectories and dotfiles (vLLM writes per-model subdirs, which a `rm -rf $p/*` glob would leave Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| **RBAC / exec error** | Try port-forward: `kubectl port-forward pod/$POD -n $NAMESPACE 18000:$VLLM_PORT &`, then curl `http://localhost:18000/reset_prefix_cache?...`. | How it starts
The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Reset vLLM Cache in llm-d
Purpose
Clear the KV / prefix cache on all vLLM pods in an llm-d deployment so the next run starts from a clean state. Prefers non-restart methods; falls back to pod restart when necessary.
Step 1: Ask for Namespace and Deployment
- Detect the current namespace and related options:
CURRENT_NS=$(oc project -q 2>/dev/null || kubectl config view --minify -o jsonpath='{..namespace}' 2>/dev/null || echo "")
SUGGESTED_NS=$(kubectl get namespaces -o jsonpath='{.items[*].metadata.name}' 2>/dev/null \
| tr ' ' '\n' | grep -iE "llm-d|inference|serving|benchmark" | grep -v "^$CURRENT_NS$" | head -5)
Ask the user:
"Which namespace? 1. <CURRENT_NS> (current context) 2–N. <SUGGESTED_NS> (or type any namespace)"
Set NAMESPACE to the user's answer. If the user just confirms without specifying, use CURRENT_NS — the namespace they are currently working in.
- List llm-d deployments (the
ROLEcolumn reveals a disaggregated setup):
kubectl get deployments -n $NAMESPACE -l app.kubernetes.io/part-of=llm-d \
-o custom-columns="NAME:.metadata.name,ROLE:.spec.template.metadata.labels.llm-d\.ai/role,READY:.status.readyReplicas,DESIRED:.spec.replicas"
# If empty, broaden:
kubectl get deployments -n $NAMESPACE | grep -iE "llm-d|vllm"
- One result → use automatically, inform the user.
- Multiple → ask: "Which deployment? (or 'all' to reset every vLLM pod in the namespace)"
- Disaggregated prefill/decode — you see both a
…-prefilland a…-decodedeployment (orROLE=prefill/ROLE=decode): both must be reset. Prefill pods hold KV cache too, so clearing only decode leaves stale prefill KV. Reset every role — theallselector below covers both in one pass, or run Steps 2–4 once per deployment.
Set DEPLOYMENT_NAME to the chosen deployment (used by the specific-deployment selector and the restart/patch steps). Skip it when the user picked all. For P/D, also capture both role names — used in Step 4:
DEPLOYMENT_NAME=<chosen deployment>
# P/D only — read the two role deployment names from the Step 1 listing:
PREFILL_DEPLOYMENT=$(kubectl get deployments -n $NAMESPACE -l llm-d.ai/role=prefill -o jsonpath='{.items[0].metadata.name}')
DECODE_DEPLOYMENT=$(kubectl get deployments -n $NAMESPACE -l llm-d.ai/role=decode -o jsonpath='{.items[0].metadata.name}')
What ships with it
2 files 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.
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.
- 2mo ago First seen · 280 lines · 112 tokens per session scan C 79db4d63f5dc
clear-kv-cache-tiers-in-llm-d-deployment is a skill published in the GitHub repository llm-d-incubation/llm-d-skills (7 stars, last pushed 8d ago), licensed Apache-2.0. It adds 112 tokens to every session and 5,234 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
clear-kv-cache-tiers-in-llm-d-deployment compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| clear-kv-cache-tiers-in-llm-d-deploymentllm-d-incubation/llm-d-skills | Skill | 7 | 8d ago | Apache-2.0 | C | 112 | Claude Code, Codex |
| agent-platform-model-registrygoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| foundry-config-setupmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 65 | Claude Code, Codex |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| training-checkwanshuiyin/Auto-claude-code-research-in-sleep | Skill | 19k | 3d ago | MIT | A | 35 | Claude Code |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 30 | Claude Code |
| finetuningmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 132 | Claude Code |