From dev-pomogator
HOW and WHY to make a FAST model call (Haiku/Sonnet) from our own hooks, gates, judges, and engine scripts — via the local Meridian subscription proxy on http://127.0.0.1:3456, NOT via `claude -p`. Meridian gives an Anthropic-compatible /v1/messages API backed by the user's SUBSCRIPTION (no ANTHROPIC_API_KEY needed). Measured: a direct Meridian call with thinking OFF ≈ 2.4s; `claude -p` ≈ 13s (it cold-starts MCP/hooks/plugin every call). USE THIS before writing any "spawn claude to judge X" code — do not reinvent the slow wheel. Triggers: "вызвать модель из хука", "быстрый вызов хайку", "судья на хайку", "model call from a hook/gate/judge", "call haiku fast", "LLM judge in a hook", "meridian api call", "как звать модель в плагине".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-pomogator:meridian-model-callThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Anything in this repo that needs a model DECISION inside a hook/gate/judge/engine script
claude -p)Anything in this repo that needs a model DECISION inside a hook/gate/judge/engine script
(the FR-49b stop-gate judge, FR-8 semantic drift, anchor-fix fallback, future LLM gates)
MUST call Meridian — the local subscription proxy — directly over HTTP. Do NOT
shell out to claude -p. Measured on this machine (.dev-pomogator/.tmp/latency-probe):
| Transport | Latency / call | Why |
|---|---|---|
claude -p --model haiku | ~13 000 ms | cold-starts the whole Claude Code CLI (MCP servers, hooks, plugin tree, CLAUDE.md) EVERY call |
claude -p --bare (via proxy) | ~5 000 ms | --bare skips MCP/hooks/plugin, but the CLI wrapper still costs ~5s |
Meridian /v1/messages, thinking ON | ~7 000 ms | the model reasons before the verdict |
Meridian /v1/messages, thinking OFF | ~2 400 ms | direct HTTP, no CLI, no reasoning — use this |
claude -p for a binary judgment is the slow/dumb wheel. ~5× slower for the SAME model.
Meridian is already the project's blessed path (see proxy-up, use-claude-subscription).
curl -s -m 20 http://127.0.0.1:3456/v1/messages \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-H "x-api-key: sk-dummy" \ # proxy injects the subscription auth; any value works
-d '{
"model": "claude-haiku-4-5-20251001",
"max_tokens": 64,
"thinking": {"type": "disabled"},
"messages": [{"role": "user", "content": "<your prompt — ask for ONE JSON line>"}]
}'
content[0].text holds the reply.thinking: {type: disabled} is the speed knob — leaving it on adds ~3-5s of reasoning you don't need for a classifier/judge.fetch(...) (Node ≥18) over spawning curl.claude-haiku-4-5-20251001 for cheap/fast judging; bump to Sonnet only when the judgment is genuinely hard.A plugin-distributed hook runs on machines where Meridian may be down or not installed. The caller MUST degrade, never block on the proxy:
curl -s -m 3 http://127.0.0.1:3456/health → expect {"status":...,"auth":...}.Skill("proxy-up") (health → start → reauth decision tree).| Need | Skill |
|---|---|
| Make a model call from OUR hook/judge/engine | this (the recipe above) |
| Proxy down / 503 / start-restart-reauth Meridian | proxy-up |
Wire an EXTERNAL project's .env to the subscription | use-claude-subscription |
| Install/autostart Meridian for plugin users | infra ships in the plugin at <plugin-root>/tools/claude-subscription-proxy/; a SessionStart hook (ensure-up.cjs) auto-starts it (fail-open, MERIDIAN_AUTOSTART=false to opt out); container reuses the host Claude login (no separate claude login); proxy-up for manual ops |
spawnSync('claude', ['-p', ...]) for a judgment — ~13s cold-start; use Meridian (~2.4s).thinking on for a binary classifier/judge — wastes ~3-5s.ANTHROPIC_API_KEY in code/hooks — Meridian uses the subscription; no key./health is local, doesn't hit upstream.Created 2026-06-14 after the FR-49 stop-gate-judge prototype measured claude -p at ~13s
(unusable per-stop) vs Meridian-direct-thinking-off at ~2.4s. The owner: «встрой Meridian в
плагин… и скил сделай как и нахуя юзать, чтоб не придумывать велосипеды медленные». This
skill is the canonical answer so no future agent reinvents the claude -p slow path.
npx claudepluginhub stgmt/dev-pomogator --plugin dev-pomogatorCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.