Engineering reference
Free Auto-Scatter Hook for LLM Prompts and Cost Review
An introduction to the Auto-Scatter Hook package, its operating modes, installation prerequisites, and documented behavior.
The services, methods, and examples described here do not establish an expected performance result for your workload.
I am releasing the auto-scatter hook for free. This article explains the package, how it structures prompts, and how to get it.
Leave a comment and I will drop the GitHub link. I want you to read this first. Understanding what you are getting means you will use it the right way.
What It Is
The package includes a local Python server, scatter_server.py, that receives a Claude Code prompt, calls Claude Haiku to organize it into six sinc fields, and injects the structured result as context.
What's in the Package
- scatter_server.py: FastAPI server, runs locally on port 8461
- scatter_hook.py: Claude Code PreToolUse hook that calls the server
- settings.json snippet: hook registration for Claude Code
- sinc_spec.json: the sinc-LLM 6-band format specification
- local_model/: Qwen2.5-7B GGUF fine-tuned for scatter (4.7GB, optional)
- test_scatter.py: validation tests to confirm the hook is working
- requirements.txt: fastapi, uvicorn, anthropic
The Two Operating Modes
Haiku mode: Uses an Anthropic API key for the scatter call. Include that call’s token usage and the provider’s applicable rates in a workload cost comparison.
Local model mode : uses the fine-tuned Qwen2.5-7B GGUF (included in the package). Requires an NVIDIA GPU (RTX 3090 or better recommended). Review the hardware requirements, prompt workload, and output checks when comparing local and API modes.
Checks After Installing
Check that the hook is invoked and that the revised prompt reaches the main model. Record the responses and retries needed for the task.
Measure scatter latency and the complete workflow time for your workload.
The hook runs as a sidecar process. The installation instructions describe the Claude Code settings change; review resource use and removal in your environment.
Prerequisites
# Requirements
Python 3.9+
Anthropic API key (for Haiku mode)
Claude Code (for hook integration)
# Install
pip install -r requirements.txt
uvicorn scatter_server:app --port 8461 &
# Add to Claude Code settings.json
# (see README for exact snippet)
Operating Measurements to Record
Record the prompts processed, responses per prompt, API token usage, scatter overhead, output checks, errors, and fallback events. Keep the workload and measurement window with the record.
The package is free. Leave a comment if you want the GitHub link.
// Production AI Engineering
Build AI systems that hold up in production.
sinc-LLM designs, audits, and stabilises production AI infrastructure: from vendor evaluation and cost accountability to incident controls and MCP architecture.
See what we do →Additional context
sinc-LLM About Blog Services
DOI: 10.5281/zenodo.19152668 · © 2026 sinc-LLM · Mario Alexandre
sinc-LLM

