Skip to content

Guide · Agent skill

How to use the Continuous LLM Red Teaming agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains what the continuous-llm-red-teaming-with-promptfoo skill does, how to install it for Claude, and how to ask the agent to set up repeatable adversarial tests for an LLM app. It is written for people who have not used agent skills before. By the end you will know how to get the skill running, what you need in place first, and how to wire Promptfoo and DeepTeam into a CI/CD pipeline that fails a build when a previously blocked attack starts working again.

Continuous LLM Red Teamingmukul975/Anthropic-Cybersecurity-Skills · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings, Capabilities, then Skills.
  2. 2Install the prerequisites. Install Node.js 18 or newer and Python 3.9 or newer, then run npm install -g promptfoo and pip install -U deepteam.
  3. 3Confirm authorization and set credentials. Make sure you are allowed to test the target application, then export the endpoint and grader API keys as environment variables.
  4. 4Ask the agent to scaffold the config. Describe the app, its purpose and its limits, and ask for a red-team configuration. The agent will use promptfoo redteam init and write promptfooconfig.yaml.
  5. 5Run the suite and review the report. Run promptfoo redteam run, then promptfoo redteam report to see pass or fail per plugin and the attack success rate.
  6. 6Add the CI/CD gate. Ask the agent for a workflow file that runs promptfoo redteam run with --no-progress-bar on pull requests, using secret-stored API keys, and exports results.json.
  7. 7Track regressions across releases. Keep results.json from each run and compare attack success rates per plugin before each release.

What the skill makes the agent do

An agent skill is a folder of instructions and helper files that an AI agent loads when your request matches the skill's purpose. This one focuses on continuous red teaming: repeatedly attacking an LLM application with adversarial prompts and grading the answers, so security checks run on every change rather than once.

Promptfoo is an open-source LLM evaluation and red-teaming framework. DeepTeam is a complementary open-source framework with a library of ready-made vulnerabilities and attack methods. The skill helps the agent set up both, write the test configuration, explain how the tests map to the OWASP LLM Top 10, OWASP Agentic and MITRE ATLAS presets, and connect the tests to a CI/CD pipeline. It also includes a Python helper script, scripts/agent.py, which scaffolds the config, runs the tests and parses results against a failure threshold.

How to install the skill

You can install the skill in one of three ways. Download the ZIP from the skill's page on this site and unzip it into your personal skills folder at ~/.claude/skills/. Or unzip it into a project's .claude/skills/ folder so that only that project gets the skill. Or, in the Claude apps, open Settings, then Capabilities, then Skills, and upload the ZIP there.

After installing, the folder should contain SKILL.md, scripts/agent.py and the two files in references/ (api-reference.md and standards.md). If the agent does not pick up the skill, check that SKILL.md sits directly inside the skill folder.

  • Personal: ~/.claude/skills/
  • Per project: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Trigger the skill with natural requests

You do not need a special command. Describe what you want in plain language and mention the goal, such as continuous testing in CI/CD, a merge-blocking gate, or comparing versions for compliance. The skill's description covers those cases, so the agent should load it when your request matches them.

Give the agent the details it needs: the app or endpoint you own, what the app is supposed to do, and which CI platform you use. The more specific the purpose, the more relevant the generated attacks will be.

  • Set up a red-team config for our support chatbot at https://api.example.com/chat and run it on every pull request.
  • Create a GitHub Actions workflow that fails the merge if jailbreak or prompt injection tests regress.
  • Compare the security results of our current prompt against the new prompt version for a compliance report mapped to OWASP LLM Top 10.
  • Explain which MITRE ATLAS techniques our red-team suite covers.

What you need before you start

The skill assumes a working technical setup. Promptfoo is installed through npm and needs Node.js 18 or newer. DeepTeam is a Python package and needs Python 3.9 or newer, installed with pip. You also need API credentials for the target LLM endpoint and a grader model, such as an OpenAI key, supplied as environment variables. Finally, you need a CI/CD platform with secret storage, such as GitHub Actions or GitLab CI.

Confirm you are authorized to test the application before running anything. The skill's own warning applies: only test LLM apps and endpoints you own or have explicit permission to test.

  • Node.js 18+ and npm (for Promptfoo)
  • Python 3.9+ and pip (for DeepTeam and scripts/agent.py)
  • Promptfoo and the deepteam Python package
  • API keys for the target endpoint and grader model, set as environment variables
  • A CI/CD platform with secret storage
npm install -g promptfoo\npip install -U deepteam

Create and run the red-team configuration

Start by scaffolding an interactive config. Promptfoo writes promptfooconfig.yaml, which holds the target, the purpose, the plugins (adversarial input generators) and the strategies (delivery techniques such as jailbreak wrappers). The purpose field tells the generator what the app should and should not do, which makes the attacks more targeted.

Then run the suite and open the report. Each row shows the plugin, which maps to OWASP or ATLAS, the strategy, the attack prompt, the model's response and the grader's verdict. The attack success rate per plugin is the main number to track from release to release.

  • Keep numTests and plugin choices in promptfooconfig.yaml so every run uses the same suite.
  • Use the owasp:llm and owasp:agentic presets to cover the OWASP lists.
  • Track the attack success rate per plugin for each release.
promptfoo redteam init\npromptfoo redteam run\npromptfoo redteam report

Add DeepTeam and gate the build in CI/CD

DeepTeam can be used alongside Promptfoo for additional vulnerabilities and attacks, or for bespoke suites written in Python. The skill's example wraps your application in a model callback and passes vulnerabilities and attacks to red_team. A YAML config can also be run with deepteam run.

For the merge gate, the skill's example GitHub Actions workflow runs on pull requests, passes the API key from repository secrets, and runs Promptfoo with --no-progress-bar. Promptfoo returns a non-zero exit code when failures occur, which blocks the merge. The workflow then exports results.json and uploads it as a build artifact, even if the run failed.

  • Store API keys in CI secret storage, never in the repository.
  • Export results.json on every run so you can compare runs over time.
  • Use --filter-failing to re-run only previously failing tests.
promptfoo redteam run --no-progress-bar

Safety notes: scripts and network access

This skill runs scripts and uses the network. scripts/agent.py and the commands above send generated attack prompts to the endpoint you configure, and the grader model is called as well. Those requests go to real services, so point the configuration only at systems you control or are authorized to test, and use test or staging environments where possible.

Review scripts/agent.py before running it, and keep API keys in environment variables or CI secrets. The generated attack payloads may violate third-party terms of service if sent without permission.

  • Read scripts/agent.py before first use.
  • Use staging endpoints and dedicated test API keys.
  • Never commit credentials to the repository.
  • Check the provider's terms before testing any third-party service.

Tips for useful results

A passing run does not prove an app is secure. The tests check for known attack patterns, so treat a clean run as one signal among others. A purpose statement that describes real constraints, such as never revealing system prompts or never leaking personal data, makes the results more meaningful.

Save results.json for each run and compare attack success rates between releases. A rising rate in any OWASP LLM category is a regression to review before shipping. Also run the suite again after prompt edits, model upgrades or changes to retrieval sources and tools, since any of these can bring back a previously fixed weakness.

  • Write a specific purpose statement describing the app's real limits.
  • Compare results per plugin between releases, not just overall pass rates.
  • Re-run after prompt, model, RAG or tool changes.
  • Keep the reports (HTML or PDF from Promptfoo) with release records for compliance review.

What people use it for

  • Blocking a merge when a prompt edit reintroduces a prompt-extraction or PII leak in a customer-support bot.
  • Comparing the security results of two model versions side by side before switching production traffic.
  • Producing per-release reports that map test coverage to OWASP LLM Top 10 and MITRE ATLAS for an internal compliance review.
  • Adding DeepTeam bias and PII leakage checks to a Python test suite that already runs in CI.

Frequently asked questions

How do I install the Continuous LLM Red Teaming agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings, Capabilities, then Skills. Check that SKILL.md sits directly inside the skill folder.

What do I need to run this skill?

You need Node.js 18 or newer with npm for Promptfoo, Python 3.9 or newer with pip for DeepTeam and scripts/agent.py, API keys for the target LLM endpoint and a grader model as environment variables, and a CI/CD platform with secret storage such as GitHub Actions or GitLab CI.

Is this skill free to use?

The skill is licensed under Apache-2.0, as listed on this page. Promptfoo and DeepTeam are described in their docs as open-source, but the LLM API calls they make to your endpoint and grader model are billed by those providers, and this guide does not state their costs.

Is Promptfoo or DeepTeam better for LLM red teaming?

They are complementary rather than direct competitors. Promptfoo covers config-driven red teaming with OWASP and ATLAS presets and a CI exit code, while DeepTeam offers programmatic Python suites with its own vulnerabilities and attack methods. The skill uses both, and you can run either one alone.

Can I use this skill to test someone else's chatbot?

Only with explicit written permission. The skill's guidance says the generated attack payloads may violate terms of service and could be illegal to send to systems you do not control. Use it on apps you own or have authorization to test.

Why does my CI build fail after running this?

Promptfoo returns a non-zero exit code when red-team failures occur, which blocks the merge. Open the report with promptfoo redteam report or the results.json artifact to see which plugin and strategy failed. Check that the API keys are stored as CI secrets and that the endpoint is reachable from the runner.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits engineering and security teams that already run CI/CD and have an LLM app they are authorized to test, and want repeatable checks for jailbreak and injection regressions. It is not suited to non-technical users or to anyone who needs a guarantee of security, since the tests only find known attack patterns. If you need a simple one-off manual check or have no pipeline to hook into, pick a lighter tool instead.

Download the skill