| name | pipeline |
| description | Invoke and resume YAML-defined pipelines by name — /pipeline auto-dev runs the full release pipeline |
| scope | harness |
| user-invocable | true |
| effort | high |
| argument-hint | <pipeline-name> | resume | (no args to list available) |
| source | {"type":"external","origin":"github","url":"https://github.com/baekenough/baekenough-skills","version":"1.0.0"} |
/pipeline — Pipeline Invocation
Usage
/pipeline auto-dev # Run the auto-dev pipeline
/pipeline # List available pipelines
/pipeline resume # Resume a halted pipeline
Behavior
Workflow File Locations
workflows/*.yaml is the Codex pipeline invocation surface used by /pipeline <name> in this repository. templates/workflows/*.yaml is its packaged template mirror and must remain content-identical.
.codex/skills/pipeline/workflows/*.yaml is a skill-local reference copy retained for compatibility with older skill bundles and detailed examples. It is not the primary repo-root invocation surface unless a runtime explicitly resolves workflows relative to this skill directory.
When changing pipeline behavior, update the active repo-root workflow first, update its template mirror in the same change, and then update skill-local reference copies when they describe the same behavior.
List Mode (no arguments or --list flag)
Execute these steps to display available pipelines:
- Scan built-in pipelines: Use
Glob("workflows/*.yaml") (NOT templates/) to find all pipeline definitions
- Extract metadata: For each YAML file found, use
Bash to extract name and description:
for f in workflows/*.yaml; do
name=$(grep -m1 '^name:' "$f" | sed 's/^name: *//' | tr -d '"')
desc=$(grep -m1 '^description:' "$f" | sed 's/^description: *//' | tr -d '"')
echo " $name — $desc"
done
- Scan template pipelines: Use
Glob("templates/workflows/*.yaml") for template examples
- Display formatted output:
Available pipelines:
{name} — {description}
{name} — {description}
Template pipelines (in templates/workflows/):
{name} — {description}
- If no pipelines found, display: "No pipelines found in workflows/ directory."
- If YAML parsing fails for a file, skip it and show:
{filename} — (parse error, skipped)
Run Mode (with pipeline name)
- Validate pipeline exists:
workflows/{name}.yaml
- Load and validate YAML structure:
- Required fields:
name, description, steps[]
- Each step has either
skill: or prompt: (not both)
- Referenced skills exist in
.codex/skills/
- Skill names must match
^[a-z0-9-]+$ (kebab-case only) — reject path traversal attempts
- Announce:
[Pipeline] Starting {name} — {step_count} steps
- Execute steps top-to-bottom:
- Skill steps (
skill: name): Invoke via Skill tool — Skill(skill: "{name}")
- Prompt steps (
prompt: text): Execute the described action using appropriate agents/tools
- Foreach steps (
foreach: collection): Iterate over collection from previous step output
- Parallel steps (
parallel: [step1, step2]): Execute contained steps concurrently using Agent tool. Each parallel step runs as an independent Agent. Max 4 concurrent per R009. Steps within a parallel block MUST be independent (no shared state, no sequential dependencies). Dependencies between parallel and non-parallel steps use depends_on: field.
- Claude compatibility
Agent calls only (R010 “Delegated Permission Ownership”): Pass mode: "bypassPermissions" when the active Claude session uses bypass permissions. Native Codex spawn_agent has no mode parameter; use the installed agent_type and active Codex runtime permissions instead.
- Report completion or failure
Resume Mode (/pipeline resume)
- Scan
/tmp/.codex-pipeline-*-{PPID}.json for state files
- If none found: "No halted pipelines found."
- If found: display pipeline name, failed step, error message
- Options:
- Retry — Re-execute the failed step
- Skip — Mark failed step as skipped, continue to next
- Abort — Delete state file, cancel pipeline
- On resume: execute from the failed step
State Tracking
Track per-step state:
{
"pipeline": "{name}",
"started": "ISO-8601",
"status": "running|completed|halted",
"current_step": 0,
"steps": [
{"name": "triage", "status": "completed", "duration_ms": 5000},
{"name": "plan", "status": "running"}
]
}
State saved to /tmp/.codex-pipeline-{name}-{PPID}.json on failure.
Phase Token Spend Tracking
For release pipelines such as auto-dev, record an advisory token-spend estimate at every phase boundary. This is intentionally lightweight and does not require provider billing APIs.
- State file:
/tmp/auto-dev-spend-{PPID}.json
- Estimate:
(input_chars + output_chars) / 4, rounded to the nearest integer
- Required fields per phase:
name, started_at, completed_at, input_chars, output_chars, estimated_tokens
- Final report: print a phase table and total estimated tokens before the follow-up step
If exact usage events are available from the runtime, prefer them and set token_source: "runtime". Otherwise set token_source: "estimated". Missing spend data must not block a release; it should be reported as an observability gap.
Parallel Execution
Pipeline steps can be grouped for parallel execution:
steps:
- name: phase-1
parallel:
- name: task-a
skill: skill-a
description: First independent task
- name: task-b
skill: skill-b
description: Second independent task
- name: phase-2
skill: next-step
depends_on: phase-1
Parallel Rules
- Max 4 concurrent steps per parallel block (R009 hard cap)
- Steps within a parallel block MUST be independent
depends_on enforces ordering between blocks
- Each parallel step is spawned as a separate Agent tool call in the SAME message
- Preserve the session permission posture only for Claude compatibility
Agent calls; native Codex spawn_agent follows the active runtime permissions and never accepts mode
- If any parallel step fails with
error: halt-and-report, all remaining steps in the block are cancelled
- State tracking records each parallel step individually
Parallel State Format
{
"name": "phase-1",
"type": "parallel",
"status": "running",
"children": [
{"name": "task-a", "status": "completed", "duration_ms": 5000},
{"name": "task-b", "status": "running"}
]
}
Error Handling
- Pipeline not found → list available pipelines with suggestion
- YAML parse error → report with line number
- Step failure (error: halt-and-report) → stop execution, save state, report failure with context
- All file writes delegated to subagents per R010