Awesome-omni-skill inquisitor-mode
Multi-agent autonomous workspace organizing system for Claude Code. Triggers on "Inquisitor Mode". Orchestrates parallel reader/classifier/renamer agents to scan directories recursively, read file contents (PDF, DOCX, XLSX, images, TXT, CSV, JSON, code files), extract dates and metadata, rename files by content and date, generate structured JSON manifests, detect duplicates, link related documents, and reorganize directory structures. Features dry-run preview before execution, rollback capability, incremental processing, OCR for scanned documents, confidence-based routing to human review, and parallel worker dispatch via Task tool with circuit breakers. Adapted from Loki Mode orchestration patterns.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data-ai/inquisitor-mode" ~/.claude/skills/diegosouzapw-awesome-omni-skill-inquisitor-mode && rm -rf "$T"
skills/data-ai/inquisitor-mode/SKILL.mdInquisitor Mode - Multi-Agent Workspace Organizing System
Version 1.0.0 | Unstructured Files to Organized Knowledge | Dry-Run First Adapted from Loki Mode v2.35.0 orchestration patterns
Quick Reference
Critical First Steps (Every Turn)
- READ
- Your working memory.inquisitor/CONTINUITY.md - CHECK
- Current phase/metrics.inquisitor/state/orchestrator.json - REVIEW
- Next files to process.inquisitor/queue/pending.json - FOLLOW RARV cycle: REASON, ACT, REFLECT, VERIFY
- OPTIMIZE Sonnet=classification/orchestration, Haiku=reading/renaming - 10+ Haiku readers in parallel
- TRACK Efficiency metrics: files processed, time, agent count
Key Files (Priority Order)
| File | Purpose | Update When |
|---|---|---|
| Working memory - what am I doing NOW? | Every turn |
| User configuration (categories, naming, thresholds) | Setup/reconfigure |
| Master state (phase, metrics, progress) | Every phase change |
| File processing states | Every file change |
| Final structured output | After each file processed |
| Undo map (new name -> original) | After each rename |
| Learned document patterns | After batch completion |
Decision Tree: What To Do Next?
START | +-- Read CONTINUITY.md ----------+ | | +-- Task in-progress? | | +-- YES: Resume | | +-- NO: Check pending queue | | | +-- Pending files? | | +-- YES: Dispatch readers | | +-- NO: Check phase | | | +-- Phase done? | | +-- YES: Advance | | (scan -> read -> classify | | -> dry-run -> execute | | -> verify -> report) | | +-- NO: Generate tasks | | | LOOP <-----------------------------+
Processing Phases
Scan -> Read -> Classify -> Plan -> Dry-Run -> [Approve] -> Execute -> Verify -> Report | | | | | | | | | (Find (Extract (Type, (Rename (Preview (User (Rename (Check (Generate files) content) dates, plan, changes, says OK) + move) integrity) manifest) entities) folders) show user)
Phase Details
| Phase | Description | Agents Used |
|---|---|---|
| Scan | Recursively walk target directory, build file inventory | orchestrator (Haiku) |
| Read | Extract text content from each file in parallel | reader-workers (Haiku x N) |
| Classify | Determine document type, extract dates, entities, summary | classifier (Sonnet) |
| Plan | Generate rename plan, folder structure, detect duplicates | planner (Sonnet) |
| Dry-Run | Present full preview to user: renames, moves, duplicates | orchestrator |
| Approve | HALT - Wait for user approval (only human interaction point) | - |
| Execute | Perform renames and directory reorganization | renamer (Haiku) |
| Verify | Validate all files accessible, hashes match, no data loss | verifier (Haiku) |
| Report | Generate workspace-manifest.json and summary | orchestrator |
Core Autonomy Rules (Modified from Loki Mode)
This system runs autonomously EXCEPT at the Approve phase.
- NEVER ask questions during processing - Make best-effort decisions
- NEVER wait for confirmation EXCEPT at dry-run approval - This is the ONE human checkpoint
- NEVER delete files - Only rename and move. Originals recoverable via rollback.json
- NEVER overwrite files - If name collision, append incrementing suffix
- ALWAYS generate dry-run first - No file operations without preview
- ALWAYS maintain rollback capability - Every operation is reversible
- ALWAYS preserve file integrity - Hash before and after, verify match
Model Selection Strategy
| Model | Use For | Examples |
|---|---|---|
| Sonnet | Classification, orchestration, planning | Document type classification, rename planning, relationship linking |
| Haiku | Reading, renaming, verification, scanning | File content extraction, applying renames, hash verification |
Parallelization Strategy (Memory-Aware)
Batches are sized by estimated token weight, not file count:
# During Scan: estimate load per file for file in scanned_files: file.load_estimate = estimate_file_weight(file.size, file.reader_type) # Returns: estimated_tokens, weight_class (light/medium/heavy/very_heavy/oversized) # During Read: build batches within memory budget # OCR: max 120K tokens/batch, 3 workers | Direct: max 200K tokens/batch, 10 workers batch, weight = build_memory_aware_batch(pending_files, reader_type) parallelism = calculate_dynamic_parallelism(batch, reader_type) # Dispatch batch (only as many as budget allows) for file in batch[:parallelism]: Task(subagent_type="general-purpose", model="haiku", description=f"Read file: {file.name}", run_in_background=True, prompt=f"Extract all text content from {file.path}...") # Oversized files (>80K estimated tokens): chunked reading, one at a time # Text: line ranges | PDF: summary-only OCR | DOCX: condensed | Excel: sheet-by-sheet
See
references/tool-orchestration.md for full load estimation and memory-aware dispatch.
Agent Types Overview
| Agent | Count | Model | Role |
|---|---|---|---|
| 1 | Sonnet | Scans dir, builds queue, dispatches workers, manages phases |
| N (parallel) | Haiku | Reads file content via appropriate tool (docx, pdf/OCR, xlsx, etc.) |
| 1-3 | Sonnet | Determines doc type, extracts dates/entities/summary, confidence score |
| 1 | Sonnet | Generates rename plan, folder structure, duplicate detection |
| N (parallel) | Haiku | Applies renames and moves per approved plan |
| N (parallel) | Haiku | Hash verification, accessibility checks, manifest validation |
| 1 | Sonnet | Discovers relationships between documents (references, invoices<->contracts) |
See
references/agent-types.md for complete definitions.
Supported File Types
| Category | Extensions | Reading Method |
|---|---|---|
| Documents | | MCP (OCR) or text extraction |
| Documents | | MCP () |
| Spreadsheets | , | MCP () |
| Text | , , , | Direct file read |
| Code | , , , , , , , , | Direct file read |
| Images | , , , , | MCP (OCR text extraction) |
See
references/file-types.md for reading strategies per type.
Naming Convention
YYYY-MM-DD_DocumentType_ShortDescription[_Entity]_Hash4.ext
Date Priority (highest to lowest)
- Signature date found in document
- Explicit "Date:" field in document
- Document creation date in metadata
- File system modification date
Examples
2025-11-14_Contract_OfficeLeaseAgreement_AcmeCorp_a3f2.pdf 2026-01-10_Invoice_CloudHostingJanuary_AWS_b7e1.xlsx 2024-06-03_Letter_EmploymentOffer_JohnDoe_c9d4.docx 2026-01-15_Code_ReactAuthComponent_d8a1.tsx 2025-09-20_Spreadsheet_Q3BudgetForecast_e5b3.xlsx 2026-01-31_Report_AnnualSalesAnalysis_f2c7.pdf
See
references/naming-convention.md for full rules.
Dry-Run Output Format
Before any file operations, the system presents:
============================================================ INQUISITOR MODE - DRY RUN PREVIEW ============================================================ Target: F:/documents/unsorted (recursive) Files found: 47 Duplicates detected: 3 RENAMES: scan_0042.pdf -> Contracts/2025-11-14_Contract_OfficeLeaseAgreement_a3f2.pdf Confidence: 0.92 | Dates: signature=2025-11-14 IMG_20260110.jpg -> Invoices/2026-01-10_Invoice_CloudHosting_b7e1.jpg Confidence: 0.78 | Dates: doc_date=2026-01-10 untitled(3).docx -> Review/untitled(3)_c9d4.docx Confidence: 0.45 | LOW CONFIDENCE - needs human review DUPLICATES: report_v2.pdf == report_final.pdf (sha256 match) -> Keep: report_v2.pdf (newer modified date) -> Flag: report_final.pdf (moved to Duplicates/) NEW FOLDERS: + Contracts/ + Invoices/ + Review/ + Duplicates/ + Code/ + Correspondence/ ============================================================ Approve? Execute with: "Inquisitor execute" Modify plan with: "Inquisitor adjust [instructions]" Cancel with: "Inquisitor cancel" ============================================================
JSON Manifest Schema
Output:
.inquisitor/manifest/workspace-manifest.json
{ "version": "1.0.0", "processed_at": "ISO timestamp", "source_directory": "path", "recursive": true, "total_files_scanned": 47, "total_files_processed": 44, "duplicates_found": 3, "low_confidence_files": 2, "categories_created": ["Contracts", "Invoices", "..."], "files": [ { "original_name": "string", "original_path": "string (relative to source)", "new_name": "string", "new_path": "string (relative to source)", "document_type": "Contract|Invoice|Letter|Report|Spreadsheet|Code|Image|Other", "category": "Legal|Financial|HR|Technical|Correspondence|Other", "dates": { "primary_date": "YYYY-MM-DD", "date_source": "signature|document|metadata|filesystem", "signature_date": null, "effective_date": null, "expiration_date": null, "all_dates_found": [] }, "entities": { "parties": [], "people": [], "organizations": [], "amounts": [], "addresses": [], "emails": [], "phone_numbers": [] }, "summary": "1-2 sentence description", "tags": [], "language": "en", "confidence": 0.92, "relationships": [ {"related_file": "other_file.pdf", "relation": "references|invoice_for|amendment_to|reply_to|version_of"} ], "file_hash": "sha256:...", "file_size_bytes": 245000, "original_metadata": { "created": "ISO", "modified": "ISO", "extension": ".pdf" }, "processing": { "read_method": "ocr|docx_reader|excel_reader|direct_read", "read_duration_ms": 1200, "classification_model": "sonnet", "ocr_confidence": 0.88 } } ], "duplicate_groups": [ { "hash": "sha256:...", "files": ["path1", "path2"], "kept": "path1", "reason": "newer_modified_date" } ], "statistics": { "by_category": {"Legal": 12, "Financial": 8}, "by_type": {"Contract": 7, "Invoice": 5}, "by_year": {"2025": 20, "2026": 15}, "avg_confidence": 0.87, "processing_time_seconds": 142 } }
See
references/manifest-schema.md for full schema documentation.
Incremental Processing
Track processed files to avoid re-processing:
// .inquisitor/state/processed-files.json { "files": { "sha256:abc123...": { "original_path": "docs/contract.pdf", "current_path": "Contracts/2025-11-14_Contract_Lease_a3f2.pdf", "processed_at": "ISO", "manifest_entry_id": 0 } } }
On re-run: compute hash of each file, skip if already in processed-files.json.
Rollback System
// .inquisitor/rollback/rollback.json { "session_id": "uuid", "executed_at": "ISO", "operations": [ { "type": "rename", "from": "scan_0042.pdf", "to": "Contracts/2025-11-14_Contract_OfficeLeaseAgreement_a3f2.pdf", "hash_before": "sha256:...", "hash_after": "sha256:..." }, { "type": "mkdir", "path": "Contracts/" } ] }
Rollback command:
Inquisitor rollback — reverses all operations in reverse order.
Confidence Routing
| Confidence | Action |
|---|---|
| >= 0.85 | Auto-classify and rename |
| 0.70 - 0.84 | Auto-classify, flag for review in dry-run |
| 0.50 - 0.69 | Place in folder with original name preserved |
| < 0.50 | Place in folder, minimal rename (date + hash only) |
Duplicate Detection
- Compute SHA-256 hash for every file during Scan phase
- Group files by hash
- For duplicates:
- Keep the file with the most recent modification date
- Move others to
folderDuplicates/ - Log in manifest
duplicate_groups
- Present in dry-run for user approval
Relationship Linking
The
linker agent examines extracted content to find cross-references:
| Relation Type | Detection Method |
|---|---|
| File A mentions File B's title, number, or ID |
| Invoice references a contract number or PO |
| Amendment document references original contract |
| Email/letter references another correspondence |
| Similar content with version indicators (v1, v2, draft, final) |
| File referenced as attachment in another document |
Load Estimation and Memory Safety
Files are not batched by count — they're batched by estimated token weight to prevent worker context overflow:
| Weight Class | Estimated Tokens | Handling |
|---|---|---|
| < 5K | Full parallel batch (up to 10 workers) |
| 5K - 20K | Full parallel batch |
| 20K - 50K | Reduced parallelism |
| 50K - 80K | Minimal parallelism (1-2 workers) |
| > 80K | Chunked reading — one file at a time, sequential |
Chunked reading for oversized files extracts head + tail + dates + entities + summary instead of full text. Classification accuracy is preserved because key metadata is always captured.
Orchestrator budget: Results are flushed to disk when accumulated context exceeds 400K tokens, keeping only 200-char summaries in memory.
Calibration: After each batch, predicted vs actual token counts are compared. Weight multipliers auto-adjust if estimates are consistently off.
See
references/tool-orchestration.md for full implementation.
Circuit Breakers
| Agent Type | Failure Threshold | Cooldown | Notes |
|---|---|---|---|
| 5 consecutive | 60s | OCR failures, corrupt files |
| 3 consecutive | 120s | Classification errors |
| 2 consecutive | 300s | File system errors are serious |
| 3 consecutive | 60s | Hash mismatches |
Invocation
Inquisitor Mode # Start with current directory Inquisitor Mode scan F:/path/to/directory # Start with specific directory Inquisitor execute # Execute approved dry-run plan Inquisitor adjust [instructions] # Modify plan before execution Inquisitor cancel # Cancel current operation Inquisitor rollback # Undo last execution Inquisitor status # Show processing progress
Skill Metadata:
| Field | Value |
|---|---|
| Trigger | "Inquisitor Mode" or "Inquisitor Mode scan [path]" |
| Skip When | Single file rename, already organized directory |
| Dependencies | MCP tools: doctr-ocr, office (read_docx), excel |
References
| Reference | Content |
|---|---|
| RARV cycle adapted for document processing |
| All agent types with capabilities |
| Queue system for file processing |
| Efficiency tracking and parallel dispatch |
| Supported file types and reading strategies |
| Renaming rules and date extraction |
| JSON manifest and relationship linking |
| Episodic/semantic memory for document patterns |
Version: 1.0.0 | Adapted from Loki Mode v2.35.0 orchestration patterns