From dh
Reviews LLM integration code for prompt hygiene, Claude model selection, context management, token economics, structured output validation, evaluation, and safety. Auto-loads for AI/ML code reviews.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dh:code-review-llmThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Stack-specific rules loaded by `dh:code-reviewer` when prompt files, model selection logic, or evaluation harness code are detected.
Stack-specific rules loaded by dh:code-reviewer when prompt files, model selection logic, or evaluation harness code are detected.
model = "haiku" # retrieval only, no reasoning requiredsonnet, haiku, opus) so upgrades require one change# WRONG: hardcoded version string
model = "claude-haiku-4-5"
# RIGHT: tier alias — version resolved by the client
model = "claude-haiku-latest"
# or better: configurable
model = config.model_tier # "haiku" | "sonnet" | "opus"
json.loads(response) without validation is a blocking findingtemperature=0 is required for deterministic tasks (classification, extraction, code generation with tests) — any other value is a blocking findingtemperature>0 is required for creative tasks (variation generation, brainstorming) — using 0 eliminates variation intentionally# RIGHT: documented temperature
response = client.messages.create(
model="claude-sonnet-latest",
temperature=0, # deterministic — this is a classification task
messages=[...]
)
429 (rate limited) with backoff is correct400 (bad request, context length exceeded) is a blocking finding — these errors are not transient and retrying wastes budget# WRONG: user input in system prompt
system = f"You are a helpful assistant. The user's name is {user_name}."
# RIGHT: user data in user turn only
system = "You are a helpful assistant."
messages = [{"role": "user", "content": f"My name is {user_name}. ..."}]
# WRONG: retry on context limit
for attempt in range(3):
try:
return client.messages.create(...)
except APIError: # catches 400 context limit AND 429 rate limit
time.sleep(2 ** attempt)
# RIGHT: only retry transient errors
for attempt in range(3):
try:
return client.messages.create(...)
except RateLimitError:
time.sleep(2 ** attempt + random.random())
except APIError:
raise # non-retryable — propagate immediately
npx claudepluginhub jamie-bitflight/claude_skills --plugin dhDetects direct and indirect prompt injection in LLM applications. Flags user input or retrieved documents that could hijack model instructions, and enforces trust-tier separation, input screening, and output validation.
Designs, tests, versions, and optimizes prompts for LLMs using patterns like zero-shot, few-shot, CoT, ReAct; covers injection prevention, evaluation, and A/B testing.
Reviews AI/LLM applications for security risks including prompt injection, RAG security, agent permissioning, jailbreaks, data leakage, and model supply chain threats.