Paged Attention
Use when the user asks about PagedAttention, KV cache size, vLLM OOM, gpu-memory-utilization, max-num-seqs, prefix caching, continuous batching or preemption. Produces a KV-cache capacity estimate and serving-engine flags for vLLM, SGLang or TensorRT-LLM. Not for the attention kernel itself (use flash-attention) or general model serving (use ml-model-serving).
Install
npx skills add j4flmao/agent-skills --skill paged-attentiongit clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/hardware-acceleration/paged-attention ~/.claude/skills/paged-attentionPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# PagedAttention and KV-Cache Management
## Purpose
During autoregressive decoding every request keeps Keys and Values for all past tokens. Allocating that cache contiguously for the maximum length wastes most of it; the vLLM paper measured 60-80% of KV memory wasted in prior systems. PagedAttention stores the cache in fixed-size blocks mapped through a per-sequence block table, like OS virtual memory, so waste drops to under ~4% and far more requests fit in a batch.
## Agent Protocol
### Trigger
"pagedattention", "kv cache", "kv cache size", "vllm OOM", "block table", "prefix caching", "continuous batching", "gpu-memory-utilization", "max-num-seqs", "preemption".
### Input Context
- Model architecture (layers, KV heads, head dim), dtype, max context length.
- GPU memory and count (tensor parallel size), traffic profile (prompt/output lengths, concurrency, shared prefixes).
- Engine and version.
### Output Artifact
KV-cache capacity estimate + engine flags. No file unless requested.
### Response Format
```
KV bytes/token: {value}
KV budget: {GB} -> ~{tokens} tokens -> ~{concurrent requests} at {avg len}
Flags: {engine flags}
Expected bottleneck: {KV capacity|compute|bandwidth}
```
### Completion Criteria
- [ ] KV bytes/token computed from the real config (GQA heads, not attention heads).
- [ ] Preemption/queueing metrics checked under realistic load.
- [ ] Prefix caching considered when prompts share system prompts or documents.
## KV-Cache SizeDetails
- Skill name
paged-attention- Repository
- j4flmao/agent-skills
- Path
skills/hardware-acceleration/paged-attention/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Paged Attention skill do?
Use when the user asks about PagedAttention, KV cache size, vLLM OOM, gpu-memory-utilization, max-num-seqs, prefix caching, continuous batching or preemption. Produces a KV-cache capacity estimate and serving-engine flags for vLLM, SGLang or TensorRT-LLM. Not for the attention kernel itself (use flash-attention) or general model serving (use ml-model-serving).
How do I install the Paged Attention skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill paged-attention. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Paged Attention popular?
It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.
Related skills
Agent Observability
45j4flmao/agent-skills
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
AI Agent Architectures
45j4flmao/agent-skills
Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).
AI Agent Core Loop
45j4flmao/agent-skills
Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).
Project Init
45j4flmao/agent-skills
Use when the user asks to scaffold a project, create the project structure, initialize a new repo from scratch, set up folders and config files or generate AGENTS.md. Scaffolds the directory tree and starter config for the detected or stated stack. Not for onboarding people (use core-onboarding) or dev containers (use dev-loop-dev-container).
Neuromorphic Computing
45j4flmao/agent-skills
Use this skill when the user says 'neuromorphic', 'spiking neural network', 'SNN', 'LIF neuron', 'Loihi', 'SpiNNaker', 'event camera', 'surrogate gradient', 'snnTorch', 'Lava framework', 'memristor in-memory computing'. Explains event-driven spiking computation, neuron models, training methods (surrogate gradients, ANN-to-SNN conversion), hardware platforms, and when neuromorphic approaches are worth prototyping. Do NOT use for: conventional GPU deep learning (ml/deep-learning), edge inference on MCUs with standard networks (embedded-systems/edge-ai), or quantum hardware (quantum-computing/*).
Tensorrt Optimization
45j4flmao/agent-skills
Use when the user asks about TensorRT, trtexec, ONNX to TensorRT engines, optimization profiles for dynamic shapes, FP8/INT8 engines, Polygraphy or TensorRT-LLM / trtllm-serve. Produces build commands, precision plan and benchmark plan. Not for choosing GPTQ/AWQ in depth (use extreme-quantization-mastery) or serving platforms (use ml-model-serving).
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.