← ClaudeAtlas

lag-doctorlisted

Make every real-time LLM call feel fast by measuring it first. Finds each model call a person waits on (chat, voice, keyboard, inline assist, agents with a live user), pulls p50, p95 and p99 from production logs and splits the wait into stages (pre-model work, connection, prefill, thinking, first visible token, tool rounds), checks each stage against the provider's current official docs, asks the user which wait bothers them, then writes a short, doc-referenced plan and stops for approval. Use when the user says lag doctor, lag-doctor, latency, chat feels slow, time to first token, TTFT, the model takes forever to answer, voice reply lag, speed up the LLM, p95 or p99 of a model call, or `lag-doctor recheck` after a deploy. Works in any repo, with or without tej-core init. Algorithm and data-structure slowness goes to big-o-police; token bills go to cost-police. Never edits code before approval; never commits, pushes or deploys.
varuntej07/tej-stack · ★ 1 · AI & Automation · score 74
Install: claude install-skill varuntej07/tej-stack
# Lag Doctor Make the wait a person feels shorter, and prove it with the same numbers before and after. **The failure this skill exists to prevent is a confident speed-up nobody measured**: a model swapped, effort lowered or a cache added because a blog said so, shipped onto a path whose real wait was a 2.5 s think, a fresh TLS handshake per request, or a database write sitting in front of the model. Every finding carries the production number that motivated it, the official doc that backs the fix, and the log field that would prove it wrong. ## 0. Setup - If `.context/tej-core.json` exists, read `repos` and `never_touch`, then `.claude/rules/project-workflow.md` for evidence sources, log commands, the resilience profiles and which reads need permission. The report goes to `.context/4-scratchpad/`, the plan to `.context/2-specs/`. Otherwise both go to the session scratchpad. - Read the repo's `CLAUDE.md` and the ARCH doc for every path you touch. Their rules win (who picks models, latency gates, test policy, cost locks on high-frequency calls). - Read-only until approval. Log and analytics reads are fine; anything paid, slow or that the repo says to ask about, ask first. - `lag-doctor recheck` skips to section 7. ## 1. Inventory every real-time call Find every LLM call in every repo in scope, then keep the ones a person waits on. - Search for SDK clients and raw endpoints: `anthropic`, `openai`, `google.genai` / `generativeai`, `vertexai`, `bedrock`, `groq`