AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Llamafile

skill-ultroncore-claude-skill-vault-llamafile · by UltronCore

Run LLMs as self-contained single-file executables with no installation required

— No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add skill-ultroncore-claude-skill-vault-llamafile

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ● Network access Used
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ultroncore-claude-skill-vault-llamafile)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Llamafile? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Llamafile — Portable LLM Executables

Overview

Llamafile (by Mozilla) packages an LLM model together with a llama.cpp runtime into a single portable executable that runs on Windows, macOS, and Linux without installation. Based on the Cosmopolitan Libc project, a single .llamafile binary runs natively on 6+ OS/architecture combos. Ideal for distributing LLMs as self-contained tools, CI runners, or offline inference without Docker or Python environments.

GitHub: https://github.com/Mozilla-Ocho/llamafile (14k+ stars)

When to Use

  • Distributing an LLM as a single downloadable artifact
  • Running inference in CI/CD pipelines without GPU or heavy dependencies
  • Offline or air-gapped environments
  • Rapid prototyping without Python environment setup
  • Embedding a model into a CLI tool

Installation

# Download a pre-built llamafile (example: Mistral 7B)
wget https://huggingface.co/Mozilla/Mistral-7B-Instruct-v0.2-llamafile/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.llamafile

# Make executable (macOS/Linux)
chmod +x mistral-7b-instruct-v0.2.Q4_K_M.llamafile

# Run (opens browser UI by default)
./mistral-7b-instruct-v0.2.Q4_K_M.llamafile

# Run headless as OpenAI-compatible API server
./mistral-7b-instruct-v0.2.Q4_K_M.llamafile --server --port 8080 --nobrowser

# Or run CLI inference directly
./mistral-7b-instruct-v0.2.Q4_K_M.llamafile -p "Explain quantum entanglement in one sentence"

Key Patterns / Usage

Serving as OpenAI-compatible API

./model.llamafile --server --port 8080 --nobrowser --n-gpu-layers 35

# Now query with any OpenAI-compatible client
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "local-model",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Using with Python (openai SDK)

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8080/v1", api_key="none")

response = client.chat.completions.create(
    model="local-model",
    messages=[{"role": "user", "content": "Write a haiku about llamafiles"}],
    temperature=0.7,
)
print(response.choices[0].message.content)

Building a Custom Llamafile

# Install zipalign tool
pip install zipalign-java

# Combine llamafile runtime + GGUF model
wget https://github.com/Mozilla-Ocho/llamafile/releases/latest/download/llamafile
chmod +x llamafile
cp llamafile my-model.llamafile
./llamafile -m my-model.gguf --server  # embed model separately

# Or use llamafile-add to bundle:
./llamafile-add my-model.gguf -o bundled-model.llamafile

Running with GPU Acceleration

# macOS Metal
./model.llamafile --n-gpu-layers 99

# NVIDIA CUDA (requires CUDA toolkit)
./model.llamafile --n-gpu-layers 35 --cuda

# Check hardware detection
./model.llamafile --list-devices

Embedding Inference (no server)

# Generate embeddings
./model.llamafile --embedding -p "text to embed" --output-format json

# Batch processing via stdin
echo "Summarize: $(cat document.txt)" | ./model.llamafile -p -

Environment Variables

# Control threads and context
LLAMAFILE_THREADS=8 ./model.llamafile --ctx-size 4096

# Disable GPU (CPU-only)
GGML_OPENCL_DEVICE=-1 ./model.llamafile

Common Pitfalls

  • macOS Gatekeeper: first run needs xattr -c model.llamafile or right-click → Open
  • Windows: rename to model.llamafile.exe before running
  • Large files: models are 4-8 GB; ensure disk space for both download and extraction temp
  • Context overflow: default context is often 512 tokens; pass --ctx-size 4096 for longer prompts
  • No streaming by default in CLI: add --no-penalize-nl for streaming output
  • GPU detection: llamafile auto-detects GPU but may fall back to CPU silently — check logs

Related Skills

  • ollama-integration — alternative local inference runtime
  • vllm-serving — production-grade GPU LLM serving
  • litellm-proxy — unified API gateway for local + cloud models
  • ollama-python-sdk — programmatic Ollama access

GitNexus Index

tool: llamafile
category: llm-inference
tier: local
interface: openai-compatible
platform: cross-platform
stars: 14000+

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.