code-review-context

Reviews model context construction against size, caching, and structure constraints.

5|1|Updated Jun 26, 2026
One-click install
npx skills add https://github.com/looooonk/better-codex --skill code-review-context-looooonk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-review-context
Source: https://github.com/looooonk/better-codex/tree/main/.codex/skills/code-review-context
Command: npx skills add https://github.com/looooonk/better-codex --skill code-review-context-looooonk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building LLM-powered coding agents, uncontrolled growth of the model context causes cache misses, runaway token costs, and degraded inference quality. This Skill gives reviewers a concrete checklist for auditing how context items are injected into model requests. ## Core Features & Use Cases - Context Integrity Rules: Enforces incremental context building with no history rewrites and no frequent changes that cause cache misses. - Bounded Size Enforcement: Requires every injected item to have a hard cap, with no single item exceeding 10K tokens and items over 1K tokens flagged as P0 for manual review. - Structured Fragment Requirement: Mandates that all injected fragments be defined as structs in core/context implementing the ContextualUserFragment trait. - Use Case: While reviewing a pull request that adds a new system reminder or tool output to the agent's prompt, apply this Skill to verify the addition is bounded, cache-friendly, and implemented as a proper context fragment. ## Quick Start Review this pull request's changes to model context injection using the code-review-context checklist.

Frequently Asked Questions about code-review-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review changes to LLM prompt context in a pull request?▼

Check that context is built incrementally without history rewrites, that every injected item has a bounded size with a hard cap, and that no single item exceeds 10K tokens. Items crossing 1K tokens should be flagged as P0 for manual review.

What is the maximum size for items injected into model context?▼

Each injected item must be under 10K tokens and have a bounded size with a hard cap. Any individual item that can cross 1K tokens is highlighted as P0 and requires additional manual review.

Why do frequent context changes cause problems in LLM inference?▼

Frequent changes to the context cause cache misses, which increase latency and token costs during inference. Context must be built up incrementally so cached prefixes remain valid across requests.

How should new context fragments be implemented in the codebase?▼

All injected fragments must be defined as structs in the core/context module and implement the ContextualUserFragment trait. This keeps context items structured, reviewable, and consistently bounded.

When should a context item be flagged for manual review?▼

Flag an item as P0 when it can individually cross 1K tokens. These larger items need additional manual review because they have outsized impact on context size and cache behavior.