ollama-stack

ollama-stack is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 46 tokens per session (2,667 once invoked), scanned D, original, MIT.

A guide to running language models locally with Ollama and Open WebUI on personal computers or private servers. It includes offline setups, model selection, GPU use, and shared local endpoints.

In plain words
What is it for?
Use it to install Ollama, download and run models, build air-gapped or private AI environments, share an internal inference endpoint, and prototype local model workflows.
Why use it?
Cloud AI services may be unsuitable when data must stay local, internet access is limited, or you want to test models before paying for hosted APIs. This stack provides a local way to run and interact with models.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/ollama-stack
Any agent
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill ollama-stack
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills

Made for: Claude Code, Codex.

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 ollama-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/ollama-stack.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/ollama-stack)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/ollama-stack"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/ollama-stack.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,667 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
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.00046 $0.02667
Opus 5 $0.00023 $0.01333
Sonnet 5 $0.00009 $0.00533
Haiku 4.5 $0.00005 $0.00267

Measured 2d ago against content hash 13e25e2ac059, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade D, and why

ollama-stack scanned grade D with 3 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 2d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo useradd -r -s /bin/false -m -d /usr/share/ollama ollama

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://ollama.com/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://ollama.com/install.sh | sh
infrastructure/local-ai/ollama-stack/SKILL.md · 364 lines

How it starts

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

Ollama Stack

Deploy a local LLM stack for offline and privacy-first workflows.

When to Use This Skill

Use this skill when:

  • Setting up private/local LLM inference for development
  • Building air-gapped AI environments
  • Running models on personal hardware (Mac, Linux, Windows with GPU)
  • Creating team-shared inference endpoints
  • Prototyping before committing to cloud LLM APIs

Prerequisites

  • 8 GB+ RAM (16 GB+ recommended for 7B+ models)
  • For GPU acceleration: NVIDIA GPU with 6 GB+ VRAM, or Apple Silicon Mac
  • Docker (for containerized deployment)
  • 20 GB+ disk for model storage

Quick Start

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Start the server
ollama serve

# Pull and run a model
ollama pull llama3.1:8b
ollama run llama3.1:8b "Explain Kubernetes pods in one paragraph"

# List available models
ollama list

# Pull specific quantization
ollama pull llama3.1:8b-instruct-q4_K_M

Model Selection Guide

Model Size VRAM Best For
llama3.1:8b 4.7 GB 6 GB General chat, coding
llama3.1:70b 40 GB 48 GB Complex reasoning
codellama:13b 7.4 GB 10 GB Code generation
mistral:7b 4.1 GB 6 GB Fast general tasks
mixtral:8x7b 26 GB 32 GB High-quality MoE
nomic-embed-text 274 MB 1 GB Embeddings for RAG
llava:13b 8 GB 10 GB Vision + text
deepseek-coder-v2:16b 9 GB 12 GB Code generation
qwen2.5:14b 9 GB 12 GB Multilingual, reasoning

Docker Compose — Full Stack

# docker-compose.yml
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    ports:
      - "11434:11434"
    volumes:
      - ollama_data:/root/.ollama
    environment:
      - OLLAMA_HOST=0.0.0.0
      - OLLAMA_NUM_PARALLEL=4
      - OLLAMA_MAX_LOADED_MODELS=2
      - OLLAMA_FLASH_ATTENTION=1
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
      interval: 30s
      timeout: 10s
      retries: 3

  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    restart: unless-stopped
    ports:
      - "3000:8080"
    volumes:
      - webui_data:/app/backend/data
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
      - WEBUI_AUTH=true
      - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-change-me-in-production}
      - DEFAULT_MODELS=llama3.1:8b
    depends_on:
      ollama:
        condition: service_healthy

  litellm:
    image: ghcr.io/berriai/litellm:main-latest
    container_name: litellm
    restart: unless-stopped
    ports:
      - "4000:4000"
    volumes:
      - ./litellm-config.yaml:/app/config.yaml
    command: ["--config", "/app/config.yaml"]
    depends_on:
      ollama:
        condition: service_healthy

volumes:
  ollama_data:
  webui_data:

Read the full file on GitHub · 364 lines

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. 2d ago First seen · 364 lines · 46 tokens per session scan D 13e25e2ac059

Subscribe to this mod's changes

ollama-stack is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,053 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 2,667 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

agentic-eks-bootstrap

Bootstrap an AWS EKS cluster optimized for Agentic AI workloads — Karpenter v1.2+ GPU node pools, EKS Auto Mode, Kubernetes 1.32+ with DRA 1.35 GA, VPC CNI, GPU Operator, and baseline observability. Use when starting a new EKS cluster that will host vLLM, Inference Gateway, Langfuse, or Kagent.

aws-samples/sample-oh-my-aidlcops · 91 tokens

gpu-resource-management

Design GPU orchestration on EKS using Karpenter v1.2+ NodePools, KEDA scale-to-zero, and DRA 1.35 GA for multi-instance GPU (MIG) partitioning. Right-size NodePool for p5/g6e/trn2 instance mix, spot/on-demand split, consolidation, and topology-aware scheduling.

aws-samples/sample-oh-my-aidlcops · 76 tokens

inference-gateway-routing

Configure kgateway v2.0+ as L1 and Bifrost v1.x or LiteLLM v1.60+ as L2 for a 2-Tier Inference Gateway on EKS. Apply Cascade Routing (Haiku→Sonnet→Opus fallback), Semantic Router (intent-based model pick), and HTTPRoute with OTel trace propagation to Langfuse.

aws-samples/sample-oh-my-aidlcops · 84 tokens

vllm-serving-setup

Design, deploy, and tune vLLM v0.18.2 inference serving on EKS with PagedAttention v2, Multi-LoRA, FP8 KV Cache, Chunked Prefill, and Continuous Batching. Produces Helm values.yaml, PodMonitor, HPA, and kubectl validation steps for production agentic workloads.

aws-samples/sample-oh-my-aidlcops · 76 tokens

aws-bedrock-ai

WORKFLOW SKILL — Amazon Bedrock and AWS AI design: foundation model selection, knowledge bases (RAG), agents for bedrock, guardrails, provisioned throughput, batch inference, fine-tuning, KMS, VPC endpoints, regional GA, and per-provider licensing.

odere-pro/claude-aws-architect · 65 tokens

implementing-aws-config-rules-for-compliance

Implementing AWS Config rules for continuous compliance monitoring of AWS resources, deploying managed and custom rules aligned to CIS and PCI DSS frameworks, configuring automatic remediation with SSM Automation, and aggregating compliance data across accounts.

adriannoes/awesome-agentic-ai · 53 tokens