Token导航 LogoToken导航

Agent Skill · 研究检索

ollama(Ollama 搜索)

ollama 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

ollama 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 49,257。

总安装 659周安装 28GitHub Stars 5下载 231核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ollama(Ollama 搜索)
来源仓库:https://github.com/balloob/llm-skills
仓库路径:skills/ollama
安装命令:
npx skills add https://github.com/balloob/llm-skills --skill ollama
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/balloob/llm-skills --skill ollama

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

ollama 帮助用户在本机部署和管理大语言模型,支持 Llama、Mistral、Gemma 等主流开源模型。它提供 Python 与 Node.js SDK 集成指南,适用于构建无需云端依赖的 AI 应用。技能涵盖安装验证、模型下载、API 调用示例等全流程指导,降低本地推理门槛。

使用前需确保硬件资源充足,并遵守各模型的许可协议与使用限制。ollama 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ollama

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/balloob/llm-skills --skill ollama;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ollama 怎么安装?

在终端执行 npx skills add https://github.com/balloob/llm-skills --skill ollama。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ollama 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ollama 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

ollama 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

ollama 用的人多吗?

公开数据是累计安装 659 次,近一周安装 28 次,下载 231 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ollama 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
ollama

Ollama 搜索 · 本页

6595操作浏览器MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Ollama

Overview

This skill helps users integrate Ollama into their projects for running large language models locally. The skill guides users through setup, connection validation, model management, and API integration for both Python and Node.js applications. Ollama provides a simple API for running models like Llama, Mistral, Gemma, and others locally without cloud dependencies.

When to Use This Skill

Use this skill when users want to:

  • Run large language models locally on their machine
  • Build AI-powered applications without cloud dependencies
  • Implement text generation, chat, or embeddings functionality
  • Stream LLM responses in real-time
  • Create RAG (Retrieval-Augmented Generation) systems
  • Integrate local AI capabilities into Python or Node.js projects
  • Manage Ollama models (pull, list, delete)
  • Validate Ollama connectivity and troubleshoot connection issues

Installation and Setup

Step 1: Collect Ollama URL

IMPORTANT: Always ask users for their Ollama URL. Do not assume it's running locally.

Ask the user: "What is your Ollama server URL?"

Common scenarios:

  • Local installation: http://localhost:11434 (default)
  • Remote server: http://192.168.1.100:11434
  • Custom port: http://localhost:8080
  • Docker: http://localhost:11434 (if port mapped to 11434)

If the user says they're running Ollama locally or doesn't know the URL, suggest trying http://localhost:11434.

Step 2: Check if Ollama is Installed

Before proceeding, verify if Ollama is installed and running at the provided URL. Users can check by visiting the URL in their browser or running:

curl <OLLAMA_URL>/api/version

If Ollama is not installed, guide users to install it:

macOS/Linux:

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

Windows: Download from https://ollama.com/download

Docker:

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

Step 3: Start Ollama Service

Ensure Ollama is running:

macOS/Linux:

ollama serve

Docker:

docker start ollama

The service typically runs at http://localhost:11434 by default.

Step 4: Validate Connection

Use the validation script to test connectivity and list available models.

IMPORTANT: The script path is relative to the skill directory. When running the script, either:

  1. Use the full path from the skill directory (e.g., /path/to/ollama/scripts/validate_connection.py)
  2. Change to the skill directory first and then run python scripts/validate_connection.py
# Run from the skill directory
cd /path/to/ollama
python scripts/validate_connection.py <OLLAMA_URL>

Example with the user's Ollama URL:

cd /path/to/ollama
python scripts/validate_connection.py http://192.168.1.100:11434

The script will:

  • Normalize the URL (remove any path components)
  • Check if Ollama is accessible
  • Display the Ollama version
  • List all installed models with sizes
  • Provide troubleshooting guidance if connection fails

Success output:

✓ Connection successful!
  URL: http://localhost:11434
  Version: Ollama 0.1.0
  Models available: 2

Installed models:
  - llama3.2 (4.7 GB)
  - mistral (7.2 GB)

Failure output:

✗ Connection failed: Connection refused
  URL: http://localhost:11434

Troubleshooting:
  1. Ensure Ollama is installed and running
  2. Check that the URL is correct
  3. Verify Ollama is accessible at the specified URL
  4. Try: curl http://localhost:11434/api/version

Model Management

Pulling Models

Help users download models from the Ollama library. Common models include:

  • llama3.2 - Meta's Llama 3.2 (various sizes: 1B, 3B)
  • llama3.1 - Meta's Llama 3.1 (8B, 70B, 405B)
  • mistral - Mistral 7B
  • phi3 - Microsoft Phi-3
  • gemma2 - Google Gemma 2

Users can pull models using:

ollama pull llama3.2

Or programmatically using the API (examples in reference docs).

Listing Models

Guide users to list installed models:

ollama list

Or use the validation script to see models with detailed information.

Removing Models

Help users delete models to free space:

ollama rm llama3.2

Model Selection Guidance

Help users choose appropriate models based on their needs:

  • Small models (1-3B): Fast, good for simple tasks, lower resource requirements
  • Medium models (7-13B): Balanced performance and quality
  • Large models (70B+): Best quality, require significant resources

Implementation Guidance

Python Projects

For Python-based projects, refer to the Python API reference:

  • File: references/python_api.md
  • Usage: Load this reference when implementing Python integrations
  • Contains:

- REST API examples using urllib.request (standard library) - Text generation with the Generate API - Conversational interfaces with the Chat API - Streaming responses for real-time output (RECOMMENDED) - Embeddings for semantic search - Complete RAG system example - Error handling patterns - PEP 723 inline script metadata for dependencies

  • No dependencies required: Uses only Python standard library

IMPORTANT: When creating Python scripts for users, include PEP 723 inline script metadata to declare dependencies. See the reference docs for examples.

DEFAULT TO STREAMING: When implementing text generation or chat, use streaming responses unless the user explicitly requests non-streaming.

Common Python use cases:

# Streaming text generation (RECOMMENDED)
for token in generate_stream("Explain quantum computing"):
    print(token, end="", flush=True)

# Streaming chat conversation (RECOMMENDED)
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What is the capital of France?"}
]
for token in chat_stream(messages):
    print(token, end="", flush=True)

# Non-streaming (use only when needed)
response = generate("Explain quantum computing")

# Embeddings for semantic search
embedding = get_embeddings("Hello, world!")

Node.js Projects

For Node.js-based projects, refer to the Node.js API reference:

  • File: references/nodejs_api.md
  • Usage: Load this reference when implementing Node.js integrations
  • Contains:

- Official ollama npm package examples - Alternative Fetch API examples (Node.js 18+) - Text generation and chat APIs - Streaming with async iterators (RECOMMENDED) - Embeddings and semantic similarity - Complete RAG system example - Error handling and retry logic - TypeScript support examples

Installation:

npm install ollama

DEFAULT TO STREAMING: When implementing text generation or chat, use streaming responses unless the user explicitly requests non-streaming.

Common Node.js use cases:

import { Ollama } from 'ollama';
const ollama = new Ollama();

// Streaming text generation (RECOMMENDED)
const stream = await ollama.generate({
  model: 'llama3.2',
  prompt: 'Explain quantum computing',
  stream: true
});

for await (const chunk of stream) {
  process.stdout.write(chunk.response);
}

// Streaming chat conversation (RECOMMENDED)
const chatStream = await ollama.chat({
  model: 'llama3.2',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'What is the capital of France?' }
  ],
  stream: true
});

for await (const chunk of chatStream) {
  process.stdout.write(chunk.message.content);
}

// Non-streaming (use only when needed)
const response = await ollama.generate({
  model: 'llama3.2',
  prompt: 'Explain quantum computing'
});

// Embeddings
const embedding = await ollama.embeddings({
  model: 'llama3.2',
  prompt: 'Hello, world!'
});

Common Integration Patterns

Text Generation

Generate text completions from prompts. Use cases:

  • Content generation
  • Code completion
  • Question answering
  • Summarization

Guide users to use the Generate API with appropriate parameters (temperature, top_p, etc.) for their use case.

Conversational Interfaces

Build chat applications with conversation history. Use cases:

  • Chatbots
  • Virtual assistants
  • Customer support
  • Interactive tutorials

Guide users to use the Chat API with message history management. Explain the importance of system prompts for behavior control.

Embeddings & Semantic Search

Generate vector embeddings for text. Use cases:

  • Semantic search
  • Document similarity
  • RAG systems
  • Recommendation systems

Guide users to use the Embeddings API and implement cosine similarity for comparing embeddings.

Streaming Responses

RECOMMENDED APPROACH: Always prefer streaming for better user experience.

Stream LLM output token-by-token. Use cases:

  • Real-time chat interfaces
  • Progressive content generation
  • Better user experience for long outputs
  • Immediate feedback to users

When creating code for users, default to streaming API unless they specifically request non-streaming responses.

Guide users to:

  • Enable stream: true in API calls
  • Handle async iteration (Node.js) or generators (Python)
  • Display tokens as they arrive for real-time feedback
  • Show progress indicators during generation

RAG (Retrieval-Augmented Generation)

Combine document retrieval with generation. Use cases:

  • Question answering over documents
  • Knowledge base chatbots
  • Context-aware assistance

Guide users to:

  1. Generate embeddings for documents
  2. Store embeddings with associated text
  3. Search for relevant documents using query embeddings
  4. Inject retrieved context into prompts
  5. Generate answers with context

Both reference docs include complete RAG system examples.

Best Practices

Security

  • Never hardcode sensitive information
  • Use environment variables for configuration
  • Validate and sanitize user inputs before sending to LLM

Performance

  • Use streaming for long responses to improve perceived performance
  • Cache embeddings for documents that don't change
  • Choose appropriate model sizes for your use case
  • Consider response time requirements when selecting models

Error Handling

  • Always implement proper error handling for network failures
  • Check model availability before making requests
  • Provide helpful error messages to users
  • Implement retry logic for transient failures

Connection Management

  • Validate connections before proceeding with implementation
  • Handle connection timeouts gracefully
  • For remote Ollama instances, ensure network accessibility
  • Use the validation script during development

Model Management

  • Check available disk space before pulling large models
  • Keep only models you actively use
  • Inform users about model download sizes
  • Provide model selection guidance based on requirements

Context Management

  • For chat applications, manage conversation history to avoid token limits
  • Trim old messages when conversations get too long
  • Consider using summarization for long conversation histories

Troubleshooting

Connection Issues

If connection fails:

  1. Verify Ollama is installed: ollama --version
  2. Check if Ollama is running: curl http://localhost:11434/api/version
  3. Restart Ollama service: ollama serve
  4. Check firewall settings for remote connections
  5. Verify the URL format (should be http://host:port with no path)

Model Not Found

If model is not available:

  1. List installed models: ollama list
  2. Pull the required model: ollama pull model-name
  3. Verify model name spelling (case-sensitive)

Out of Memory

If running out of memory:

  1. Use a smaller model variant
  2. Close other applications
  3. Increase system swap space
  4. Consider using a machine with more RAM

Slow Performance

If responses are slow:

  1. Use a smaller model
  2. Reduce num_predict parameter
  3. Check CPU/GPU usage
  4. Ensure Ollama is using GPU if available
  5. Close other resource-intensive applications

Resources

scripts/validate_connection.py

Python script to validate Ollama connection and list available models. Normalizes URLs, tests connectivity, displays version information, and provides troubleshooting guidance.

references/python_api.md

Comprehensive Python API reference with examples for:

  • Installation and setup
  • Connection verification
  • Model management (list, pull, delete)
  • Generate API for text completion
  • Chat API for conversations
  • Streaming responses
  • Embeddings and semantic search
  • Complete RAG system implementation
  • Error handling patterns
  • Best practices

references/nodejs_api.md

Comprehensive Node.js API reference with examples for:

  • Installation using npm
  • Official ollama package usage
  • Alternative Fetch API examples
  • Model management
  • Generate and Chat APIs
  • Streaming with async iterators
  • Embeddings and semantic similarity
  • Complete RAG system implementation
  • Error handling and retry logic
  • TypeScript support
  • Best practices

平台分布

OpenCode

26.89%
按下载量换算62

Gemini CLI

21.71%
按下载量换算50

Antigravity

18.12%
按下载量换算42

Claude Code

12.67%
按下载量换算29

windsurf

7.09%
按下载量换算16

Codex

3.03%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills