How to Configure SkillSpector to Use Local LLMs Like Ollama

Yes, SkillSpector supports local LLMs like Ollama through its OpenAI-compatible provider interface by setting the OPENAI_BASE_URL environment variable to point to your local server endpoint, requiring no code modifications.

NVIDIA's SkillSpector is an open-source tool for analyzing AI skills and code repositories using LLM-powered semantic analysis. While it defaults to cloud-based providers, the skillspector.llm_utils module implements a generic OpenAI-compatible client that allows SkillSpector to use local LLMs by routing all requests—including per-file meta-analysis calls—to a custom base URL.

How SkillSpector Routes LLM Requests

SkillSpector delegates all LLM interactions to the skillspector.llm_utils helper, which resolves credentials through the active provider before falling back to generic OpenAI-compatible environment variables. In src/skillspector/llm_utils.py, the get_chat_model() function constructs a ChatOpenAI instance using credentials sourced from skillspector.providers.

The provider abstraction in src/skillspector/providers/__init__.py handles provider selection via the SKILLSPECTOR_PROVIDER environment variable. When the openai provider is active, or when the system falls back to OpenAI-compatible variables, it reads OPENAI_API_KEY and OPENAI_BASE_URL from your environment. According to the implementation in src/skillspector/providers/openai/provider.py, these variables are passed directly to the underlying client, allowing any OpenAI-compatible server—including Ollama—to serve as the backend.

Step-by-Step Ollama Configuration

To route SkillSpector's LLM analysis to a local Ollama instance, configure the following environment variables before running the CLI:


# Select the OpenAI-compatible provider

export SKILLSPECTOR_PROVIDER=openai

# Provide a dummy API key (required by the client but ignored by Ollama)

export OPENAI_API_KEY=ollama

# Point to the local Ollama endpoint

export OPENAI_BASE_URL=http://localhost:11434/v1

# (Optional) Specify the exact model name available in Ollama

export SKILLSPECTOR_MODEL=llama3.1:8b

# Run the scan

skillspector scan ./my-skill/

The OPENAI_BASE_URL parameter overrides the default OpenAI endpoint, as documented in docs/DEVELOPMENT.md, which explicitly describes this variable as the mechanism to "point at Ollama" or other local servers.

Alternative: Using Local LLMs with the Default Provider

If you prefer to keep the default nv_build provider but still use a local endpoint, you can override the provider's model registry by setting the OpenAI-compatible variables regardless of the active provider:

export SKILLSPECTOR_PROVIDER=nv_build
export OPENAI_API_KEY=ollama
export OPENAI_BASE_URL=http://localhost:11434/v1
export SKILLSPECTOR_MODEL=llama3.1:8b

skillspector scan ./my-skill/

In this configuration, the provider selection remains nv_build, but the llm_utils module still routes requests to the local server because the OPENAI_BASE_URL environment variable is present.

Disabling LLM Analysis

If you need to run SkillSpector without any LLM connectivity—whether local or cloud—use the --no-llm flag to disable all LLM-backed semantic analysis and rely solely on static analysis:

skillspector scan ./my-skill/ --no-llm

Key Implementation Files

The local LLM integration is implemented across the following files:

Summary

  • SkillSpector uses local LLMs by setting OPENAI_BASE_URL to a local endpoint like http://localhost:11434/v1.
  • No code changes are required; only environment variables need configuration.
  • Use the openai provider (SKILLSPECTOR_PROVIDER=openai) or override the default provider's registry with OpenAI-compatible variables.
  • Provide a dummy OPENAI_API_KEY because Ollama requires a non-empty value but ignores its content.
  • Disable LLM calls entirely with the --no-llm flag for offline static analysis.

Frequently Asked Questions

Does SkillSpector require code modifications to use Ollama?

No. SkillSpector requires only environment variable changes to use local LLMs like Ollama. The provider abstraction in src/skillspector/providers and the client implementation in src/skillspector/llm_utils.py are designed to accept any OpenAI-compatible endpoint through the OPENAI_BASE_URL variable.

Can I use a different port or host for my local LLM server?

Yes. Simply set OPENAI_BASE_URL to the appropriate endpoint URL. For example, if your local server runs on port 8080, use export OPENAI_BASE_URL=http://localhost:8080/v1. The URL must include the /v1 path prefix if your server follows OpenAI's API specification.

How do I run SkillSpector without any LLM connection?

Use the --no-llm command-line flag when running the scan command. This disables all LLM-backed semantic analysis, including the per-file meta-analysis calls, and restricts the tool to static code analysis only.

Which provider should I select for local LLM inference?

You can use either the openai provider (SKILLSPECTOR_PROVIDER=openai) or keep the default nv_build provider while setting OPENAI_BASE_URL. Both approaches route requests to your local server, though the openai provider is the most explicit configuration for OpenAI-compatible endpoints.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →