By felixmanojh
Local LLM minions for Claude Code — offload grunt work (docstrings, types, comments) to local Ollama models.
Apply generated patches safely. Preview diffs, dry-run to check, then apply. Always review patches before applying - minions make mistakes!
View analytics and performance data for minions. Shows success rates, latency, and session history.
Manage Ollama models for minions. Pull new models, list available ones, switch presets, check disk usage. Use when setting up or changing models.
Use when a mechanical code change needs review before applying. Delegates grunt work to local LLMs — saves cloud tokens. Generates patch for review. Use for changes that might need adjustment. Files must be <500 lines.
PROACTIVELY USE after implementing code to add docstrings, type hints, cleanup. Delegates grunt work to local LLMs — saves cloud tokens. Files must be <500 lines. Use for mechanical polish, not logic changes. Changes are auto-applied.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Local LLM minions for mechanical code tasks — offload grunt work to your local Ollama models.
Think of it like Gru and his Minions: Gru (Claude Code) handles the master plan — architecture, complex logic, decisions. The Minions (local LLMs) handle the repetitive grunt work — adding docstrings to 50 files, type hints across a module.
┌─────────────────────────────────────────────────────────────┐
│ Claude Code (Cloud) │
│ Planning • Strategy • Complex reasoning │
└─────────────────────────────┬───────────────────────────────┘
│ delegates mechanical tasks
▼
┌─────────────────────────────────────────────────────────────┐
│ Minions (Local) │
│ Docstrings • Type hints • Repetitive fixes │
│ Free • Private • On your hardware │
└─────────────────────────────────────────────────────────────┘
Why this split?
| Cloud (Claude Code) | Local (Minions) |
|---|---|
| Expensive tokens | Free (your GPU) |
| Best for reasoning | Best for grunt work |
| Complex decisions | Mechanical repetition |
| Smart but costly | Cheap and focused |
Use Claude for the hard stuff. Send minions for the rest.
| Task | Works? |
|---|---|
| Add docstrings | Yes |
| Add type hints | Yes |
| Add comments | Yes |
| Rename variable (simple cases) | Yes |
| Files up to ~500 lines | Yes (32K context) |
| Anything requiring understanding | No |
Be honest: 7b models are limited. Minions handle repetitive mechanical tasks. No reasoning, no logic.
Minions use a Generate → Validate → Retry pipeline:
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Generate │ ──▶ │ AST Lint │ ──▶ │ Validate │ ──▶ │ Apply │
│ (minion) │ │ (syntax) │ │ (LLM) │ │ (if ok) │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│ │
└───── Retry ────┘
(with error)
Failures are logged to ~/.minions/ for debugging.
| Constraint | Limit |
|---|---|
| File size | <500 lines (32K context, configurable) |
| Task type | Mechanical only (no logic, no reasoning) |
brew install ollama or ollama.aiollama pull qwen2.5-coder:7b
ollama pull qwen2.5-coder:1.5b # for validation
git clone https://github.com/felixmanojh/minions.git
cd minions
python -m venv .venv
source .venv/bin/activate
pip install -e .
minions setup -i
Guides you through model selection and downloads.
cp -r skills/* ~/.claude/skills/
minions <command> [options]
Add docstrings, types, comments — validated before applying:
# Add all polish (docstrings + types + headers)
minions polish src/foo.py --task all
# Just docstrings
minions polish src/foo.py --task docstrings
# Multiple files
minions polish src/foo.py src/bar.py --task types
# Dry run (preview without applying)
minions polish src/foo.py --task all --dry-run
# Skip validation (faster, less safe)
minions polish src/foo.py --task all --no-validate
# Use custom linter
minions polish src/foo.py --task all --lint-cmd "ruff check"
# More retries on failure
minions polish src/foo.py --task all --max-retries 3
Find and fix files missing documentation:
# Discover what needs work
minions sweep src/ --task docstrings
# Apply fixes to all discovered files
minions sweep src/ --task docstrings --apply
# Full sweep with backups
minions sweep . --task all --apply --backup
Generate patches for review before applying:
minions patch "Add TODO comment at top" \
--target src/file.py \
--read src/file.py
# Review and apply
patch -p1 --dry-run < sessions/*.patch
patch -p1 < sessions/*.patch
Same patch on multiple files in parallel:
npx claudepluginhub felixmanojh/minions --plugin minionsExplain complex code and annotate files with inline documentation
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Delegate heavy code generation to a local LLM (Ollama / LM Studio). Save tokens, keep oversight.
When calling LLM APIs from Python code. When connecting to llamafile or local LLM servers. When switching between OpenAI/Anthropic/local providers. When implementing retry/fallback logic for LLM calls. When code imports litellm or uses completion() patterns.
Auto-formatting hooks for Python, JavaScript, Markdown, and Bash with Google-style docstrings and code quality checks.
Tooling and developer productivity experts - CLI tools, documentation, README generation, and DX optimization