llamafarm: Skill for Claude Code

.claude/skills/runtime-skills/SKILL.md

runtime-skills is a skill for Claude Code from llama-farm/llamafarm. It costs 35 tokens per session (1,251 once invoked), scanned A, original, Apache-2.0.

A set of runtime guidelines for serving machine-learning models with PyTorch, Transformers, and FastAPI. It covers text generation, embeddings, classification, document processing, and related inference tasks.

In plain words
What is it for?
Use it when building or reviewing the Universal Runtime, including model loading, GPU or CPU handling, memory use, FastAPI endpoints, embeddings, OCR, classification, and reranking.
Why use it?
It gives developers checks for loading models, choosing devices, managing memory, handling asynchronous requests, and keeping the inference server secure and reliable.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is llama-farm/llamafarm's own configuration. It tells Claude Code how to work on llamafarm 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 llamafarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to llama-farm/llamafarm. 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/llama-farm/llamafarm/main/.claude/skills/runtime-skills/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/llama-farm/llamafarm

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 runtime-skills

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/llama-farm/llamafarm/runtime-skills"><img src="https://agentmods.dev/badge/skills/llama-farm/llamafarm/runtime-skills.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,251 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00035 $0.01251
Opus 5 $0.00017 $0.00626
Sonnet 5 $0.00007 $0.00250
Haiku 4.5 $0.00003 $0.00125

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

Security

Grade A, and why

runtime-skills 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 10d 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/runtime-skills/SKILL.md · 152 lines

How it starts

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

Universal Runtime Skills

Best practices and code review checklists for the Universal Runtime - LlamaFarm's local ML inference server.

Overview

The Universal Runtime provides OpenAI-compatible endpoints for HuggingFace models:

  • Text generation (Causal LMs: GPT, Llama, Mistral, Qwen)
  • Text embeddings (BERT, sentence-transformers, ModernBERT)
  • Classification, NER, and reranking
  • OCR and document understanding
  • Anomaly detection

Directory: runtimes/universal/ Python: 3.11+ Key Dependencies: PyTorch, Transformers, FastAPI, llama-cpp-python

This skill extends the shared Python practices. Always apply these first:

Topic File Priority
Patterns python-skills/patterns.md Medium
Async python-skills/async.md High
Typing python-skills/typing.md Medium
Testing python-skills/testing.md Medium
Errors python-skills/error-handling.md High
Security python-skills/security.md Critical

Runtime-Specific Checklists

Topic File Key Points
PyTorch pytorch.md Device management, dtype, memory cleanup
Transformers transformers.md Model loading, tokenization, inference
FastAPI fastapi.md API design, streaming, lifespan
Performance performance.md Batching, caching, optimizations

Architecture

runtimes/universal/
├── server.py              # FastAPI app, model caching, endpoints
├── core/
│   └── logging.py         # UniversalRuntimeLogger (structlog)
├── models/
│   ├── base.py            # BaseModel ABC with device management
│   ├── language_model.py  # Transformers text generation
│   ├── gguf_language_model.py  # llama-cpp-python for GGUF
│   ├── encoder_model.py   # Embeddings, classification, NER, reranking
│   └── ...                # OCR, anomaly, document models
├── routers/
│   └── chat_completions/  # Chat completions with streaming
├── utils/
│   ├── device.py          # Device detection (CUDA/MPS/CPU)
│   ├── model_cache.py     # TTL-based model caching
│   ├── model_format.py    # GGUF vs transformers detection
│   └── context_calculator.py  # GGUF context size computation
└── tests/

Read the full file on GitHub · 152 lines

Files

What ships with it

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

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. 10d ago First seen · 152 lines · 35 tokens per session scan A 8d7e28f8f15b

Subscribe to this mod's changes

runtime-skills is a skill published in the GitHub repository llama-farm/llamafarm (838 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,251 once invoked, about $0.0002 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

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

deepstream-sop

Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…

NVIDIA/skills · 219 tokens

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

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

coral-create-source-spec

Create or update a Coral source spec YAML for a custom HTTP API or local dataset. Use when authoring a standalone source for coral source add --file, or when adapting that spec into a Coral repo source under sources/core or sources/community.

withcoral/coral · 59 tokens