Anthropic's Claude 4 introduces significant advancements in AI with its extended thinking capability, but it necessitates thorough security testing before deployment. The guide outlines using Promptfoo, an open-source adversarial AI testing tool, to red team Claude 4 Sonnet, starting with a basic setup and progressing to more sophisticated testing scenarios. It emphasizes the importance of identifying vulnerabilities specific to Claude 4's extended thinking feature, such as susceptibility to computational overload through complex problems and recursive reasoning. The guide suggests expanding security coverage with additional plugins targeting unauthorized commitments, AI authority overreach, false information, and compliance with frameworks like OWASP and NIST. It also advises on strategies for delivering attacks and offers instructions for testing other Claude models, including Claude Opus 4, with side-by-side comparisons to competitors. Custom test cases and CI/CD integration are recommended for comprehensive application security.