os-investigator

Investigate OS and firmware source to produce clean-room hardware facts and mechanism reports.

2|Updated May 13, 2026
One-click install
npx skills add https://github.com/curtisgalloway/public-skills --skill os-investigator-curtisgalloway
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: os-investigator
Source: https://github.com/curtisgalloway/public-skills/tree/main/plugins/driver-porting/skills/os-investigator
Command: npx skills add https://github.com/curtisgalloway/public-skills --skill os-investigator-curtisgalloway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Reimplementing hardware drivers in a differently-licensed OS requires understanding how Linux, Trusted Firmware-A, or vendor firmware drives a peripheral, but reading that GPL-licensed source directly risks contaminating the new implementation. This Skill acts as a research subagent that reads the encumbered source and returns only facts and mechanism descriptions, never code. ## Core Features & Use Cases - Clean-room reporting: Returns hardware facts (addresses, IRQs, clocks, register fields) and mechanism prose with every fact tagged by provenance class ([databook], [standard], [DT], [source-observed]). - Mechanical leak scanning: Ships scripts/leak_scan.py, a stdlib-only Python scanner that detects shared token runs and identifier reuse between a draft report and the encumbered source tree. - Subagent delegation model: Designed to run as a separate investigator agent so the code-writing context never touches encumbered source, with pinned-commit provenance for later verification. - Use Case: While porting a USB controller driver to a new RTOS, ask the investigator what MMIO base address, IRQ number, and init sequence the Linux dwc3 driver uses on your board, and receive a tagged, source-free report pinned to an exact kernel commit. ## Quick Start Ask the investigator subagent how the Linux kernel initializes a specific peripheral on your board and request a clean-room report with provenance tags.

Frequently Asked Questions about os-investigator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reimplement a Linux driver without copying GPL code?▼

Use a clean-room investigation approach: a separate research agent reads the Linux source and returns only hardware facts and mechanism descriptions in original words, never code. Every fact is tagged by provenance class so the implementer knows what comes from databooks versus source observation.

How to check a clean-room spec for accidental source code leakage?▼

Run the included leak_scan.py script against your draft and the encumbered source tree. It flags shared token runs of 10 or more tokens and reused code-shaped identifiers, reporting locations and digests without reproducing matched text.

What hardware facts can be extracted from device trees?▼

Device trees provide MMIO base addresses, IRQ specifiers, clock handles, and memory-map ranges as factual hardware data. The investigation method follows the node's parent ranges chain up to a CPU physical address, doing the address arithmetic explicitly.

Does the leak scanner require external Python packages?▼

No, leak_scan.py uses only the Python 3 standard library. It requires Python 3 and accepts candidate documents, source directories, and an optional whitelist file of databook nomenclature.

When should the investigator run as a separate subagent?▼

Always, when the consumer writes target-OS code. Running the investigation in the same context as code generation places encumbered source in the same context that produces the new implementation, which destroys the clean-room provenance the method exists to protect.