[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EFP9DYRB0YFT8KHZSFWRJZ":3,"skill-same:01M6EFP9DYRB0YFT8KHZSFWRJZ":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6EFP9DYRB0YFT8KHZSFWRJZ","ollama-sdk",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Follama-sdk\u002FSKILL.md",[],[18,19,20],"sdk","ollama","ollama sdk","2026-11-10 10:12:30",false,"# Ollama — Run LLMs Locally\n\nYou are an expert in Ollama, the tool for running open-source LLMs locally. You help developers run Llama, Mistral, Gemma, Phi, CodeLlama, and other models on their machine with a simple CLI and REST API — enabling private AI development, offline inference, fine-tuning experiments, and cost-free prototyping without sending data to cloud APIs.\n\n## Core Capabilities\n\n### CLI Usage\n\n```bash\n# Install and run models\nollama pull llama3.1                      # Download model (~4.7GB for 8B)\nollama pull mistral                       # Mistral 7B\nollama pull codellama:13b                 # CodeLlama 13B\nollama pull nomic-embed-text              # Embedding model\n\n# Interactive chat\nollama run llama3.1 \"Explain quantum computing\"\n\n# List local models\nollama list\n\n# Create custom model\ncat > Modelfile \u003C\u003CEOF\nFROM llama3.1\nSYSTEM \"You are a senior Python developer. You write clean, documented code.\"\nPARAMETER temperature 0.3\nPARAMETER num_ctx 8192\nEOF\nollama create python-coder -f Modelfile\nollama run python-coder \"Write a FastAPI CRUD endpoint for users\"\n```\n\n### REST API\n\n```typescript\n\u002F\u002F Direct HTTP API\nconst response = await fetch(\"http:\u002F\u002Flocalhost:11434\u002Fapi\u002Fchat\", {\n  method: \"POST\",\n  body: JSON.stringify({\n    model: \"llama3.1\",\n    messages: [\n      { role: \"system\", content: \"You are a helpful assistant.\" },\n      { role: \"user\", content: \"Write a Python fibonacci function\" },\n    ],\n    stream: false,\n  }),\n});\nconst data = await response.json();\nconsole.log(data.message.content);\n\n\u002F\u002F Streaming\nconst streamResponse = await fetch(\"http:\u002F\u002Flocalhost:11434\u002Fapi\u002Fchat\", {\n  method: \"POST\",\n  body: JSON.stringify({\n    model: \"llama3.1\",\n    messages: [{ role: \"user\", content: \"Tell me a story\" }],\n    stream: true,\n  }),\n});\n\nconst reader = streamResponse.body!.getReader();\nconst decoder = new TextDecoder();\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  const chunk = JSON.parse(decoder.decode(value));\n  process.stdout.write(chunk.message.content);\n}\n\n\u002F\u002F Embeddings\nconst embeddingResponse = await fetch(\"http:\u002F\u002Flocalhost:11434\u002Fapi\u002Fembed\", {\n  method: \"POST\",\n  body: JSON.stringify({\n    model: \"nomic-embed-text\",\n    input: [\"Your text to embed\", \"Another text\"],\n  }),\n});\nconst embeddings = await embeddingResponse.json();\n\u002F\u002F embeddings.embeddings → [[0.123, -0.456, ...], [...]]\n```\n\n### OpenAI-Compatible API\n\n```typescript\n\u002F\u002F Use OpenAI SDK with Ollama (drop-in replacement)\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI({\n  baseURL: \"http:\u002F\u002Flocalhost:11434\u002Fv1\",\n  apiKey: \"ollama\",                       \u002F\u002F Required but unused\n});\n\nconst completion = await openai.chat.completions.create({\n  model: \"llama3.1\",\n  messages: [{ role: \"user\", content: \"Hello!\" }],\n});\n\n\u002F\u002F Works with any OpenAI-compatible library:\n\u002F\u002F - Vercel AI SDK: createOllama()\n\u002F\u002F - LangChain: ChatOllama\n\u002F\u002F - Instructor: instructor.from_openai(OpenAI(base_url=\"...\"))\n```\n\n### Python Client\n\n```python\nimport ollama\n\n# Chat\nresponse = ollama.chat(model=\"llama3.1\", messages=[\n    {\"role\": \"user\", \"content\": \"Explain Docker in simple terms\"},\n])\nprint(response[\"message\"][\"content\"])\n\n# Streaming\nfor chunk in ollama.chat(model=\"llama3.1\", messages=[\n    {\"role\": \"user\", \"content\": \"Write a haiku\"},\n], stream=True):\n    print(chunk[\"message\"][\"content\"], end=\"\")\n\n# Embeddings\nresult = ollama.embed(model=\"nomic-embed-text\", input=\"Your text here\")\n```\n\n## Installation\n\n```bash\n# macOS\nbrew install ollama\n\n# Linux\ncurl -fsSL https:\u002F\u002Follama.ai\u002Finstall.sh | sh\n\n# Docker\ndocker run -d -v ollama:\u002Froot\u002F.ollama -p 11434:11434 ollama\u002Follama\n\n# Start server (if not using Docker)\nollama serve\n```\n\n## Best Practices\n\n1. **OpenAI compatibility** — Use Ollama's `\u002Fv1` endpoint with OpenAI SDK; switch between local and cloud with one config change\n2. **Right-size models** — 7B models for fast inference; 13B for better quality; 70B needs serious GPU (48GB+ VRAM)\n3. **Custom Modelfiles** — Create specialized models with system prompts and parameters; reproducible behavior\n4. **Embeddings locally** — Use `nomic-embed-text` for local RAG; no API costs, complete privacy\n5. **GPU acceleration** — Ollama auto-detects NVIDIA\u002FAMD\u002FApple Silicon GPU; falls back to CPU if unavailable\n6. **Context window** — Set `num_ctx` in Modelfile for longer context; default 2048, can go to 128K for some models\n7. **Batch processing** — Use keep_alive to prevent model unloading between requests; faster batch inference\n8. **Privacy-first** — All data stays on your machine; ideal for sensitive documents, HIPAA\u002FGDPR compliance\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Follama-sdk",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill ollama-sdk",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill ollama-sdk",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill ollama-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Follama-sdk\u002FSKILL.md",true,[],[49,58,67,75,81,87],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[55,56,57],"model","model hierarchy","model hierarchy skill",{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[64,65,66],"MCP","zoom","zoom mcp",{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[18,73,74,65],"zoom apps sdk","apps",{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[77],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[83],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[89]]