effect-command-executor

Execute external programs with Effect ChildProcess and capture typed output.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-command-executor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-command-executor
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-command-executor
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-command-executor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automating external command execution while preserving correct lifecycles, typed outputs, and deterministic cleanup in Effect-based code.

Core Features & Use Cases

  • Composable command construction: Build commands as AST values (template literals, array form, and option-tagged templates) and compose pipelines with pipeTo-style flow.
  • Typed execution modes: Capture stdout/stderr as strings, lines, or streams, or use process handles for interactive control and long-running tasks.
  • Scope-safe process lifecycle management: Ensure spawned processes are cleaned up via Effect.scoped, and use ChildProcessHandle utilities like exitCode, kill, and fd piping.
  • Use case: Stream a long-running linter or formatter output chunk-by-chunk while the process runs, then verify its ExitCode and fail with a domain error when it exits non-zero.

Quick Start

Use the effect-command-executor skill to run a command and collect its output as lines: Ask it to execute git diff output and return only the changed TypeScript files by using ChildProcess.make('git', ['diff', '--name-only', 'main...HEAD']) with spawner.lines(...).

Frequently Asked Questions about effect-command-executor

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

FAQPage Schema
How do I execute external shell commands in Effect with reliable stdout and stderr capture?

You can execute external shell commands in Effect safely by using the ChildProcess module to spawn processes and capture stdout/stderr as strings, lines, or streams while ensuring deterministic cleanup.

How does Effect handle process lifecycle and cleanup for spawned child processes?

Effect handles process lifecycle management by using Effect.scoped with ChildProcessSpawner, ensuring spawned processes are cleaned up automatically via Scope and providing utilities like exitCode and kill.

Can I stream long-running process output chunk-by-chunk in an Effect application?

Yes, you can stream long-running process output in Effect by using process handles for interactive control, allowing you to read output chunk-by-chunk and handle process cancellation or kill semantics as needed.

What is the best way to build command pipelines and compose commands in Effect?

The best way to build command pipelines in Effect is by constructing commands as AST values using template literals or array forms and composing them together with pipeTo-style flow before execution.

How do I verify a child process exit code and fail with a domain error in Effect?

You verify a child process exit code in Effect by using typed ExitCode comparisons after the process finishes, allowing you to fail the Effect with a domain error or PlatformError wrapping when it exits non-zero.