ollama

ollama is a cursor rule for Cursor from davidl71/project-management-automation. It costs 963 tokens per session, scanned A, original, MIT.

A set of instructions for using Ollama, a local AI tool, to analyze code on your own computer.

In plain words
What is it for?
It is for local code review, security checks, debugging complex logic, documentation, and analyzing algorithms or other private data.
Why use it?
It helps keep proprietary or security-sensitive code from being sent to an online service. It can also support analysis when you do not want to use an API.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It is for local code review, security checks, debugging complex logic, documentation…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/davidl71/project-management-automation/ollama
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/davidl71/project-management-automation

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ollama

README.md
[![agentmods](https://agentmods.dev/badge/rules/davidl71/project-management-automation/ollama.svg)](https://agentmods.dev/rules/davidl71/project-management-automation/ollama)
Your own site
<a href="https://agentmods.dev/rules/davidl71/project-management-automation/ollama"><img src="https://agentmods.dev/badge/rules/davidl71/project-management-automation/ollama.svg" alt="Measured on agentmods" height="20"></a>
Per session 963 This file is loaded in full into every session.
When invoked 963 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00963 $0.00963
Opus 5 $0.00481 $0.00481
Sonnet 5 $0.00193 $0.00193
Haiku 4.5 $0.00096 $0.00096

Measured 6d ago against content hash 40029fb92b39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ollama scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. Test API: `curl http://localhost:11434/api/tags`
.cursor/rules/ollama.mdc · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ollama MCP Server Usage

When to Use Ollama

ALWAYS use Ollama for:

  • Privacy-sensitive code analysis
  • Security review of code and risk management
  • Documentation generation for proprietary code
  • Code review of sensitive calculations
  • Analysis of algorithms and strategies
  • Any code that should not leave your local machine

Usage Pattern: Use Ollama when:

  • Analyzing proprietary code
  • Reviewing security implementations
  • Generating documentation for sensitive modules
  • Debugging complex logic
  • Researching with local data

Examples

Good:

  • "Use Ollama to analyze this code for security issues"
  • "Review this code with Ollama for potential bugs"
  • "Generate documentation for this module using Ollama"
  • "Explain this calculation using Ollama"
  • "Check this code for memory leaks using Ollama"

Avoid:

  • General coding questions (use Cursor AI instead)
  • Quick lookups (use Context7 or web search)
  • Questions that don't involve proprietary code
  • Real-time collaboration needs (use Cursor AI)

Benefits

  • Privacy: All code stays on your local machine
  • Cost Savings: No API costs for frequent analysis
  • Offline Capability: Works without internet connection
  • Security: Proprietary code never transmitted to cloud

Integration with Other Tools

  • Before cloud services: Use Ollama for sensitive code, then Cursor AI for general questions
  • With Semgrep: Ollama for code analysis, Semgrep for security scanning
  • With Context7: Ollama for proprietary code, Context7 for library documentation

Workflow for Code Review

  1. Identify sensitive code - Algorithms, calculations, proprietary logic
  2. Use Ollama - Analyze code locally for bugs, security, documentation
  3. Review suggestions - Always review Ollama's suggestions before implementing
  4. Combine with human review - Ollama assists, human decides

Best Practices

Query Optimization

  • Be specific: "Review this function for potential bugs, focusing on edge cases and error handling"
  • Provide context: Include relevant code or file references
  • Break down complex questions: Split large analyses into smaller, focused queries
  • Review output: Always review and test Ollama's suggestions

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 134 lines · 963 tokens per session scan A 40029fb92b39

Subscribe to this mod's changes

ollama is a cursor rule published in the GitHub repository davidl71/project-management-automation (1 stars, last pushed 6mo ago), licensed MIT. It adds 963 tokens to every session, about $0.0048 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.