hybrid-complete

hybrid-complete is a command for coding agents from Taoidle/plan-cascade. It costs 39 tokens per session (3,649 once invoked), scanned C, original, MIT.

A completion command for a Hybrid Ralph task, which is work carried out in an isolated Git worktree. It checks that all stories are finished, commits the code, merges it into the target branch, and removes the worktree.

In plain words
What is it for?
Use it at the end of a worktree task to verify completion, commit code changes, merge them, and clean up the temporary worktree.
Why use it?
It gathers completed work into the main branch while checking that the planned stories were actually completed.

Command

Part of the plan-cascade plugin — 7 skills, 33 commands shipped together

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 commands/taoidle/plan-cascade/hybrid-complete
Clone the repo
git clone --depth 1 https://github.com/Taoidle/plan-cascade

Or install plan-cascade, the plugin that ships this one along with the rest of its 7 skills, 33 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hybrid-complete

README.md
[![agentmods](https://agentmods.dev/badge/commands/taoidle/plan-cascade/hybrid-complete.svg)](https://agentmods.dev/commands/taoidle/plan-cascade/hybrid-complete)
Your own site
<a href="https://agentmods.dev/commands/taoidle/plan-cascade/hybrid-complete"><img src="https://agentmods.dev/badge/commands/taoidle/plan-cascade/hybrid-complete.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,649 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00039 $0.03649
Opus 5 $0.00019 $0.01825
Sonnet 5 $0.00008 $0.00730
Haiku 4.5 $0.00004 $0.00365

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

Security

Grade C, and why

hybrid-complete scanned grade C with 1 finding 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .agent-outputs
commands/hybrid-complete.md · 453 lines

How it starts

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

Hybrid Ralph - Complete Worktree Task

You are completing a Hybrid Ralph task in a worktree and merging it to the target branch.

Path Storage Modes

This command works with both new and legacy path storage modes:

New Mode (Default)

  • Worktrees located in: ~/.plan-cascade/<project-id>/.worktree/ (Unix) or %APPDATA%/plan-cascade/<project-id>/.worktree/ (Windows)
  • State files in: ~/.plan-cascade/<project-id>/.state/
  • Cleanup removes files from user data directory

Legacy Mode

  • Worktrees located in: <project-root>/.worktree/
  • State files in project root
  • Cleanup removes files from project root

The command auto-detects which mode is active based on .planning-config.json contents.

Step 1: Detect Current Location

Check if we're in a worktree or the root directory:

if [ -f ".planning-config.json" ]; then
    # We're in a worktree directory
    echo "Currently in worktree directory: $(pwd)"
    IN_WORKTREE=true
else
    # We're not in a worktree, check if there are any worktrees
    IN_WORKTREE=false

    # Check for worktrees
    WORKTREES=$(git worktree list 2>/dev/null | grep -v "\bare$" | wc -l)

    if [ "$WORKTREES" -eq 0 ]; then
        echo "ERROR: No worktrees found."
        echo "This command requires an existing hybrid worktree."
        echo ""
        echo "Create one first with:"
        echo "  /plan-cascade:hybrid-worktree <task-name> <branch> <description>"
        exit 1
    fi

    echo "Not in a worktree directory. Found $WORKTREES worktree(s):"
    echo ""
    git worktree list
    echo ""

    # Find all hybrid worktrees (check both new mode user directory and legacy project root)
    echo "Scanning for hybrid worktrees..."
    HYBRID_WORKTREES=()

    # Get worktree base directory from PathResolver (handles new vs legacy mode)
    WORKTREE_BASE=$(uv run python -c "from plan_cascade.state.path_resolver import PathResolver; from pathlib import Path; print(PathResolver(Path.cwd()).get_worktree_dir())" 2>/dev/null || echo ".worktree")

    while IFS= read -r line; do
        worktree_path=$(echo "$line" | awk '{print $1}')
        worktree_branch=$(echo "$line" | awk '{print $2}')

        # Check if this is a hybrid worktree
        if [ -f "$worktree_path/.planning-config.json" ]; then
            mode=$(jq -r '.mode // empty' "$worktree_path/.planning-config.json" 2>/dev/null)
            if [ "$mode" = "hybrid" ]; then
                task_name=$(jq -r '.task_name // empty' "$worktree_path/.planning-config.json" 2>/dev/null)
                HYBRID_WORKTREES+=("$worktree_path|$task_name|$worktree_branch")
            fi
        fi
    done < <(git worktree list 2>/dev/null | grep -v "\bare$")

    if [ ${#HYBRID_WORKTREES[@]} -eq 0 ]; then
        echo "ERROR: No hybrid worktrees found."
        echo "Found worktrees but none are in hybrid mode."
        exit 1
    fi

    echo "Found ${#HYBRID_WORKTREES[@]} hybrid worktree(s):"
    echo ""

    # Display options
    for i in "${!HYBRID_WORKTREES[@]}"; do
        IFS='|' read -r path name branch <<< "$i"
        echo "  [$((i+1))] $name"
        echo "      Path: $path"
        echo "      Branch: $branch"
        echo ""
    done

    # Ask user to select
    echo "Which worktree would you like to complete?"
    read -p "Enter number (or 0 to cancel): " selection

    if [ "$selection" = "0" ]; then
        echo "Cancelled."
        exit 0
    fi

    if [ "$selection" -lt 1 ] || [ "$selection" -gt ${#HYBRID_WORKTREES[@]} ]; then
        echo "Invalid selection."
        exit 1
    fi

    # Get the selected worktree
    selected="${HYBRID_WORKTREES[$((selection-1))]}"
    IFS='|' read -r WORKTREE_PATH TASK_NAME TASK_BRANCH <<< "$selected"

    echo ""
    echo "Selected: $TASK_NAME"
    echo "Navigating to worktree: $WORKTREE_PATH"

    # Change to worktree directory
    cd "$WORKTREE_PATH" || {
        echo "ERROR: Failed to navigate to worktree: $WORKTREE_PATH"
        exit 1
    }

    echo "✓ Now in worktree: $(pwd)"
    IN_WORKTREE=true
fi

Read the full file on GitHub · 453 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. 4d ago First seen · 453 lines · 39 tokens per session scan C c2f5615d23af

Subscribe to this mod's changes

hybrid-complete is a command published in the GitHub repository Taoidle/plan-cascade (131 stars, last pushed 5mo ago), licensed MIT. It adds 39 tokens to every session and 3,649 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.