What you exclude from a response is as important as what you ask for. Negative prompting — explicitly stating what NOT to do — eliminates common failure modes before they happen.
Critical for: brand-safe copy, scoped code changes, technical accuracy, and keeping AI in scope.
Write a LinkedIn post announcing the launch of Vitae — a resume builder that shows analytics: who opened your resume, which sections they spent time on, which device they used.
DO:
DO NOT:
There's a bug: when the JWT token has expired, this function panics instead of returning an error.
Fix ONLY the nil pointer dereference on the claims access. Do NOT:
Add one comment explaining why the nil check is needed.
func ValidateToken(tokenStr string) (int, error) {
token, err := jwt.Parse(tokenStr, keyFunc)
if err != nil {
return 0, err
}
claims := token.Claims.(jwt.MapClaims)
userID := int(claims["user_id"].(float64))
return userID, nil
}
Claude follows explicit exclusions very reliably. Particularly effective here because Claude's default toward 'helpfulness' can expand scope — negatives lock it down.