ollama
Skill15 starsChanged 45 days agoMITView on GitHub
Expert Ollama assistance covering local LLM execution, Modelfile customization, REST API integration, and model quantizations. Use when running open models (Llama, Mistral, DeepSeek) locally on CPU/GPU.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- rawveg/skillsforge-marketplacetheir own version, first seen Feb 19, 2026
- balloob/llm-skillstheir own version, first seen Jan 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- rawveg/skillsforge-marketplace★ 40same name
- balloob/llm-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- service-meshSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 118
Create a custom Modelfile:
- Very specific: line 139
Use format=Schema.model_json_schema() for reliable structured outputs without regex parsing.
- Distinctive: line 147
Run heavy 70B models on systems with less than 64GB unified memory/RAM.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ollama
Ollama bundles model weights, configurations, and runtime dependencies into a streamlined CLI and local server for running open-source LLMs locally with native tool-calling.
When to Use
- Local LLM Execution: Running Llama 3, DeepSeek-R1, Mistral, and Qwen locally with a single CLI command.
- Zero-Cloud Air-Gapped Deployments: Privacy-critical enterprise environments requiring 100% on-premise execution.
- Custom Modelfile Configuration: Tailoring system prompts, temperature, context length, and stop sequences.
- REST & OpenAI-Compatible API: Seamless drop-in replacement for OpenAI SDKs in local test and dev pipelines.
Quick Start
# Run open-weight models locally with zero setup
ollama run llama3.2:3b "Write a Python script to compute Fibonacci numbers."# Query local Ollama instance via Python SDK
import ollama
response = ollama.chat(
model="llama3.2:3b",
messages=[{"role": "user", "content": "Explain zero-trust security."}]
)
print(response['message']['content'])Core Concepts
Local Inference with the Python Ollama SDK
Querying local models with streaming and structured JSON output:
import ollama
# Basic chat completion
response = ollama.chat(
model='llama3.1:8b',
messages=[
{'role': 'system', 'content': 'You are an expert DevOps engineer.'},
{'role': 'user', 'content': 'Write a minimal production Dockerfile for a Go API.'}
],
options={
'temperature': 0.2,
'num_ctx': 8192
}
)
print(response['message']['content'])Structured Output with Pydantic & JSON Schema
Enforcing typed JSON responses from local models:
from pydantic import BaseModel
import ollama
class ThreatAnalysis(BaseModel):
threat_level: str
vulnerabilities: list[str]
mitigation: str
response = ollama.chat(
model='llama3.1:8b',
messages=[
{'role': 'user', 'content': 'Analyze the security of an unauthenticated Redis instance exposed to 0.0.0.0.'}
],
format=ThreatAnalysis.model_json_schema(),
options={'temperature': 0.1}
)
analysis = ThreatAnalysis.model_validate_json(response['message']['content'])
print("Threat Level:", analysis.threat_level)
print("Mitigation:", analysis.mitigation)Custom Modelfile Authoring
Creating tailored local model artifacts:
# Modelfile
FROM llama3.1:8b
PARAMETER temperature 0.3
PARAMETER num_ctx 16384
PARAMETER stop "<|eot_id|>"
SYSTEM '''
You are Antigravity Code Guardian. You analyze git diffs for security vulnerabilities,
performance regressions, and design pattern anti-patterns. Respond in concise markdown tables.
'''# Build and register the custom model
ollama create code-guardian -f ./Modelfile
ollama run code-guardian "Review this diff..."Common Patterns
Custom System Instructions and Temperature via Modelfile
Problem: Re-sending identical system prompts and temperature settings with every API request.
Solution: Create a custom Modelfile:
FROM llama3.2:3b
# Set model temperature
PARAMETER temperature 0.2
# Set system instruction
SYSTEM """
You are a senior DevOps engineer. Always provide answers as copy-pasteable bash or Terraform snippets.
"""Build model: ollama create devops-assistant -f ./Modelfile
Best Practices
Do:
- Set
OLLAMA_NUM_PARALLELandOLLAMA_MAX_LOADED_MODELSto handle concurrent local requests efficiently. - Use
format=Schema.model_json_schema()for reliable structured outputs without regex parsing. - Offload models to Apple Silicon Metal or NVIDIA CUDA automatically with proper driver setups.
- Utilize
ollama pulland model tags to test quantized variants (:q4_K_M,:q8_0).
Don't:
- Expose Ollama port (11434) to the public internet without an authenticating reverse proxy (Nginx, Caddy).
- Assume default context is unlimited; explicitly set
num_ctx: 16384or higher in options if needed. - Run heavy 70B models on systems with less than 64GB unified memory/RAM.
Troubleshooting
| Error | Cause | Solution |
Error: could not connect to ollama app | Ollama daemon not running in background. | Start daemon with ollama serve. |
CUDA out of memory on local GPU | Model size exceeds discrete GPU VRAM. | Pull a smaller quantization (e.g. q4_0) or specify CPU layers in Modelfile. |
pull model failed: unexpected EOF | Network timeout during multi-gigabyte weight download. | Re-run ollama pull <model> to resume download from checkpoint. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

