Mustel is a local, non-AI static analysis layer that intercepts editor save loops. It formats and compresses code diagnostics into ultra-short prompts to guide coding agents without context bloat.
pip install mustel
Standard coding agents transfer thousands of lines of raw, duplicate linter logs on every save loop. These verbose payloads clog context windows, increase latency, and inflate your API bills.

Out-of-the-box rule configurations covering 26 core packages, cloud SDKs, web frameworks, and system utilities.








































Mustel executes linter checks, deduplicates overlap reports, and runs custom YAML pattern checks locally. It formats all issues and creates a sub-200 character summary to instruct AI agents clearly.
Fast file stat validation (mtime + size) returns findings in under 30ms.
Written-in-Rust linter tools (Ruff, Oxlint) scan scripts concurrently.
Compiles files into structured AST outline nodes, reducing prompt context overhead by 95%.
Measured empirically via tiktoken (`cl100k_base` and `o200k_base` encodings) on real codebases.
Empirical reduction in total input tokens sent to LLMs.
By presenting pre-summarized errors, LLMs write solutions directly.
Measured against external, un-tuned test code. 100% on customized benchmarks.
| Project Name | Source | Files | Lines | Vulnerabilities | Detection Rate |
|---|---|---|---|---|---|
| project_auth | Internal | 1 | 82 | 5 | 100% |
| project_backend | Internal | 1 | 83 | 5 | 100% |
| project_independent | Un-tuned | 2 | 192 | 16 | 75% |
| EVFA | Open-source | 23 | 453 | 9 | 55.6% |
Mustel runs locally and hooks directly into your editor or terminal pipeline.
Run `mustel scan` or initialize the MCP server. Mustel runs Ruff linting, Bandit security audits, and pip-audit CVE lookups locally in milliseconds.
It parses your python files and runs YAML-defined regex rules to scan for anti-patterns across 22 popular libraries.
An MCP server outputs the compressed findings into the system instructions, allowing the coding agent to query issues by ID and solve them immediately.