refac-cli-push-down
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.
More from dagster-io/erk
dignified-code-simplifier
Simplifies and refines Python code for clarity, consistency, and maintainability while preserving all functionality. Applies dignified-python standards. Focuses on recently modified code unless instructed otherwise.
96dignified-python
Production Python coding standards with automatic version detection (3.10-3.13). Use when writing,
77cli-skill-creator
This skill should be used when creating a skill for a CLI tool. Use when users ask to document a command-line tool, create CLI guidance, or build a skill for terminal commands. Essential for systematically introspecting CLI tools through help text, man pages, GitHub repos, and online research, then organizing findings into effective skill documentation.
72command-creator
This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.
72learned-docs
This skill should be used when writing, modifying, or reorganizing
71session-inspector
>
71