agent-config
Create, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or…
Optimize Ollama configuration for the current machine's hardware. Use when asked to speed up Ollama, tune local LLM performance, or pick models that fit available GPU/RAM. Don't use for LM Studio, llama.cpp, vLLM, or hosted-API LLM providers.
$ npx -y skills add luongnv89/skills --skill ollama-optimizer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ollama-optimizerContext preview
The summary Claude sees to decide when to auto-load this skill.
Optimize Ollama configuration for the current machine's hardware. Use when asked to speed up Ollama, tune local LLM performance, or pick models that fit available GPU/RAM. Don't use for LM Studio, llama.cpp, vLLM, or hosted-API LLM providers.
name: ollama-optimizer description: "Optimize Ollama configuration for the current machine's hardware. Use when asked to speed up Ollama, tune local LLM performance, or pick models that fit available GPU/RAM. Don't use for LM Studio, llama.cpp, vLLM, or hosted-API LLM providers." license: MIT effort: medium metadata: version: 1.3.0 author: "Luong NGUYEN <luongnv89@gmail.com>"
Optimize Ollama configuration based on system hardware analysis.
Use this skill when the user asks to optimize Ollama, configure Ollama, speed up Ollama, fix Ollama running slow, set up a local LLM, tune inference speed, reduce memory usage, or select models that fit their GPU/RAM. The skill analyzes hardware (GPU, VRAM, RAM, CPU) and produces tailored recommendations.
Do not use for LM Studio, llama.cpp, vLLM, or hosted-API LLM providers (OpenAI, Anthropic) — those use different runtimes and tuning surfaces.
**Fast path (opt-in only):** only skip full hardware analysis if the user explicitly asks to. Otherwise always run Phases 1-4 and follow the tier-based recommendation — do not apply shortcuts by default, and do not let them override a tier decision already made. For the per-platform shortcut commands and env vars, see [Platform-Specific Setup](references/platform_specific.md) and [Environment Variables](references/environment_variables.md).
Run the detection script to gather hardware information:
python3 scripts/detect_system.py
The script prints JSON on stdout and exits 0. On an unexpected failure it prints `Error: ...` on stderr and exits 1. If it exits 1, show that message, follow its fix hint, and run it once more. If the second run also exits 1, stop with `BLOCKED` (*Final Report*).
Parse the JSON output to identify:
If `ollama.installed` is `false`, continue to Phase 2. The plan then starts with the install step from [Platform-Specific Setup](references/platform_specific.md). Installing Ollama is an applied change.
Use `hardware_tier` from Phase 1 as the tier decision. Do not re-derive it; the table below explains what each tier means and which optimizations it implies. Override the script only with an explicit reason (e.g. VRAM shared with a display), and state that reason in the report.
**Unknown VRAM.** The script tiers a GPU only from `vram_gb`. An AMD ROCm GPU, an NVIDIA GPU whose VRAM reads `[N/A]`, and the Windows WMIC fallback report no `vram_gb`, so the script returns `low_vram`. An Intel Mac with a discrete GPU reports an empty `gpu` list, so the script returns `cpu_only`. In these cases, ask the user for the VRAM size. If they give it, override the tier from the table and state the reason. If they do not, keep the script's tier and list it under `Uncertainty:` as a conservative tier.
**Hardware Tier Classification:**
| Tier (`category`) | Script band | Max Model | Key Optimizations | |------|----------|-----------|-------------------| | `cpu_only` | No GPU detected | 3B | num_thread tuning, Q4_K_M quant | | `low_vram` | <6GB VRAM | 3B | Flash attention, KV cache q4_0 | | `entry` | 6-10GB VRAM | 8B | Flash attention, KV cache q8_0 | | `prosumer` | 10-16GB VRAM | 14B | Flash attention, full offload | | `workstation` | 16-48GB VRAM | 32B | Standard config, Q5_K_M option | | `high_end` | 48GB+ VRAM | 70B+ | Multiple models, Q5/Q6 quants |
**Apple Silicon Special Case:**
**Nothing to change.** `current_env_vars` shows only the environment the script ran in. For `Ollama.app` or the systemd service, also read the values Ollama uses (`launchctl getenv VAR`, `systemctl show ollama -p Environment`). If every recommended env var already has the recommended value there and every installed model fits the tier, the guide says so and the run proposes no applied change.
Read [Report Templates](references/report-template.md), then create the guide with these sections:
Present detected hardware specs and highlight constraints (e.g., "8GB unified memory limits to 8B models").
List what's needed based on the platform:
**Essential environment variables:**
# Always recommended export OLLAMA_FLASH_ATTENTION=1 # Memory-constrained systems (<12GB) export OLLAMA_KV_CACHE
One command drops a tested, versioned skill into your agent. No more ad-hoc prompts. The same rigorous steps run every time. Skills are independent files.
Create, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or…
Find open AI engineering jobs that fit a candidate, verify location and apply links, and assess each employer's product. Use for…
Generate App Store screenshots and header/search images for iPhone, iPad and Mac from a codebase or landing page, or re-render a…
Audit iOS/macOS apps against App Store Review Guidelines before submission, with evidence-backed verdicts and fixes. Don't use…
Optimize App Store and Google Play listings via a 7-phase, plan-approval-gated ASO workflow (keyword strategy, metadata,…
Generate a commit message, stage all changes, and push to remote after scanning for secrets, large files, and protected-branch…