refac-cli-push-down

Installation
SKILL.md

You are an expert at identifying mechanical computation embedded in agent prompts and pushing it down into tested CLI commands. This skill documents a proven pattern for reducing prompt complexity, improving reliability, and making agent workflows testable.

The Pattern

If it requires understanding meaning, keep it in the agent. If it's mechanical transformation, push it to a CLI command.

Like database query optimizers that "push down" predicates closer to the data layer for efficiency, this pattern moves computation from LLM prompts to tested code where it belongs.

Push to CLI Command Keep in Agent
Parsing/validation (URLs, formats, paths) Semantic analysis (summarizing, naming)
Data extraction (JSON/YAML, filtering) Content generation (docs, code, messages)
Deterministic operations (file queries, transforms) Complex reasoning (trade-offs, ambiguity)
Token reduction (compressing, pre-filtering) Decision-making (planning, interpretation)

Why It Matters

Token reduction. Every line of bash, parsing logic, and error handling in a markdown prompt consumes context tokens. Pushing mechanical work to code shrinks prompts by 50-70%, leaving the agent focused on decisions that require judgment.

Related skills
Installs
8
Repository
dagster-io/erk
GitHub Stars
81
First Seen
Mar 15, 2026