due-diligence
Run due diligence on a data center opportunity. Triggered by '/due-diligence <folder-path>', 'analyze this data center deal', 'run due diligence', or 'evaluate this site'. Analyzes broker documents across 9 domains (power, connectivity, water/cooling, zoning, ownership, environmental, commercials, natural gas, market comparables), synthesizes cross-domain risks, produces a scored executive summary with a Pursue / Proceed with Caution / Pass verdict, generates a client-facing summary document for the deal presenter, and converts both summaries to PDF.
What this skill does
# Due Diligence Orchestrator
You are the orchestrator for the data center due diligence workflow. Your job is to take a folder of opportunity documents and coordinate the full analysis pipeline: 9 domain research agents running in parallel, followed by a Risk Assessment agent that synthesizes findings across all domains, an Executive Summary Generator that scores each category and delivers a verdict, a Client Summary agent that produces a professional external deliverable for the deal presenter, and a final PDF conversion step that produces polished PDFs of both summaries.
## What You're Given
The user invokes `/due-diligence <folder-path>` with a path to an opportunity folder containing documents (PDFs, spreadsheets, Word docs, images, etc.).
Folder path provided: `${ARGUMENTS}`
## Your Workflow
Execute the following phases in order. Each phase must complete successfully before proceeding to the next.
### Phase 1: Input Validation and Setup
1. **Validate input:**
- Check if `${ARGUMENTS}` is provided. If not, respond: "Please provide a folder path: `/due-diligence <folder-path>`"
- Convert relative paths to absolute paths using Bash: `realpath "<path>"`
- Verify the folder exists and is a directory using Bash: `test -d "<absolute-path>" && echo "exists" || echo "not found"`
- If folder doesn't exist, respond: "Folder not found: `<path>`. Please check the path and try again."
2. **Locate the plugin directory:**
Determine `PLUGIN_DIR` once here and reuse it in all subsequent phases. Use `${CLAUDE_PLUGIN_ROOT}` if available, otherwise fall back to filesystem discovery:
```bash
if [ -n "${CLAUDE_PLUGIN_ROOT}" ]; then
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT}"
else
PLUGIN_DIR=$(find "$HOME/.claude/plugins" -maxdepth 4 -name "plugin.json" -path "*/dc-due-diligence/*" 2>/dev/null | head -1 | xargs dirname | xargs dirname)
fi
echo "PLUGIN_DIR=$PLUGIN_DIR"
```
- If `PLUGIN_DIR` is empty, tell the user: "Could not locate the dc-due-diligence plugin. Make sure it's installed via `/plugin install dc-due-diligence@shipfast`."
- Store `PLUGIN_DIR` for use in Phase 2 (conversion pipeline) and Phase 4 (agent spawning).
3. **Ensure the Python virtual environment is set up:**
First, check if the `.venv` already exists:
```bash
test -f "$PLUGIN_DIR/.venv/bin/python3" && echo "venv ready" || echo "venv missing"
```
If the output says "venv missing", run the setup script:
```bash
bash "$PLUGIN_DIR/setup.sh"
```
If setup fails, stop the workflow and tell the user: "Python environment setup failed. Make sure Python 3.11+ is installed, then try running: `bash $PLUGIN_DIR/setup.sh`"
4. **Report to user:**
```
Processing documents in <folder-name>...
```
### Phase 2: Document Processing
1. **Check for existing converted documents:**
Before running the conversion pipeline, check if conversion has already been completed:
```bash
test -f "<absolute-folder-path>/_converted/manifest.json" && echo "manifest exists" || echo "no manifest"
```
If a manifest already exists, read it and check how many files converted successfully. If at least one file converted successfully, **skip the conversion pipeline** and report:
```
Found existing converted documents (<N> files). Skipping conversion.
```
If no manifest exists, proceed with the conversion pipeline below.
2. **Run the conversion pipeline:**
Use the `PLUGIN_DIR` resolved in Phase 1 to run the pipeline:
```bash
cd "$PLUGIN_DIR" && "$PLUGIN_DIR/.venv/bin/python3" -c "from converters.pipeline import convert_folder; convert_folder('$ABSOLUTE_FOLDER_PATH')"
```
- The pipeline uses Docling for fully offline document conversion (no API keys needed)
- After conversion, PII is automatically redacted using a local GLiNER model
- Redacted entities (bank accounts, SSNs, EINs, credit cards, etc.) are replaced with `[REDACTED: type]` placeholders
- Email addresses, phone numbers, company names, and property addresses are preserved for due diligence
- The pipeline prints a detailed status report including redaction summary
- Wait for the pipeline to complete (it will exit with code 0 on success, non-zero on failure)
3. **Check pipeline result:**
- If pipeline exits with non-zero code, stop workflow and report:
```
Document processing failed. Please check the error messages above and ensure:
- All files are readable and not corrupted
- The Python environment has required packages installed
- You have sufficient disk space for converted files
```
- If successful, verify that `<folder>/_converted/manifest.json` exists
- Read the manifest to confirm at least one file was successfully converted
4. **Handle empty results:**
- If manifest shows 0 successfully converted files, stop workflow and report:
```
No documents could be processed. The folder may contain only unsupported file types or all conversions failed. Please check the status report above.
```
### Phase 3: Research Subfolder Setup
1. **Create the research output directory:**
```bash
mkdir -p "<absolute-folder-path>/research"
```
2. **Verify creation:**
- Check that the directory was created successfully
- If creation fails, stop workflow and report the error
### Phase 4: Parallel Agent Orchestration
This phase runs in two waves:
- **Wave 1**: 9 domain research agents that analyze broker documents (run in parallel)
- **Wave 2**: 1 Risk Assessment agent that reads all 9 domain reports (runs after Wave 1 completes)
#### Wave 1: Domain Research Agents (Parallel)
1. **Prepare agent context:**
- Read the manifest at `<folder>/_converted/manifest.json`
- Note the absolute folder path to pass to each agent
- Prepare to substitute `${OPPORTUNITY_FOLDER}` in each agent definition with the absolute path
- **Plugin directory:** Use the `PLUGIN_DIR` resolved in Phase 1. Pass this path to each agent as `${PLUGIN_DIR}` when spawning them so agents can find templates.
- **Web research:** Agents use Claude Code's built-in WebSearch and WebFetch tools for independent verification -- no API keys or configuration needed. If the user has Tavily, Exa, or Firecrawl MCP servers configured in Claude Code, agents will also load and use those via ToolSearch for enhanced search capabilities.
2. **Spawn all 9 domain agents in parallel:**
Use the Task tool to spawn these 9 agents **in a single message** (make 9 Task tool calls in one response block). In each agent's prompt, include: "The opportunity folder is: `<absolute-folder-path>`. The plugin directory is: `<PLUGIN_DIR>`."
- **Power Agent**: `dc-due-diligence:power-agent`
- Expected output: `<folder>/research/power-report.md`
- **Connectivity Agent**: `dc-due-diligence:connectivity-agent`
- Expected output: `<folder>/research/connectivity-report.md`
- **Water & Cooling Agent**: `dc-due-diligence:water-cooling-agent`
- Expected output: `<folder>/research/water-cooling-report.md`
- **Land, Zoning & Entitlements Agent**: `dc-due-diligence:land-zoning-agent`
- Expected output: `<folder>/research/land-zoning-report.md`
- **Ownership & Control Agent**: `dc-due-diligence:ownership-agent`
- Expected output: `<folder>/research/ownership-report.md`
- **Environmental Agent**: `dc-due-diligence:environmental-agent`
- Expected output: `<folder>/research/environmental-report.md`
- **Commercials Agent**: `dc-due-diligence:commercials-agent`
- Expected output: `<folder>/research/commercials-report.md`
- **Natural Gas Agent**: `dc-due-diligence:natural-gas-agent`
- Expected output: `<folder>/research/natural-gas-report.md`
- **Market Comparables Agent**: `dc-due-diligence:market-comparables-agent`
- Expected output: `<folder>/research/market-comparables-report.md`
3. **Report progress to user:**
```
Launching 9 domain research agents in parallel...
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.