Skip to main content
RAPTOR integrates seamlessly with Claude Code, providing an interactive conversational interface for security testing. Use slash commands to trigger analyses and invoke expert personas for specialized guidance.

Available Slash Commands

RAPTOR provides six core slash commands for security testing:

/scan

Static code analysis with Semgrep and CodeQL

/fuzz

Binary fuzzing with AFL++ and crash analysis

/web

Web application security testing (OWASP Top 10)

/agentic

Full autonomous workflow - most comprehensive

/codeql

CodeQL-only deep dataflow analysis

/analyze

LLM analysis of existing SARIF files

Security Testing Commands

/scan - Static Analysis

Runs Semgrep for fast, focused scanning:
Claude executes raptor.py scan and presents findings prioritized by exploitability.

/agentic - Full Autonomous Workflow

The most comprehensive option - runs Semgrep, CodeQL, LLM analysis, exploit generation, and patch creation:
This triggers the complete security testing pipeline with adversarial thinking prioritization.

/codeql - Deep Analysis

CodeQL-only analysis for complex dataflow vulnerabilities:
Slower but finds complex issues that pattern-based tools miss.

/fuzz - Binary Fuzzing

Fuzz testing with AFL++ for binary targets:
Automatically analyzes crashes and generates exploits.

/web - Web Security

OWASP Top 10 testing for web applications:
The /web command is currently in alpha. It’s a stub implementation and should not be relied upon for production testing.

/analyze - LLM Analysis

Analyze existing SARIF files from previous scans or external tools:
Skips scanning and focuses on LLM-powered vulnerability analysis.

Skill Management

/create-skill - Save Custom Approaches

Save successful custom approaches for reuse:
Skills are currently in alpha. Definition creation works, but auto-loading and execution integration are not yet implemented.

Interactive Workflow

RAPTOR’s Claude Code integration follows a conversational, decision-driven workflow:

Typical Session Flow

Progressive Context Loading

RAPTOR uses progressive loading to minimize token usage:
1

Session Start: 360 tokens

Loads CLAUDE.md with core instructions and command definitions
2

After Scan: 925 tokens

Loads analysis-guidance.md for adversarial prioritization
3

With Persona: up to 1,625 tokens

Loads expert persona (300-700 tokens) only when invoked
This ensures minimal memory overhead while providing expert guidance on-demand.

Expert Personas

RAPTOR includes nine expert personas that load on-demand (0 tokens until invoked):

How to Use Personas

Invoke personas explicitly when you need specialized expertise:
Personas are NOT auto-loaded. They only consume tokens when you explicitly request them.

Exploit Developer Persona

Generates working, compilable exploit code (no placeholders or TODOs):
User: Use patch engineer persona to fix the SQLi in login.php Claude: [Loads patch_engineer.md - 400 tokens] Creating secure patch for login.php:42…
Test recommendations:
  • Test with normal credentials
  • Test with SQL injection payloads
  • Verify no regression in login flow
“Use security researcher persona to validate finding #12” “Is this actually exploitable or a false positive?” “Security researcher: analyze this sanitizer bypass”
User: AFL++ found a crash with SIGSEGV at 0x4141414141. Use crash analyst persona to assess exploitability. Claude: [Loads crash_analyst.md - 700 tokens] CRASH ANALYSIS Signal: SIGSEGV (11) Address: 0x4141414141 (‘AAAA’) ASSESSMENT:
  1. Crash Type: Buffer overflow - controlled write
  2. Register State:
    • RIP: 0x4141414141 ✓ Fully controlled
    • RSP: Valid stack range
    • RAX: Contains user data
  3. Exploit Primitives:
    • Arbitrary code execution: YES
    • Controlled jump: YES
  4. Mitigations:
    • ASLR: Enabled (need info leak)
    • DEP: Enabled (need ROP chain)
    • Stack canary: Not present
EXPLOITABILITY: HIGH (Moderate complexity) Strategy: ROP chain + info leak for ASLR bypass
Priority = (Impact × Exploitability) / Detection Time
out/scan_REPO_TIMESTAMP/ ├── semgrep_.sarif # Semgrep findings ├── codeql_.sarif # CodeQL findings (if enabled) ├── scan_metrics.json # Statistics ├── autonomous_analysis_report.json # LLM analysis ├── exploits/ # Generated PoC code │ ├── exploit_001.py │ └── exploit_002.c └── patches/ # Secure fixes ├── patch_001.diff └── patch_002.diff
“Use exploit developer persona to create working exploit for finding #X”
“Use patch engineer persona to create production-ready patch”
User: Why didn’t the scan find anything? Claude: Let me check:
  • Git status: [checks if .git exists]
  • Languages detected: [checks file types]
  • Policy groups: [reviews configuration]
Ensure you have sufficient API credits before running autonomous analysis on large codebases.

Best Practices

Start with /agentic

Use the comprehensive workflow for full coverage

Invoke personas explicitly

Only load expert personas when you need specialized analysis

Review patches before applying

Always inspect generated patches for correctness

Verify fixes with re-scan

Run /scan again after applying patches to confirm fixes

Progressive Workflow

  1. Initial Scan: Start with /agentic for comprehensive coverage
  2. Review Findings: Analyze prioritized results with adversarial thinking
  3. Deep Analysis: Use personas for specialized expertise
  4. Generate Fixes: Create patches with Patch Engineer persona
  5. Apply & Verify: Apply patches and re-scan to confirm
  6. Report: Generate final report with findings and remediations

Token Budget Management

  • Baseline (360t): Session start with CLAUDE.md
  • Analysis (+565t): Load analysis-guidance.md after scan
  • Persona (+300-700t): Only when explicitly requested
  • Recovery (+200-400t): Error recovery guidance if needed
Keep total context under 2,000 tokens for optimal performance by only loading personas when necessary.

Real-World Examples

Example 1: Finding and Fixing SQLi

Example 2: Binary Fuzzing

Example 3: Custom Skill Creation

Next Steps

Python CLI

Learn direct command-line usage for scripting and CI/CD

Extending RAPTOR

Add custom security scanners and capabilities

Creating Personas

Develop custom expert personas for your use cases

Configuration

Configure RAPTOR for your environment