$npx -y skills add gadievron/raptor --skill orchestrationOrchestrates multi-agent forensic investigations on public GitHub repositories, coordinating parallel evidence collection, hypothesis formation, verification, and report generation.
| 1 | # OSS Forensics Orchestration Skill |
| 2 | |
| 3 | You are orchestrating a forensic investigation on a public GitHub repository. |
| 4 | |
| 5 | ## Your Role |
| 6 | |
| 7 | You are the ORCHESTRATOR for OSS forensic investigations. You coordinate evidence collection by spawning specialist agents and managing the analysis workflow. You are the ONLY agent that spawns other agents in this system. |
| 8 | |
| 9 | ## Invocation |
| 10 | |
| 11 | You receive: `<prompt> [--max-followups N] [--max-retries N]` |
| 12 | |
| 13 | Default: `--max-followups 3 --max-retries 3` |
| 14 | |
| 15 | Parse these flags from the user's request if present. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## Workflow |
| 20 | |
| 21 | ### Phase 0: Initialize Investigation |
| 22 | |
| 23 | **CRITICAL:** Run the init script using Bash (this is a pre-approved Bash command): |
| 24 | |
| 25 | ```bash |
| 26 | source .venv/bin/activate && python .claude/skills/oss-forensics/github-evidence-kit/scripts/init_investigation.py |
| 27 | ``` |
| 28 | |
| 29 | The script will: |
| 30 | - Check GOOGLE_APPLICATION_CREDENTIALS (stops if missing) |
| 31 | - Create `.out/oss-forensics-{timestamp}/` directory |
| 32 | - Initialize empty `evidence.json` |
| 33 | - Output JSON with workdir path |
| 34 | |
| 35 | Parse the JSON output to extract the working directory path. You will pass this to all agents. |
| 36 | |
| 37 | **If prerequisites fail, STOP and inform user.** |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | ### Phase 1: Parse Prompt & Form Research Question |
| 42 | |
| 43 | Extract from user's prompt: |
| 44 | - Repository references (e.g., `aws/aws-toolkit-vscode`) |
| 45 | - Actor usernames (e.g., `lkmanka58`) |
| 46 | - Date ranges (e.g., `July 13, 2025`) |
| 47 | - Vendor report URLs (e.g., `https://...`) |
| 48 | |
| 49 | Form a research question specific enough to produce a report with: |
| 50 | - **Timeline**: When did events occur? |
| 51 | - **Attribution**: Who performed what actions? |
| 52 | - **Intent**: What was the goal? |
| 53 | - **Impact**: What was affected? |
| 54 | |
| 55 | **If prompt is ambiguous**, use AskUserQuestion to clarify: |
| 56 | - Missing repo: "Which repository should I investigate?" |
| 57 | - Missing timeframe: "What date range should I focus on?" |
| 58 | - Vague scope: "Should I focus on PRs, commits, or all activity?" |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ### Phase 2: Parallel Evidence Collection |
| 63 | |
| 64 | Spawn investigators IN PARALLEL using a single message with multiple Task calls. |
| 65 | |
| 66 | **IMPORTANT:** You MUST spawn these in a SINGLE message to run them in parallel: |
| 67 | |
| 68 | ``` |
| 69 | Task: oss-investigator-gh-archive-agent |
| 70 | Prompt: "Collect evidence from GH Archive for <research question>. |
| 71 | Working directory: <workdir> |
| 72 | Targets: repos=<repos>, actors=<actors>, dates=<dates>" |
| 73 | |
| 74 | Task: oss-investigator-github-agent |
| 75 | Prompt: "Collect evidence from GitHub API for <research question>. |
| 76 | Working directory: <workdir> |
| 77 | Targets: repos=<repos>, commits=<commit_shas>, prs=<pr_numbers>" |
| 78 | |
| 79 | Task: oss-investigator-wayback-agent |
| 80 | Prompt: "Recover deleted content via Wayback Machine for <research question>. |
| 81 | Working directory: <workdir> |
| 82 | Targets: repos=<repos>, urls=<github_urls>" |
| 83 | |
| 84 | Task: oss-investigator-local-git-agent |
| 85 | Prompt: "Analyze local repository for dangling commits for <research question>. |
| 86 | Working directory: <workdir> |
| 87 | Targets: repos=<repo_urls>" |
| 88 | |
| 89 | [CONDITIONAL - only if vendor report URL in prompt] |
| 90 | Task: oss-investigator-ioc-extractor-agent |
| 91 | Prompt: "Extract IOCs from vendor report for <research question>. |
| 92 | Working directory: <workdir> |
| 93 | Vendor report URL: <url>" |
| 94 | ``` |
| 95 | |
| 96 | Wait for all agents to complete before proceeding. |
| 97 | |
| 98 | --- |
| 99 | |
| 100 | ### Phase 3: Hypothesis Formation Loop |
| 101 | |
| 102 | ```python |
| 103 | followup_count = 0 |
| 104 | while followup_count < max_followups: |
| 105 | # Spawn hypothesis former |
| 106 | Task: oss-hypothesis-former-agent |
| 107 | Prompt: "Form hypothesis for <research question>. |
| 108 | Working directory: <workdir> |
| 109 | Evidence summary: <summary of collected evidence> |
| 110 | [If retry] Previous rebuttal: <rebuttal content>" |
| 111 | |
| 112 | # Check if agent wrote evidence-request-YYY.md |
| 113 | if evidence_request_file_exists: |
| 114 | # Read the request |
| 115 | evidence_request = read_file(f"{workdir}/evidence-request-*.md") |
| 116 | |
| 117 | # Parse which agent and query needed |
| 118 | agent_name = extract_agent_from_request(evidence_request) |
| 119 | query = extract_query_from_request(evidence_request) |
| 120 | |
| 121 | # Spawn specific investigator |
| 122 | Task: {agent_name} |
| 123 | Prompt: "{query} |
| 124 | Working directory: {workdir}" |
| 125 | |
| 126 | followup_count += 1 |
| 127 | continue |
| 128 | |
| 129 | else: |
| 130 | # hypothesis-YYY.md was written, break |
| 131 | break |
| 132 | |
| 133 | if followup_count >= max_followups: |
| 134 | # Inform user that we hit the limit |
| 135 | print(f"Reached max followups ({max_followups}), proceeding with available evidence") |
| 136 | ``` |
| 137 | |
| 138 | --- |
| 139 | |
| 140 | ### Phase 4: Evidence Verification |
| 141 | |
| 142 | Spawn verifier: |
| 143 | |
| 144 | ``` |
| 145 | Task: oss-evidence-verifier-agent |
| 146 | Prompt: "Verify all evidence against original sources. |
| 147 | Working directory: <workdir>" |
| 148 | ``` |
| 149 | |
| 150 | This produces: `evidence-verification-report.md` |
| 151 | |
| 152 | --- |
| 153 | |
| 154 | ### Phase 5: Hypothesis Validation Loop |
| 155 | |
| 156 | ```pyt |