effect-command-executor

A type-safe way to create, run, pipe, monitor, and clean up operating-system child processes in Effect applications.

In plain words
What is it for?
Use it to run commands, capture or stream their output, connect processes into pipelines, start long-running programs, and manage their shutdown.
Why use it?
It makes shell commands and external programs part of the application’s managed workflow, including their output and lifetime. Automatic cleanup helps prevent processes or related resources from being left running.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-command-executor
Any agent
npx skills add mpsuesser/pi-effect-harness --skill effect-command-executor
Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,797 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.04797
Opus 5 $0.00024 $0.02398
Sonnet 5 $0.00010 $0.00959
Haiku 4.5 $0.00005 $0.00480

Measured 3d ago against content hash c81ad7e013f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

effect-command-executor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

harnesses/effect/skills/effect-command-executor/SKILL.md · 672 lines

How it starts

The opening of the file, as written. The whole thing — 672 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Child Process Execution with Effect v4

Overview

The ChildProcess module provides type-safe, composable process execution with automatic resource cleanup via Scope. Commands are AST values — built first with make and pipeTo, then executed via the ChildProcessSpawner service.

When to use this skill:

  • Running shell commands or external programs
  • Capturing command output as string, lines, or stream
  • Piping commands together (shell pipeline equivalent)
  • Streaming output from long-running processes
  • Managing process lifecycles with scoped cleanup

Note: This skill covers child process execution, NOT @effect/cli for building CLI applications.

Import Pattern

import { ChildProcess, ChildProcessSpawner } from 'effect/unstable/process';

Platform layer (Node.js):

import { NodeServices } from '@effect/platform-node';

Creating Commands

Template Literal Form

import { ChildProcess } from 'effect/unstable/process';

// Simple command — parsed by whitespace
const cmd = ChildProcess.make`echo hello world`;

// With interpolation — expressions become separate arguments
const name = 'my-package';
const cmd2 = ChildProcess.make`bun publish ${name}`;

// Array expressions expand to multiple arguments
const files = ['a.ts', 'b.ts', 'c.ts'];
const cmd3 = ChildProcess.make`oxfmt ${files}`;

Options + Template Literal Form

import { ChildProcess } from 'effect/unstable/process';

// Options object returns a tagged template function
const cmd = ChildProcess.make({ cwd: '/tmp' })`ls -la`;

const cmd2 = ChildProcess.make({
	cwd: '/app',
	env: { NODE_ENV: 'production' },
	extendEnv: true
})`node server.js`;

Array Form

import { ChildProcess } from 'effect/unstable/process';

// Explicit command + args array
const cmd = ChildProcess.make('git', ['status'], {
	extendEnv: true,
	stdin: 'ignore'
});

// With options
const cmd2 = ChildProcess.make('bun', ['lint'], {
	env: { FORCE_COLOR: '1' },
	extendEnv: true,
	stdin: 'ignore'
});

// Command only (no args)
const cmd3 = ChildProcess.make('node', {
	cwd: '/app',
	extendEnv: true,
	stdin: 'ignore'
});

Read the full file on GitHub · 672 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 672 lines · 48 tokens per session scan A c81ad7e013f4

Subscribe to this mod's changes

effect-command-executor is a skill published in the GitHub repository mpsuesser/pi-effect-harness (23 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 4,797 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.