Cache-stable prefix
Put only byte-stable content before the prompt-cache marker - system prompt and tool schemas first, timestamps and per-request context after - or every later call pays full input price.
Short, self-contained notes - one idea each: rules, snippets, and concepts from working with LLMs and agents. Cross-linked and kept current. Long-form pieces live in Articles.
[NOTES: 9]Put only byte-stable content before the prompt-cache marker - system prompt and tool schemas first, timestamps and per-request context after - or every later call pays full input price.
LLM-as-a-judge scores another model's output with a fixed rubric - use DAG for clear pass/fail, G-Eval for subjective quality, QAG for fact checks; cap an agent pipeline at ~5 metrics.
Claude Code skills compose through explicit Skill-tool calls between separate files, not a dedicated sub-skill primitive - disable-model-invocation blocks that call path too, not just autonomous triggering.
Context engineering is curating what enters the model's context window each turn, rather than relying on a bigger window to absorb the clutter.
Claude Code's /goal evaluator is a prompt-based Stop hook that doesn't call tools, so any proof of completion - test output, an exit code, git status - must be surfaced in the conversation or it can't be judged.
A verifiable completion condition is an autonomous-loop stop rule with a single measurable end state the model can prove from its own output - the difference between a loop that terminates and one that spins.
Put only universally applicable instructions in CLAUDE.md; task-specific content raises the odds an agent treats the whole file as noise and ignores it.
Language models use information at the start and end of a long context far more reliably than the middle - recall drops well before the token limit.
A subagent runs in its own context window and returns only a summary, keeping heavy intermediate tokens out of the parent conversation.