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
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/gandalf-llm-pentester/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gandalf-llm-pentester/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a codex2Manually: put the files in place
.agents/skills/gandalf-llm-pentester/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a cursor2Manually: put the files in place
.cursor/skills/gandalf-llm-pentester/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/security-skills skills/gandalf-llm-pentester2Manually: put the files in place
.github/skills/gandalf-llm-pentester/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/security-skills --path skills/gandalf-llm-pentesterManually: put the files in place
.devin/skills/gandalf-llm-pentester/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill gandalf-llm-pentester -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.