/claude-security-skills:prompt-injection-testerfrom claude-security-skills
Red-teams LLM applications against prompt injection and jailbreaks using a curated payload library and canary-based detection, producing a resilience score.
Ships in claude-security-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A defensive red-team harness for evaluating the prompt-injection resistance of LLM applications you own or are authorized to test. It ships a library of well-documented public attack techniques and a canary-based detection engine that decides whether each attack succeeded — then scores overall resilience.
⚠️ Use only against systems you own or have permission to test. The payloads are public hardening techniques, intended to strengthen guardrails.
instruction-override · system-prompt-leak · role-play (DAN-style) ·
delimiter-escape · encoding (base64/leetspeak) · data-exfiltration
(indirect injection) · refusal-suppression.
List the payload library (no model calls):
python skills/prompt-injection-tester/attacker.py --list
python skills/prompt-injection-tester/attacker.py --list --category role-play
See the harness detect a weak vs. a hardened model:
python skills/prompt-injection-tester/attacker.py --demo # weak model
python skills/prompt-injection-tester/attacker.py --demo --hardened # safe model
python skills/prompt-injection-tester/attacker.py --demo --json
Exit codes: 0 clean (no payload succeeded, or --list) · 1 at least one
payload succeeded · 2 usage error.
Wrap the user's backend in a model(system_prompt, user_prompt) -> str
callable and run the suite. Example skeleton the user can adapt:
import sys
sys.path.insert(0, "skills/prompt-injection-tester")
import attacker
def model(system_prompt, user_prompt):
# call the user's real API/app here and return the text response
return my_llm_app(system=system_prompt, user=user_prompt)
results = attacker.run_suite(model)
print(attacker.summarize(results))
Then:
failed_payload.If you already captured a model response, score it without any network call:
import attacker
payload = attacker.PAYLOADS[0]
verdict = attacker.score_response(payload, response_text, canary="CANARY-abc")
print(verdict.vulnerable, verdict.reason)
Marker/canary detection is a heuristic: a refusal-shaped response that still
complies, or a creative leak, may need human review (score_response flags
ambiguous cases as "review manually"). Treat the score as a guardrail signal,
not a guarantee.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub novacode37/claude-security-skills --plugin claude-security-skills8 skills in this plugin
/cors-auditorAudit a site's Cross-Origin Resource Sharing (CORS) configuration for misconfigurations — wildcard origin with credentials, reflected arbitrary Origin, the 'null' origin, overly broad allowed methods, and risky credentialed CORS. Use when the user asks to "check my CORS config", "is my API's CORS safe", "test for CORS misconfiguration", or "why can any site call my API"./dependency-checkAudit project dependencies for known-vulnerable versions and risky pinning. Parses requirements.txt and package.json, matches a bundled offline advisory DB, optionally queries OSV.dev live, and warns about unpinned versions. Use when the user asks to "check dependencies for vulnerabilities", "audit my requirements.txt / package.json", "scan for vulnerable packages", or "is my dependency tree secure"./dockerfile-scanScan a Dockerfile for insecure build patterns — running as root, unpinned or :latest base images, ADD from remote URLs, piping curl/wget into a shell, hardcoded secrets in ENV/ARG, world-writable chmod 777, and sudo usage. Use when the user asks to "review my Dockerfile", "is this container image secure", "lint my Dockerfile for security", or "why does my image run as root"./http-sec-auditAudit a website's HTTP security headers and cookie flags — CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP/COEP, version-leaking banners, and Secure/HttpOnly/SameSite cookies. Use when the user asks to "check my site's security headers", "audit HTTP headers", "is my CSP/HSTS configured right", or "scan a URL for header misconfigs"./jwt-inspectorDecode and security-audit a JSON Web Token — flag alg=none, missing/excessive expiry, symmetric-alg confusion risk, missing claims — and attempt an offline HMAC secret crack against a wordlist to detect weak signing keys. Use when the user asks to "decode this JWT", "is this token secure?", "audit a JWT", or "check if this token uses a weak secret"./sast-liteStatic security analysis for Python source via AST walking — finds command injection, insecure deserialization, eval/exec, weak crypto, SQL injection, disabled TLS verification, hardcoded secrets and more, each tagged with a CWE. Use when the user asks to "audit this code for vulnerabilities", "run a SAST scan", "security review this Python file", or before merging untrusted code.Other plugins' skills for the same job