PyRIT
Skill9 starsChanged 8 months agoMITView on GitHub
AI red-teaming framework for testing LLMs and generative AI systems for jailbreaks, prompt injection, harmful content, data leakage, and multi-turn attacks. USE WHEN user mentions AI red team, LLM jailbreak, prompt injection test, AI risk assessment, AI security testing, GenAI red teaming, NIST AI RMF MEASURE, ISO 42001 testing evidence, or wants to stress-test an AI system. Wraps Microsoft's open-source PyRIT (Python Risk Identification Tool) v0.13+.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- amutaal122/ai-engineer-mastertheir own version, first seen Nov 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- amutaal122/ai-engineer-master★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository140 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- alex-hormozi-pitchSkill
- AlgorithmSkill
- AnnualReportsSkill
- ArtGeneratorSkill
- artSkill
- autoplanSkill
- autoresearchSkill
- benchmarkSkill
- brainstormingSkill
- brand-guidelinesSkill
- brightdataSkill
- browseSkill
- BugHunterSkill
- CallIntelligenceSkill
- canarySkill
- canvasSkill
- carefulSkill
- ceo-advisorSkill
- cfo-advisorSkill
- cmmcSkill
- codebase-indexerSkill
- codexSkill
- CodingAgentSkill
- company-valuesSkill
- connect-chromeSkill
- CORESkill
- system-createcliSkill
- CreateskillSkill
- csoSkill
- cto-advisorSkill
- CybersecurityPlaybooksSkill
- defuddleSkill
- design-consultationSkill
- design-reviewSkill
- DevTeamSkill
- DiscordAdminSkill
- document-releaseSkill
- document-writerSkill
- doraSkill
- dpdpaSkill
- EmailManagerSkill
- executing-plansSkill
- fabricSkill
- fedrampSkill
- ffuf-web-fuzzingSkill
- find-communitySkill
- first-customersSkill
- FirstPrinciplesSkill
- form-croSkill
- freezeSkill
- gdpr-complianceSkill
- git-worktreesSkill
- GovernanceSkill
- grow-sustainablySkill
- gstack-upgradeSkill
- guardSkill
- hipaa-complianceSkill
- investigateSkill
- iso27001Skill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
All commands run inside the skill's venv via the wrapper script.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PyRIT — AI Red-Teaming Framework
Microsoft AI Red Team's open-source framework for proactively identifying risks in generative AI systems. Used here for offensive AI engagements (Ehud) and AI governance testing evidence (Daniel CCO — NIST AI RMF MEASURE function, ISO 42001 testing requirements).
Authorized Use Only
PyRIT is for testing AI systems you own or have explicit written permission to test. Engagement scope MUST be defined before running any attack orchestrator. Generated harmful content stays inside the engagement memory store and is purged after report delivery.
Capabilities
- Single-turn attacks — direct prompts, converters (Base64, ROT13, leetspeak, translation, role-play wrappers, etc.)
- Multi-turn attacks — Crescendo, TAP (Tree of Attacks with Pruning), Skeleton Key, custom orchestrators
- Targets — Anthropic Claude, OpenAI, Azure OpenAI, Google, HuggingFace, Ollama (local), custom HTTP/WebSocket endpoints, Playwright-driven web apps
- Scorers — true/false, Likert, classification, Azure AI Content Safety, custom LLM-as-judge
- Datasets — content harms, psychosocial risks, data leakage, prompt injection corpora
- Memory — SQLite (default) for engagement audit trail; Azure SQL optional
- CLI —
pyrit_scan(automated),pyrit_shell(interactive)
Workflow Routing
| Action | Trigger | Behavior |
| Quick Scan | "AI red team scan", "test this LLM" | Run pyrit_scan with default scenarios against target |
| Jailbreak Test | "jailbreak test", "test guardrails" | Crescendo or Skeleton Key orchestrator |
| Prompt Injection | "prompt injection test", "test for injection" | Single-turn injection corpus + scorer |
| Multi-turn TAP | "tree of attacks", "TAP attack", "deep red team" | TAP orchestrator with adversarial LLM |
| Custom Engagement | "custom AI red team", "build PyRIT scenario" | Drop into Python with tools/run-pyrit.sh |
| Governance Evidence | "AI risk assessment", "NIST AI RMF MEASURE", "ISO 42001 testing" | Run scoped scan, output to Obsidian for audit binder |
Quick Usage
All commands run inside the skill's venv via the wrapper script.
# Activate venv shell for interactive PyRIT work
~/.claude/skills/PyRIT/tools/run-pyrit.sh shell
# Run automated scan against a target (config file or env-defined)
~/.claude/skills/PyRIT/tools/run-pyrit.sh scan --config /path/to/scan.yaml
# Drop into Python REPL with PyRIT loaded
~/.claude/skills/PyRIT/tools/run-pyrit.sh python
# List installed PyRIT version
~/.claude/skills/PyRIT/tools/run-pyrit.sh versionExamples
Example 1: Jailbreak test against Claude (authorized self-test)
User: "Run a Crescendo jailbreak test against my Claude deployment"
→ Define target (Anthropic API endpoint + ANTHROPIC_API_KEY)
→ Load Crescendo orchestrator with content-harm scorer
→ Execute multi-turn campaign
→ Export results + scored conversations to Obsidian engagement folderExample 2: Prompt injection corpus run
User: "Test our customer-support chatbot for prompt injection"
→ Define target as custom HTTP endpoint with auth
→ Load prompt-injection dataset
→ Single-turn attack with classification scorer
→ Report: pass/fail rate per injection class, raw conversations for triageExample 3: AI governance evidence (Daniel CCO)
User: "I need NIST AI RMF MEASURE testing evidence for our LLM feature"
→ Daniel scopes: which AI system, which risks, which thresholds
→ Run targeted PyRIT scan (jailbreak + injection + harm scorers)
→ Export structured report: scenarios run, pass rates, sample failures, dates
→ File into Obsidian audit binder under CarbeneAI/Compliance/AI-Testing-Evidence/Engagement Hygiene
- Scope written first — target system, attack types in scope, attack types out of scope, data handling, report recipient
- Memory isolated per engagement — set
PYRIT_DB_PATHto engagement-specific SQLite file - Credentials via env, not files — never commit API keys; use
~/.envor engagement-scoped envs - Output to Obsidian — engagement reports filed under
CarbeneAI/Engagements/<client>/<date>/PyRIT/ - Purge raw harmful outputs post-delivery per scope agreement (keep scored summaries only)
CLI Reference (key flags)
pyrit_scan --help # All scan options
pyrit_scan --config <yaml> # YAML-defined scan (target + orchestrator + scorer)
pyrit_scan --output <dir> # Where to write report artifacts
pyrit_shell # Interactive REPL with PyRIT preloadedFull PyRIT reference: https://microsoft.github.io/PyRIT/
Requirements
- Python 3.10–3.13 (this skill ships its own venv via uv at
venv/using Python 3.13) - API keys in
~/.envfor any cloud target (ANTHROPIC_API_KEY,OPENAI_API_KEY,AZURE_OPENAI_KEY, etc.) - Optional: Ollama running locally for offline target testing
- Optional: Azure AI Content Safety key for production-grade harm scoring
Update
cd ~/.claude/skills/PyRIT && source venv/bin/activate && uv pip install --upgrade pyritLicense
PyRIT is MIT-licensed (Microsoft). This skill wraps the upstream package without modification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

