Skip to main content
skill CX Codex

gandalf-llm-pentester — Claude Code skill: how to install

gandalf-llm-pentester automates security testing of prompt defenses across 7 challenge tiers on Lakera Gandalf. Useful when checking how language models resist injection attempts.

no license 252 installs ★ 13 updated 2026-10-09

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a claude-code
Open on GitHub

What gandalf-llm-pentester does

This skill executes red-team routines against Lakera Gandalf challenge endpoints. It runs 64+ test prompts across 7 defense tiers. The prompts escalate quickly. An integrated claude-3-5-sonnet-20241022 instance inspects model output to spot leaked secrets in plain text, NATO phonetics, or Base64 encoding.

The codebase organizes calls around a BaseLLMAPI interface. The GandalfAPI client applies a 0.3-second pause between HTTP requests via requests to respect rate limits. This throttle avoids server blocks. Local runs require Python alongside the anthropic and jupyter packages.

Without an ANTHROPIC_API_KEY set in your environment, validation halts completely. That key is mandatory. Tests execute through notebooks/gandalf_llm_pentester_gm.ipynb or inside a hosted Google Colab workspace.

What it helps with

  • stress-test prompt injection defenses across 7 Gandalf tiers
  • automate execution of 64+ red-team prompt variations
  • verify secret leakage concealed in Base64 or NATO phonetic strings
  • generate vulnerability assessments verified by Claude API

Example prompts for the agent

  • Run gandalf pentester attacks against level 1 defenses
  • Assess LLM defense mechanisms using gandalf-llm-pentester
  • Validate prompt injection defenses across all Gandalf stages

How to install gandalf-llm-pentester

1Skills CLI (Vercel)

npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a claude-code

2Manually: put the files in place

~/.claude/skills/gandalf-llm-pentester/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gandalf-llm-pentester/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gandalf-llm-pentester

How do I install gandalf-llm-pentester in Claude Code?

Install the skill by running npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a claude-code. The file is saved at ~/.claude/skills/gandalf-llm-pentester/SKILL.md.

What does gandalf-llm-pentester do?

It fires automated red-team prompts at the Lakera Gandalf benchmark to evaluate prompt injection resilience. Responses are parsed by Claude to confirm whether protected passwords leaked.

What credentials and tools are needed to run it?

You need Python with the anthropic, requests, and jupyter libraries. An active ANTHROPIC_API_KEY is required for Claude to analyze test responses.

Similar skills

All skills for Security →

From the same set129

The whole set →
claude-pentest-framework claude-pentest-framework — a Claude skill that runs a structured pentest with 15 executor agents and 63 attack categories, asking the operator for approval before anything is exploited. CX Codex +1 261installs pentester-mcp-security-tools pentester-mcp-security-tools connects over 200 penetration testing tools to AI coding agents via MCP. Useful for automated port scanning and directory fuzzing from chat. CX Codex +1 261installs drm-pentesting-toolkit The drm-pentesting-toolkit skill guides agents through a plugin-based DRM testing toolkit for device files, MPD manifests, and license-server requests. Use it for authorized testing. CX Codex +1 261installs skill-security-scanner skill-security-scanner audits Claude skills for command injection, unauthorized network calls, and sensitive file access before you install them. CX Codex +1 253installs awesome-pentest-tools-catalog awesome-pentest-tools-catalog is a Claude Code skill for finding penetration testing and red team tools by workflow stage and MITRE ATT&CK. CX Codex +1 251installs dalonso-security-repo dalonso-security-repo brings Microsoft Security hunting material into your agent: KQL queries, Sentinel workbooks and Jupyter notebooks for incident work. CX Codex +1 251installs awesome-ai-security-reference The awesome-ai-security-reference skill points to learning resources and tools for AI security, from prompt injection to privacy attacks. Use it to explore a topic or find ways to test a model. CX Codex +1 248installs h-pentest-ai-platform h-pentest-ai-platform — a skill that walks an agent through standing up H-Pentest: five LLM roles plan the test, suggest payloads, scan with Nuclei and write up what they find. CX Codex +1 248installs

Project sponsors

Companies that keep this analytics open