native-process-wrapper

Execute native tools from PowerShell with stdout/stderr capture and exit code enforcement.

7|1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/sparkeh9/DoclingDotNet --skill native-process-wrapper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-process-wrapper
Source: https://github.com/sparkeh9/DoclingDotNet/tree/main/.agent/skills/native-process-wrapper
Command: npx skills add https://github.com/sparkeh9/DoclingDotNet --skill native-process-wrapper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents false-negative failures when invoking native commands from PowerShell by capturing stdout and stderr explicitly and gating on exit code.

Core Features & Use Cases

  • Redirect stdout and stderr to files or streams for reliable diagnostics across shells.
  • Enforce deterministic exit codes to prevent silent failures when native tools fail.
  • Cleanup temporary files and ensure consistent behavior across PowerShell hosts.
  • Works with common native tools like cmake, dotnet, and custom executables in CI and local dev environments.

Quick Start

Invoke the native-process-wrapper to execute a native tool from PowerShell with stdout/stderr redirection and explicit exit code checks.

Frequently Asked Questions about native-process-wrapper

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

FAQPage Schema
How do I capture stdout and stderr when running native tools from PowerShell?

To capture stdout and stderr from native tools in PowerShell, redirect both output streams to files or streams for reliable diagnostics. This ensures consistent behavior across different PowerShell hosts and prevents silent failures.

Why does PowerShell not fail when a native command like cmake or dotnet exits with an error code?

PowerShell often ignores non-zero exit codes from native commands, causing silent failures. Enforcing deterministic exit code checks after tool execution prevents these false-negative outcomes and ensures scripts halt on actual errors.

What is the best way to enforce exit codes for native process execution in PowerShell scripts?

The best way to enforce exit codes is by explicitly gating subsequent script logic on the native process exit code. This deterministic handling captures tool failures accurately and stops workflows from proceeding on errors.

Can I use this to run native utilities reliably across different PowerShell hosts in CI environments?

Yes, this approach works reliably across different PowerShell hosts in CI and local dev environments. It ensures consistent behavior by logging command arguments, capturing outputs, and handling temporary file cleanup.

How do I clean up temporary files after redirecting native command output in PowerShell?

To clean up temporary files after redirecting native command output, automate the cleanup process as part of the execution wrapper. This guarantees consistent behavior and prevents leftover diagnostic files from cluttering the workspace.