Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

ollama-model-safety-guardrails

Skill by divinevideo

Explains how to choose an Ollama model and API endpoint for processing legal but sensitive content with a local LLM. Recommends mistral or mixtral when llama3.2 or deepseek-r1 refuse such content.

  • Score 71
  • 263 stars
  • MPL-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install ollama-model-safety-guardrails

Built from the published package, never by AI.

git clone --depth 1 https://github.com/divinevideo/divine-mobile /tmp/divine-mobile && mkdir -p ~/.claude/skills && cp -r /tmp/divine-mobile/.claude/skills/ollama-model-safety-guardrails ~/.claude/skills/ollama-model-safety-guardrails

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install ollama-model-safety-guardrails in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill gives guidance on choosing an Ollama model for processing legal but sensitive content, such as adult content or sex work data, through a local LLM. It says llama3.2 and deepseek-r1:8b often refuse or return safety disclaimers, and recommends mistral, or mixtral for better quality. It also explains why /api/chat is used instead of /api/generate for system prompt support.

The skill also covers system prompt structure, such as stating the legal context, defining a data processing role, and matching the response language to the content. For format consistency, it suggests writing prompts in the output language, adding format examples, using matching section headers, and limiting input size. It also advises stream set to false for batch processing and a temperature of 0.3 for steadier structured output. It is aimed at developers who run Ollama locally and need consistent results from sensitive but legal material.

Written from the project's SKILL.md and checked against it.

What it can do

  • Model selectionRecommends mistral or mixtral over llama3.2 and deepseek-r1:8b for sensitive but legal content.
  • Chat API usageShows how to call /api/chat with a system message and user message instead of /api/generate.
  • System prompt strategyDescribes system prompt elements: legal context, data processing role, response language and output format.
  • Format consistencyLists prompt techniques for consistent section-based output, such as format examples and matching headers.

What you need

  • Ollama installed and running locally
  • An Ollama model such as mistral pulled to the machine

Try asking

  • Which Ollama model should I use for legal but sensitive text?
  • Show me how to call Ollama's /api/chat with a system prompt.
  • Help me structure a prompt so Ollama returns consistent markdown sections.

Good to know

  • Model behavior may change with version updates, so test after pulling new versions.
  • Format compliance can be inconsistent even with mistral.
  • The first request is blocked while Ollama auto-downloads the model.
  • Very long content should be chunked and summarized in stages.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/ollama-model-safety-guardrails/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to ollama-model-safety-guardrails

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

ollama-model-safety-guardrails: common questions

Which Ollama model does this skill recommend for sensitive content?

It recommends mistral, or mixtral for better quality. The source says llama3.2 and deepseek-r1:8b tend to refuse or ignore system prompts for this kind of content.

Why use /api/chat instead of /api/generate?

The source says /api/generate does not properly support system prompts, so /api/chat with a messages array is used. Its reply is read from data.message.content.

Does this require an API key?

No. The source says the approach uses Ollama locally and needs no API key.

How do I install ollama-model-safety-guardrails?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is ollama-model-safety-guardrails free?

The code is published under the MPL-2.0 licence. The service it connects to may have its own pricing.

Is ollama-model-safety-guardrails safe to use?

It scores 71 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to ollama-model-safety-guardrails?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

ollama-model-safety-guardrails Install

Add to stack

Loading.